* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background-color: #000;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'serif';
}

#loader {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    background-size: cover;
    background-position: center;
}

.dragon-eyes-container {
    position: relative;
    display: flex;
    gap: 100px;
    perspective: 1000px;
}

.eye-wrap {
    position: relative;
    width: 200px;
    height: 90px;
    background: #000;
    border-radius: 100% 0%;
    border: 4px solid #3d1a00;
    overflow: hidden;
    filter: drop-shadow(0 0 40px rgba(255, 60, 0, 0.4));
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.eye-wrap.left { transform: rotate(45deg); }
.eye-wrap.right { transform: scaleX(-1) rotate(45deg); }

/* --- PÀRPECS --- */
.lid-top, .lid-bottom {
    position: absolute;
    left: -50%;
    width: 200%; 
    height: 50%;
    background: #0a0500;
    z-index: 10;
    transition: transform 0.3s ease-in-out;
    pointer-events: none;
}
.lid-top { top: 0; transform: translateY(-100%); border-bottom: 1px solid #441100; }
.lid-bottom { bottom: 0; transform: translateY(100%); border-top: 1px solid #441100; }

.eye-wrap.closed .lid-top, .eye-wrap.blinking .lid-top { transform: translateY(0) !important; }
.eye-wrap.closed .lid-bottom, .eye-wrap.blinking .lid-bottom { transform: translateY(0) !important; }

.iris {
    position: absolute;
    top: 50%; left: 50%;
    width: 130px; height: 130px;
    background: radial-gradient(circle, #fff 0%, #ffcc00 20%, #ff6600 40%, #802200 70%, #200a00 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    box-shadow: 0 0 30px #ff3c00;
    animation: magmaPulse 4s ease-in-out infinite;
}

@keyframes magmaPulse {
    0%, 100% { filter: saturate(1.1) brightness(1); transform: translate(-50%, -50%) rotate(-45deg) scale(1); }
    50% { filter: saturate(1.6) brightness(1.3); transform: translate(-50%, -50%) rotate(-40deg) scale(1.1); }
}

.pupil {
    position: absolute;
    top: 50%; left: 50%;
    width: 10px; height: 90px;
    background: #000;
    border-radius: 100%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.shake { animation: earthquake 0.4s linear infinite; }
@keyframes earthquake {
    0% { transform: translate(3px, 3px); }
    50% { transform: translate(-5px, -2px); }
    100% { transform: translate(0, 0); }
}

.hint {
    margin-top: 80px;
    color: #5a2a00;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 12px;
    animation: pulseText 3s infinite;
    z-index: 20;
}

@keyframes pulseText {
    0%, 100% { opacity: 0.3; transform: scale(0.95); }
    50% { opacity: 1; color: #ff9900; text-shadow: 0 0 20px #ff6600; }
}

/* --- LANGUAGE SELECTION --- */
.lang-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(20, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(153, 102, 102, 0.4);
    padding: 3rem 4rem;
    border-radius: 2rem;
    box-shadow: 0 0 40px rgba(0,0,0,0.8), inset 0 0 20px rgba(153,102,102,0.1);
    z-index: 100;
}

.lang-title {
    color: #996666;
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-align: center;
    text-shadow: 0 0 10px rgba(153,102,102,0.5);
    margin-top: 0;
}

.flags-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.flag-btn {
    background: linear-gradient(145deg, rgba(68,1,80,0.6), rgba(44,0,51,0.6));
    border: 1px solid rgba(153,102,102,0.3);
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 160px;
}

.flag-btn:hover {
    transform: translateY(-10px) scale(1.05);
    background: linear-gradient(145deg, rgba(153,102,102,0.8), rgba(68,1,80,0.8));
    border-color: #9f543e;
    box-shadow: 0 15px 30px rgba(0,0,0,0.6), 0 0 20px rgba(153,102,102,0.4);
}

.flag-btn img {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s;
}

.flag-btn:hover img {
    transform: scale(1.1);
}

.flag-btn span {
    color: #fff;
    font-size: 1.2rem;
    font-family: sans-serif;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    text-transform: uppercase;
}