/* ============================================================
   ΤΑ ΖΩΑΚΙΑ — Stylesheet
   Ίδιο design system με το "Φωνολογική Επίγνωση"
   ============================================================ */

/* ===========================================
   1. DESIGN TOKENS (ίδια με το άλλο project)
   =========================================== */
:root {
    --bg-primary: #FFF8F0;
    --bg-secondary: #FFF0E5;
    --bg-card: #FFFFFF;
    --bg-overlay: rgba(61, 61, 61, 0.4);

    --primary: #B8A9E8;
    --primary-light: #D4C9F0;
    --primary-dark: #8B79C7;
    --secondary: #A8E6CF;
    --secondary-light: #C8F0DF;
    --secondary-dark: #6CC99E;
    --accent-warm: #FFB7B2;
    --accent-warm-light: #FFD4D1;
    --accent-cool: #87CEEB;
    --accent-cool-light: #B0DFEF;

    --success: #81C784;
    --success-light: #C8E6C9;
    --error: #F48FB1;
    --error-light: #F8BBD0;
    --warning: #FFE082;

    --text-primary: #3D3D3D;
    --text-secondary: #6B6B6B;
    --text-light: #FFFFFF;
    --text-muted: #9E9E9E;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Nunito', sans-serif;

    --text-xs: 0.7rem;
    --text-sm: 0.8rem;
    --text-base: 0.95rem;
    --text-lg: 1.05rem;
    --text-xl: 1.15rem;
    --text-2xl: 1.35rem;
    --text-3xl: 1.7rem;
    --text-4xl: 2.1rem;
    --text-5xl: 2.8rem;

    --space-xs: 0.2rem;
    --space-sm: 0.35rem;
    --space-md: 0.6rem;
    --space-lg: 0.9rem;
    --space-xl: 1.15rem;
    --space-2xl: 1.6rem;
    --space-3xl: 2.2rem;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(184, 169, 232, 0.3);
    --shadow-success: 0 0 20px rgba(129, 199, 132, 0.4);

    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
}

/* ===========================================
   2. RESET & BASE
   =========================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }

img { max-width: 100%; display: block; }

button {
    font-family: var(--font-body);
    font-weight: 700;
    cursor: pointer;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

/* ===========================================
   3. APP CONTAINER
   =========================================== */
#app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md);
    max-width: 900px;
    margin: 0 auto;
}

/* ===========================================
   4. FLOATING BACKGROUND SHAPES
   =========================================== */
#bg-shapes {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none; overflow: hidden;
}
.bg-shape { position: absolute; opacity: 0.12; border-radius: 50%; }
.shape-square { border-radius: var(--radius-lg); }
.shape-triangle { border-radius: 0; clip-path: polygon(50% 0%, 0% 100%, 100% 100%); }

.shape-1 { width: 120px; height: 120px; background: var(--primary); top: 10%; left: 5%; animation: floatSlow 20s ease-in-out infinite; }
.shape-2 { width: 80px; height: 80px; background: var(--secondary); top: 60%; right: 8%; animation: floatSlow 25s ease-in-out infinite reverse; }
.shape-3 { width: 60px; height: 60px; background: var(--accent-warm); top: 30%; right: 15%; animation: floatSlow 18s ease-in-out infinite 2s; }
.shape-4 { width: 90px; height: 90px; background: var(--accent-cool); bottom: 15%; left: 10%; animation: floatSlow 22s ease-in-out infinite 5s; }
.shape-5 { width: 50px; height: 50px; background: var(--warning); top: 75%; left: 50%; animation: floatSlow 15s ease-in-out infinite 3s; }
.shape-6 { width: 70px; height: 70px; background: var(--primary-light); top: 5%; right: 30%; animation: floatSlow 24s ease-in-out infinite 1s; }

@keyframes floatSlow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, -30px) rotate(10deg); }
}

/* ===========================================
   5. CONFETTI CANVAS
   =========================================== */
#confetti-canvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 100; pointer-events: none;
}

/* ===========================================
   6. BUTTONS
   =========================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-xl);
    font-size: var(--text-lg);
    font-weight: 700;
    transition: all var(--duration-normal) var(--ease-bounce);
    position: relative; overflow: hidden;
}
.btn::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    border-radius: inherit; pointer-events: none;
}
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn:active { transform: translateY(0) scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-light);
    box-shadow: var(--shadow-md), 0 4px 15px rgba(184, 169, 232, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: var(--text-primary);
    box-shadow: var(--shadow-md), 0 4px 15px rgba(168, 230, 207, 0.4);
}

.btn-large { padding: var(--space-lg) var(--space-3xl); font-size: var(--text-2xl); border-radius: var(--radius-xl); }

.btn-icon {
    width: 48px; height: 48px; padding: 0; border-radius: 50%;
    font-size: var(--text-xl);
    background: var(--bg-card); color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}
.btn-icon:hover { box-shadow: var(--shadow-md); }

.btn-back-pill {
    display: inline-flex; align-items: center; gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg) var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--text-base);
    background: var(--bg-card); color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}
.btn-back-pill:hover { box-shadow: var(--shadow-md); }
.btn-back-pill svg { flex-shrink: 0; }

.btn-back { position: fixed; top: var(--space-md); left: var(--space-md); z-index: 10; }
.btn-mute { position: fixed; top: var(--space-md); right: var(--space-md); z-index: 10; }
.btn-settings { position: fixed; top: var(--space-md); right: var(--space-md); z-index: 10; }
.site-back-link {
    position: fixed; top: var(--space-md); left: var(--space-md); z-index: 10;
    text-decoration: none;
}

/* ===========================================
   7. HOME SCREEN
   =========================================== */
.home-screen {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 100vh; text-align: center; padding: var(--space-xl); gap: var(--space-xl);
    width: 100%;
}

.home-logo-emoji {
    font-size: 4.5rem;
    animation: bounce 2.5s ease-in-out infinite;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.12));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

.home-title {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-cool), var(--secondary-dark));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.home-subtitle { font-size: var(--text-xl); color: var(--text-secondary); max-width: 420px; }

/* ===========================================
   7b. LEVEL SELECT SCREEN
   =========================================== */
.levels-screen {
    width: 100%;
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center;
    padding: var(--space-3xl) var(--space-md) var(--space-xl);
    gap: var(--space-xl);
}

.levels-title {
    font-size: var(--text-3xl);
    text-align: center;
}

.level-list {
    display: flex; flex-direction: column; align-items: center; gap: var(--space-lg);
    width: 100%; max-width: 420px;
}

.level-card {
    display: flex; align-items: center; gap: var(--space-lg);
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border-left: 6px solid var(--level-color, var(--primary));
    box-shadow: var(--shadow-sm);
    text-align: left;
    transition: all var(--duration-normal) var(--ease-bounce);
}
.level-card:hover { transform: translateY(-3px) scale(1.02); box-shadow: var(--shadow-md); }
.level-card:active { transform: translateY(0) scale(0.99); }

.level-card-1 { --level-color: #F9A825; }
.level-card-2 { --level-color: var(--secondary-dark); }
.level-card-3 { --level-color: var(--primary-dark); }

.level-num {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--level-color, var(--primary));
    color: var(--text-light);
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}

.level-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.level-title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
}

.level-desc { font-size: var(--text-sm); color: var(--text-secondary); }

/* ===========================================
   7c. SETTINGS MODAL (εκπαιδευτικός)
   =========================================== */
.settings-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: var(--bg-overlay);
    display: flex; align-items: center; justify-content: center;
    padding: var(--space-lg);
}

.settings-modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2xl);
    width: 100%; max-width: 400px;
    display: flex; flex-direction: column; align-items: center; gap: var(--space-md);
    text-align: center;
}

.settings-title { font-size: var(--text-2xl); }
.settings-desc { font-size: var(--text-base); color: var(--text-secondary); }

.settings-options {
    display: flex; flex-direction: column; gap: var(--space-sm);
    width: 100%;
    margin: var(--space-sm) 0;
}

.settings-option {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    text-align: left;
    transition: all var(--duration-normal) var(--ease-smooth);
}
.settings-option:hover { border-color: var(--primary-light); }
.settings-option.active { border-color: var(--primary); background: var(--primary-light); }

.settings-option-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-base);
    color: var(--text-primary);
}

.settings-option-desc { font-size: var(--text-sm); color: var(--text-secondary); }

/* ===========================================
   8. GAME SCREEN
   =========================================== */
.game-screen {
    width: 100%;
    display: flex; flex-direction: column; align-items: center;
    padding: var(--space-3xl) var(--space-md) var(--space-xl);
    gap: var(--space-xl);
    min-height: 100vh;
}

.game-instructions {
    text-align: center;
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 480px;
}

.game-instructions strong { color: var(--primary-dark); }

/* Reveal card: where the found animal appears */
.reveal-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 380px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-2xl);
    text-align: center;
}

.reveal-card.pop { animation: popIn var(--duration-slow) var(--ease-bounce); }

@keyframes popIn {
    0% { transform: scale(0.7); opacity: 0; }
    60% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}

.reveal-hint { font-size: var(--text-lg); color: var(--text-muted); }

.reveal-card img {
    max-width: 220px;
    max-height: 220px;
    object-fit: contain;
    border-radius: var(--radius-lg);
}

.reveal-emoji { font-size: 6rem; line-height: 1; }

.reveal-label {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
}

/* Input */
.text-input-area {
    display: flex; flex-direction: row; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: var(--space-md);
    width: 100%; max-width: 420px;
}

.game-text-input {
    flex: 1 1 220px;
    min-width: 0;
    padding: var(--space-lg) var(--space-xl);
    border: 3px solid var(--primary-light);
    border-radius: var(--radius-lg);
    font-size: var(--text-2xl);
    font-weight: 700;
    text-align: center;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all var(--duration-normal) var(--ease-smooth);
    box-shadow: var(--shadow-sm);
}

.game-text-input:focus { border-color: var(--primary); box-shadow: var(--shadow-glow); outline: none; }

.game-text-input.correct { border-color: var(--success); box-shadow: var(--shadow-success); }

.btn-want {
    flex-shrink: 0;
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-lg);
}

/* Collection strip */
.collection-wrap {
    width: 100%;
    max-width: 700px;
    display: flex; flex-direction: column; align-items: center; gap: var(--space-sm);
    margin-top: auto;
}

.collection-title {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 700;
}

.collection-strip {
    display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-sm);
    max-height: 140px;
    overflow-y: auto;
    padding: var(--space-sm);
}

.collection-chip {
    width: 52px; height: 52px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    animation: popIn var(--duration-normal) var(--ease-bounce);
}

.collection-chip img { width: 100%; height: 100%; object-fit: cover; }
.collection-chip-emoji { font-size: 1.6rem; }

/* ===========================================
   9. RESPONSIVE
   =========================================== */
@media (max-width: 480px) {
    .home-title { font-size: var(--text-3xl); }
    .reveal-card { min-height: 220px; padding: var(--space-xl); }
    .reveal-emoji { font-size: 4.5rem; }
}
