/* --- 1. RESET & KINTAMIEJI --- */
:root {
    --lp-pink: #E60060;
    --lp-yellow: #FFE000;
    --lp-black: #000000;
    --lp-white: #FFFFFF;
    --lp-gray: #F8F8F8;
    --lp-border-radius: 5px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--lp-gray);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    height: 100dvh;
    color: var(--lp-black);
    overflow: hidden;
}

/* --- 2. PAGRINDINIS KONTEINERIS --- */
.game-container {
    background: var(--lp-white);
    width: 100%;
    height: 100dvh; 
    padding: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* DESKTOP STILIUS (Nepakeistas) */
@media (min-width: 768px) {
    .game-container {
        height: auto;
        width: 100%;
        max-width: 900px;
        min-height: 550px;
        max-height: 90vh;
        border-radius: 10px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.08);
        padding: 3rem 4rem;
        margin: 0;
    }
}

/* --- 3. BENDRA EKRANŲ STILISTIKA --- */
.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;     
    width: 100%;
    height: 100%;
}

.hidden {
    display: none !important;
}

/* --- 4. START & RESULT SCREENS --- */
#start-screen, #result-screen {
    text-align: center;
}

/* --- 5. TYPOGRAPHY --- */
h1, h2 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    margin: 0 0 1rem 0;
    line-height: 1.1;
}

.game-title {
    font-size: clamp(2.5rem, 5vw, 4rem); 
    color: var(--lp-pink);
    margin-bottom: 1rem;
}

.start-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 30vh;
    object-fit: contain;
    margin: 0 auto 15px auto;
}

.subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #555;
    max-width: 600px;
    line-height: 1.5;
}

#result-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--lp-pink);
}

#result-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    max-width: 500px;
    line-height: 1.4;
}

/* --- 6. MYGTUKAI --- */
.btn {
    display: inline-block;
    background-color: var(--lp-pink);
    color: var(--lp-white);
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 12px 35px;
    border: none;
    border-radius: var(--lp-border-radius);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    margin-top: 15px;
    line-height: 1;
}

.btn:hover, .btn:active {
    background-color: var(--lp-yellow);
    color: var(--lp-black);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--lp-black);
    font-size: 1rem;
    padding: 12px 25px;
    margin-top: 10px;
}

.btn-cta {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 10px auto;
}

/* --- 7. GAME SCREEN --- */
#game-screen {
    justify-content: flex-start;
    padding-top: 1rem;
}

@media (min-width: 768px) {
    #game-screen {
        justify-content: center;
        padding-top: 0;
    }
}

.progress-container {
    width: 100%;
    text-align: center;
    flex-shrink: 0; 
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

#progress-fill {
    height: 100%;
    background-color: var(--lp-pink);
    width: 0%;
    transition: width 0.3s ease;
}

#question-count {
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
    margin: 0;
}

.quote-box {
    width: 100%;
    text-align: center;
    flex-shrink: 1; 
    flex-grow: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

#quote-text {
    font-size: clamp(1.2rem, 4vh, 2rem);
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    line-height: 1.2;
    margin: 0;
    color: #000;
}

/* --- 8. ANSWERS GRID --- */
.answers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px; 
    width: 100%;
    flex: 0 1 auto; 
    align-content: center;
    justify-content: center;
}

.answer-card {
    cursor: pointer;
    background: transparent;
    border: 3px solid transparent;
    border-radius: 10px;
    position: relative;
    
    height: auto;
    max-height: 25vh; 
    aspect-ratio: 0.75;
    
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin: 0 auto;
    
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (hover: hover) {
    .answer-card:hover {
        transform: scale(1.05); 
        z-index: 2;
    }
}

.answer-card:active {
    transform: scale(0.95);
}

.answer-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 5px 5px rgba(0,0,0,0.1));
}

.correct {
    border-color: #2ecc71 !important;
    background-color: rgba(46, 204, 113, 0.1);
}

.wrong {
    border-color: var(--lp-pink) !important;
    opacity: 0.6;
}

.disabled {
    pointer-events: none;
}

.score-circle {
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--lp-pink);
    font-family: 'Oswald', sans-serif;
    margin: 15px 0;
}

/* --- 9. MEDIA QUERIES --- */

/* MAŽI EKRANAI (iPhone SE, < 380px) */
@media (max-width: 380px) {
    .game-container { 
        padding: 1rem 0.8rem;
    }
    
    .game-title { 
        font-size: 2rem; 
    }
    
    #quote-text { 
        font-size: clamp(1rem, 3vh, 1.4rem); 
        line-height: 1.15;
    }
    
    .quote-box {
        margin-bottom: 15px;
    }

    .answers-grid {
        gap: 12px;
        width: 100%;
    }
    
    .answer-card {
        max-height: 22vh;
        width: 100%;
        aspect-ratio: 0.7; 
    }
}

/* DESKTOP (> 768px) */
@media (min-width: 768px) {
    .answers-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px; 
    }

    .answer-card {
        max-height: none; 
        height: auto;
        width: 100%;
        max-width: 180px;
    }

    #quote-text {
        font-size: 2rem;
    }
    
    .quote-box {
        margin-bottom: 40px;
    }
}

/* Labai mažiems ekranams dar labiau sumažiname */
@media (max-width: 600px) {
    .start-image {
        max-height: 25vh;
        margin-bottom: 10px;
    }
}

/* --- FIX: MOBILIŲJŲ IŠDĖSTYMAS --- */
@media (max-width: 600px) {
    body {
        align-items: flex-start !important; 
        background-color: #ffffff !important; 
        overflow: hidden !important; 
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
    }

    .game-container {
        justify-content: flex-start !important;
        padding: 5px 10px !important; 
        width: 100% !important;
        height: auto !important;
        min-height: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background-color: #ffffff !important;
    }

    #start-screen {
        justify-content: flex-start !important;
        padding-top: 0 !important;
    }
    
    .start-image {
        max-height: 22vh;
        margin-top: 0;
        margin-bottom: 10px;
    }

    .quote-box {
        margin-bottom: 10px !important;
    }
}