/* style.css - Simplified for Pet Features Only */

:root {
    /* Colors */
    --container-bg: #f8f9fa;
    --container-bg-alt: #ffffff;
    --text-light: white;
    --text-dark: #343a40;
    --text-medium: #6c757d;
    --primary-accent: #007bff;
    --success-green: #28a745;
    --info-blue: #17a2b8;
    --info-blue-hover: #138496;
    --accent-pink: #e83e8c;
    --accent-pink-hover: #d81b60;
    --border-light: #dee2e6;
    --border-medium: #ced4da;
    --overlay-bg: rgba(0, 0, 0, 0.6);

    /* Layout & Spacing */
    --radius-medium: 8px;
    --radius-large: 12px;
    --shadow-light: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* === Basic Reset & Body Styles === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Poppins', sans-serif;
    margin: 0; padding: 0;
    background: linear-gradient(to bottom, #E6E9FF, #D4D0FF);
    color: #333;
    display: flex; flex-direction: column; align-items: center;
    min-height: 100vh;
    font-size: 16px;
}

h2 { font-size: 1.75em; color: var(--text-dark); margin-bottom: 0.75rem; }
h3 { font-size: 1.25em; color: var(--text-dark); }
p { margin-bottom: 1rem; color: var(--text-medium); line-height: 1.6; }
button { cursor: pointer; font-family: inherit; transition: background-color 0.2s ease, transform 0.1s ease; border: none;}
button:active { transform: translateY(1px); }

/* === General UI Elements === */
.prompt-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.prompt-button {
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-medium);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.prompt-button.primary {
    background-color: var(--success-green);
    color: white;
    border-color: var(--success-green);
}

.prompt-button.primary:hover {
    background-color: darkgreen;
    border-color: darkgreen;
}

.prompt-button.secondary {
    background-color: transparent;
    color: var(--text-medium);
    border-color: var(--border-medium);
}

/* === Modal Styles === */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--overlay-bg); z-index: 1000; overflow-y: auto; padding: 20px; opacity: 0; transition: opacity 0.3s ease; }
.modal.active { display: flex; align-items: center; justify-content: center; opacity: 1; }
.modal-content { background-color: var(--container-bg-alt); border-radius: var(--radius-large); padding: 2rem; max-width: 600px; margin: 20px; position: relative; box-shadow: var(--shadow-medium); text-align: center; }
.modal .modal-content.small-modal { max-width: 450px; }
.close-button { position: absolute; top: 10px; right: 10px; background: none; border: none; font-size: 1.8rem; font-weight: 300; line-height: 1; cursor: pointer; color: var(--text-medium); padding: 0.2rem 0.5rem; }

/* === Pet Styles === */
.pet-container {
    background-color: var(--container-bg);
    border-radius: var(--radius-large);
    padding: 20px;
    box-shadow: var(--shadow-medium);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.pet-display-area {
    position: relative;
    display: inline-block;
    margin-top: 10px;
}

#pet {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.pet-name {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-accent);
    margin-top: 10px;
    margin-bottom: 5px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Speech Bubble */
.speech-bubble { position: absolute; bottom: 90%; left: 50%; transform: translateX(-50%); min-width: 120px; max-width: 200px; background-color: rgba(224, 242, 254, 0.85); border: 1px solid #7dd3fc; border-radius: var(--radius-large); padding: 8px 12px; font-size: 0.8em; color: #075985; box-shadow: var(--shadow-light); z-index: 20; opacity: 0; visibility: hidden; transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out; text-align: center; }
.speech-bubble.visible { opacity: 1; visibility: visible; }
.speech-bubble::after { content: ''; position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border: 10px solid transparent; border-top-color: rgba(224, 242, 254, 0.85); border-bottom-width: 0; filter: drop-shadow(0px 2px 1px rgba(0, 0, 0, 0.05)); }
.speech-bubble::before { content: ''; position: absolute; bottom: -11px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border: 11px solid transparent; border-top-color: #7dd3fc; border-bottom-width: 0; z-index: -1; }
#pet-message { margin: 0; }

.stat-container { margin-bottom: 12px; text-align: left; padding: 0 10px; }
.stat-container label { display: block; margin-bottom: 4px; font-size: 0.9em; font-weight: 600; color: var(--text-medium); }
.stat-display-wrapper { display: flex; align-items: center; gap: 10px; }
.stat-bar-bg { background-color: #e9ecef; border-radius: 50px; overflow: hidden; height: 16px; flex-grow: 1; }
.stat-bar { height: 100%; border-radius: 50px; width: 0%; transition: width 0.4s ease, background-color 0.4s ease; }
.stat-value { font-size: 0.9em; font-weight: 700; color: var(--text-dark); min-width: 30px; text-align: right; }

.pet-button {
    margin: 5px;
    padding: 10px 15px;
    border-radius: var(--radius-medium);
    background-color: var(--accent-pink);
    color: var(--text-light);
    font-size: 0.9em;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.pet-button:hover {
    background-color: var(--accent-pink-hover);
    transform: translateY(-2px);
}

#customize-pet-button {
    display: block;
    width: 80%;
    max-width: 250px;
    margin: 20px auto 15px auto;
    padding: 12px 20px;
    background-color: var(--info-blue);
    color: white;
    font-size: 1em;
    font-weight: 600;
}

#customize-pet-button:hover {
    background-color: var(--info-blue-hover);
}

/* Pet Customization Modal */
.pet-customize-content {
    text-align: left;
}

.pet-customize-columns {
    display: flex;
    gap: 20px;
}

/* New Styles for Tabs */
.pet-customize-tabs {
    display: flex;
    flex-direction: column;
    width: 150px; /* Adjust as needed */
}

.tab-button {
    padding: 10px 15px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: var(--radius-medium);
    margin-bottom: 5px;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.tab-button.active {
    background-color: var(--info-blue);
    color: white;
    border-color: var(--info-blue);
}

.tab-button:hover {
    background-color: #ddd;
}

.pet-customize-options {
    flex: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.pet-customize-colors h4 {
    margin-bottom: 10px;
}

.pet-color-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.pet-color-option {
    padding: 0;
    border-radius: var(--radius-medium);
    cursor: pointer;
    box-shadow: var(--shadow-light);
    transition: transform 0.2s ease;
    background: none;
    border: none;
}

.pet-color-option:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.pet-color-option img {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.pet-customize-preview {
    flex: 1;
    text-align: center;
}

.pet-customize-preview label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-medium);
}

.pet-customize-preview input {
    padding: 8px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-medium);
    margin-bottom: 15px;
    width: 100%;
    max-width: 200px;
}

.pet-customize-preview img {
    width: 150px;
    height: auto;
}

/* General Confirmation Overlay (from common structure) */
#confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1200;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#confirm-overlay.active {
    display: flex;
    opacity: 1;
}

#confirm-message {
    background-color: var(--container-bg-alt);
    padding: 25px 35px;
    border-radius: var(--radius-medium);
    font-size: 1.2em;
    font-weight: 500;
    color: var(--text-dark);
    text-align: center;
    box-shadow: var(--shadow-medium);
    max-width: 90%;
}