/* =========================================================
   BLOQUEO TOTAL DE ADAPTACIÓN DE COLOR DEL SISTEMA
   ========================================================= */
html {
    color-scheme: light !important;
}

body {
    background-color: #0f0f0f !important;
    color: #000;
    margin: 0;
    font-family: 'Mountains of Christmas', cursive;
    height: 100vh;
    overflow: hidden;
    overscroll-behavior: none;
}

/* Evita que Android / iOS modifiquen colores */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    forced-color-adjust: none;
    -webkit-text-fill-color: initial;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   VARIABLES DE COLOR (EXPLÍCITAS)
   ========================================================= */
:root {
    --green: #89c926;
    --dark-green: #5a8d1b;
    --red: #e62225;
    --yellow: #fcd93b;
}

/* =========================================================
   CANVAS NIEVE
   ========================================================= */
canvas {
    position: fixed;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    background: transparent;
}

/* =========================================================
   INTRO
   ========================================================= */
#intro-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, #2a2a2a, #000);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 15;
    transition: opacity .6s;
}

.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* =========================================================
   REGALO
   ========================================================= */
.gift-container {
    position: relative;
    cursor: pointer;
    animation: shake 2.5s infinite;
    transform: scale(1.02);
}

.gift-box-bottom {
    width: 124px;
    height: 104px;
    background: var(--red);
    border-radius: 0 0 15px 15px;
    box-shadow: 0 9px 26px rgba(230, 34, 37, .7);
}

.gift-lid {
    position: absolute;
    top: -30px;
    left: -11px;
    width: 146px;
    height: 40px;
    background: var(--red);
    border-radius: 9px;
    box-shadow: 0 7px 17px rgba(0,0,0,.4);
    z-index: 2;
}

.ribbon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 100%;
    background: var(--green);
}

.bow {
    position: absolute;
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    width: 62px;
    height: 32px;
}

.bow::before,
.bow::after {
    content: "";
    position: absolute;
    width: 32px;
    height: 32px;
    border: 5px solid var(--green);
    border-radius: 50% 50% 0 50%;
}

.bow::after {
    right: 0;
    transform: scaleX(-1);
}

.tap-text {
    margin-top: 56px;
    font-size: 1.7rem;
    color: var(--green);
    animation: pulse 1s infinite alternate;
}

/* APERTURA */
.opening .gift-lid {
    animation: lidFly .7s forwards cubic-bezier(.2,.8,.3,1.2);
}

.opening .gift-box-bottom {
    animation: boxDrop .6s forwards ease-in;
}

/* =========================================================
   INVITACIÓN
   ========================================================= */
#main-card {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5;
    justify-content: center;
    align-items: center;
}

.card {
    width: 92%;
    max-width: 380px;
    background: linear-gradient(160deg, #9fe23a, #7fbf1f);
    border: 4px solid #000;
    border-radius: 26px 220px 34px 240px / 240px 34px 210px 26px;
    box-shadow: 11px 11px 0 #000;
    padding: 20px;
    transform: scale(.92);
    opacity: 0;
    position: relative;
}

#main-card.show .card {
    animation: cardIn .55s cubic-bezier(.25,.9,.35,1) forwards;
}

.inner {
    border: 3px dashed #000;
    padding: 20px 16px 24px;
    background: rgba(255,255,255,.15);
    text-align: center;
}

/* =========================================================
   OJOS
   ========================================================= */
.eyes {
    display: flex;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    transform: translateY(-9px);
}

#main-card.show .eyes {
    animation: fadeUp .35s .15s forwards;
}

.eye {
    width: 48px;
    height: 30px;
    background: var(--yellow);
    border: 3px solid #000;
    border-radius: 0 100% 0 100%;
    position: relative;
    overflow: hidden;
}

.eye:last-child {
    transform: scaleX(-1);
}

.eye::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--yellow);
    transform-origin: center top;
    transform: scaleY(0);
    animation: blink 6s infinite;
}

.pupil {
    width: 4px;
    height: 20px;
    background: #b00000;
    position: absolute;
    left: 50%;
    top: 55%;
    transform: translate(-50%,-50%);
}

#main-card.show .pupil {
    animation: lookAround 7s 1.4s infinite ease-in-out;
}

.brow {
    position: absolute;
    top: -10px;
    width: 100%;
    height: 13px;
    background: #000;
}

/* =========================================================
   TEXTO
   ========================================================= */
h3 {
    margin: 5px 0;
    font-size: 1.2rem;
    opacity: 0;
    transform: translateY(9px);
}

#main-card.show h3 {
    animation: fadeUp .35s .32s forwards;
}

h1 {
    font-size: 4.5rem;
    margin: 7px 0;
    color: var(--red);
    text-shadow: 2px 2px #fff, 4px 4px #000;
    opacity: 0;
    transform: scale(.65);
}

#main-card.show h1 {
    animation: nameIn .45s .55s forwards;
}

.age {
    background: var(--red);
    color: #fff;
    padding: 9px 24px;
    border: 3px solid #000;
    border-radius: 50px;
    margin: 12px 0;
    font-size: 1.8rem;
    opacity: 0;
    transform: translateY(-7px);
}

#main-card.show .age {
    animation: fadeDown .35s .72s forwards;
}

/* =========================================================
   NOTA
   ========================================================= */
.note {
    background: #fff3c4;
    border: 3px solid #000;
    padding: 16px;
    margin-top: 14px;
    transform: rotate(-1deg) scale(.94);
    opacity: 0;
}

#main-card.show .note {
    animation: noteIn .45s .95s forwards;
}

.detail {
    font-size: 1.4rem;
    color: #000;
}

.detail span {
    display: block;
    font-weight: 700;
}

.stamp {
    margin-top: 12px;
    background: var(--red);
    color: #fff;
    padding: 7px 12px;
    display: inline-block;
    border: 3px solid #000;
    transform: rotate(-4deg);
}

/* =========================================================
   SONRISA
   ========================================================= */
.grinch-smile {
    width: 90px;
    height: 42px;
    border-bottom: 6px solid var(--dark-green);
    border-radius: 0 0 90px 90px;
    margin: 24px auto 0;
    transform: scaleX(0);
}

#main-card.show .grinch-smile {
    animation: smileIn .45s 1.25s forwards;
}

/* =========================================================
   LUCES
   ========================================================= */
.lights {
    position: relative;
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 10px 10px 0;
}

.lights::before {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    top: 10px;
    height: 3px;
    background: #1a1a1a;
    border-radius: 50%;
}

.lights span {
    width: 12px;
    height: 14px;
    border-radius: 50% 50% 45% 45%;
    background: #fcd93b;
    box-shadow: 0 0 6px rgba(255,255,255,.7);
    animation: twinkle 2.2s infinite ease-in-out;
}

.lights span:nth-child(3n) { background: #e62225; }
.lights span:nth-child(4n) { background: #89c926; }

/* =========================================================
   ANIMACIONES
   ========================================================= */
@keyframes cardIn { to { opacity: 1; transform: scale(1); } }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeDown { to { opacity: 1; transform: translateY(0); } }
@keyframes nameIn { to { opacity: 1; transform: scale(1); } }
@keyframes noteIn { to { opacity: 1; transform: rotate(-1deg) scale(1); } }
@keyframes smileIn { to { transform: scaleX(1); } }

@keyframes blink {
    0%,92%,100% { transform: scaleY(0); }
    94%,96% { transform: scaleY(1); }
}

@keyframes lookAround {
    0%,100% { transform: translate(-50%,-50%); }
    40% { transform: translate(-60%,-50%); }
    60% { transform: translate(-40%,-50%); }
}

@keyframes shake {
    20% { transform: rotate(3deg); }
    40% { transform: rotate(-3deg); }
    60% { transform: rotate(4deg); }
    80% { transform: rotate(-4deg); }
}

@keyframes pulse { to { opacity: .6; } }

@keyframes lidFly {
    to { transform: translateY(-220px) rotate(-35deg); opacity: 0; }
}

@keyframes boxDrop {
    to { transform: translateY(180px) scale(.85); opacity: 0; }
}

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 360px) {
    h1 { font-size: 3.8rem; }
    .age { font-size: 1.5rem; }
}
