/* Big or Small - Mobile-first styles */

:root {
    --bg-primary: #FFF9E6;
    --bg-secondary: #FFF3CC;
    --color-text: #5D4E37;
    --color-text-light: #8B7355;
    --color-primary: #FF6B6B;
    --color-secondary: #4ECDC4;
    --color-success: #95E879;
    --color-star: #FFD93D;
    --color-white: #FFFFFF;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --radius-lg: 24px;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--color-text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}

/* Screen management */
.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.screen.active {
    display: flex;
}

/* Start Screen */
#screen-start {
    gap: 20px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.logo-small {
    font-size: 48px;
    animation: bounce 2s ease-in-out infinite;
}

.logo-big {
    font-size: 72px;
    animation: bounce 2s ease-in-out infinite 0.3s;
}

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

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    text-shadow: 2px 2px 0 var(--color-star);
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-top: -10px;
}

.btn-play {
    background: linear-gradient(135deg, var(--color-primary), #FF8E8E);
    color: var(--color-white);
    border: none;
    padding: 20px 60px;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    cursor: pointer;
    box-shadow: var(--shadow-lg), 0 4px 0 #D94F4F;
    transition: var(--transition);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    margin-top: 20px;
}

.btn-play:active {
    transform: translateY(4px);
    box-shadow: var(--shadow), 0 0 0 #D94F4F;
}

.best-score {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-top: 30px;
}

.trophy {
    font-size: 1.3rem;
}

/* Game Screen */
#screen-game {
    justify-content: flex-start;
    padding-top: 10px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin-bottom: 20px;
}

.btn-icon {
    background: var(--color-white);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-icon:active {
    transform: scale(0.95);
}

.score {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--color-white);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: var(--shadow);
    font-size: 1.3rem;
    font-weight: 700;
}

.star {
    font-size: 1.4rem;
}

.question-container {
    flex: 0 0 auto;
    margin-bottom: 30px;
    text-align: center;
}

.question {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    padding: 15px 25px;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.question.bigger {
    border-left: 5px solid var(--color-primary);
}

.question.smaller {
    border-left: 5px solid var(--color-secondary);
}

.objects-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex: 1;
    width: 100%;
    max-width: 400px;
}

.object-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    border: 4px solid transparent;
    border-radius: var(--radius-lg);
    width: 140px;
    height: 140px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

.object-btn:active {
    transform: scale(0.95);
}

.object-btn.selected-correct {
    border-color: var(--color-success);
    animation: pulse-correct 0.5s ease;
}

.object-btn.selected-incorrect {
    border-color: var(--color-primary);
    animation: shake 0.5s ease;
}

.object-btn.highlight-correct {
    border-color: var(--color-success);
    background: linear-gradient(135deg, #E8FFE0, var(--color-white));
}

.object-btn.disabled {
    pointer-events: none;
}

.object-emoji {
    transition: font-size 0.3s ease;
}

/* Feedback */
.feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 40px;
    border-radius: var(--radius-lg);
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    z-index: 100;
    animation: pop-in 0.3s ease;
}

.feedback.hidden {
    display: none;
}

.feedback.correct {
    background: linear-gradient(135deg, var(--color-success), #7ED957);
    color: var(--color-white);
    box-shadow: 0 0 30px rgba(149, 232, 121, 0.5);
}

.feedback.incorrect {
    background: linear-gradient(135deg, var(--color-star), #FFE066);
    color: var(--color-text);
    box-shadow: 0 0 30px rgba(255, 217, 61, 0.5);
}

.feedback-text {
    display: block;
}

@keyframes pop-in {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes pulse-correct {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Sparkle effect for correct answers */
.sparkle {
    position: absolute;
    font-size: 1.5rem;
    animation: sparkle-float 1s ease-out forwards;
    pointer-events: none;
}

@keyframes sparkle-float {
    0% {
        transform: translateY(0) scale(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px) scale(1.2);
        opacity: 0;
    }
}

/* Responsive adjustments */
@media (min-width: 375px) {
    .object-btn {
        width: 150px;
        height: 150px;
    }

    .question {
        font-size: 1.6rem;
    }
}

@media (min-width: 414px) {
    .object-btn {
        width: 160px;
        height: 160px;
    }

    h1 {
        font-size: 3rem;
    }
}

@media (min-height: 700px) {
    .objects-container {
        margin-top: 20px;
    }
}

/* Tablet and up */
@media (min-width: 768px) {
    .object-btn {
        width: 180px;
        height: 180px;
    }

    .objects-container {
        gap: 40px;
    }

    .question {
        font-size: 1.8rem;
    }

    h1 {
        font-size: 3.5rem;
    }
}
