:root{
    --bg:#080b12;
    --panel:#111622;
    --panel2:#171d2b;
    --text:#f6f7fb;
    --muted:#9ba5b7;
    --accent:#7c5cff;
    --accent2:#b855ff;
    --green:#29d391;
    --line:#252d3c;
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    background:radial-gradient(
        circle at 70% 0,
        #19122f 0,
        #080b12 36%
    );
    color:var(--text);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        Segoe UI,
        sans-serif;
}

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


/* =========================================
   HEADER
========================================= */

header{
    height:72px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    max-width:1160px;
    margin:auto;
    padding:0 24px;
    border-bottom:1px solid #ffffff0d;
}

.brand{
    font-weight:900;
    letter-spacing:1px;
}

nav{
    display:flex;
    align-items:center;
    gap:22px;
    color:#c5ccda;
    font-size:14px;
}


/* =========================================
   BOTONES
========================================= */

.btn{
    display:inline-flex;
    justify-content:center;
    align-items:center;
    border:0;
    border-radius:12px;
    background:linear-gradient(
        135deg,
        var(--accent),
        var(--accent2)
    );
    color:white;
    font-weight:800;
    padding:14px 20px;
    cursor:pointer;
}

.small{
    padding:10px 14px;
}

.full{
    width:100%;
    margin-top:20px;
}


/* =========================================
   CONTENIDO GENERAL
========================================= */

main{
    max-width:1160px;
    margin:auto;
    padding:0 24px;
}


/* =========================================
   HERO
========================================= */

.hero{
    min-height:510px;
    display:grid;
    grid-template-columns:1.2fr .8fr;
    align-items:center;
    gap:60px;
}

.hero h1{
    font-size:64px;
    line-height:.98;
    margin:16px 0;
}

.hero h1 em{
    font-style:normal;
    color:#9c7cff;
}

.hero p{
    color:var(--muted);
    max-width:650px;
    font-size:18px;
    line-height:1.6;
}

.pill,
.eyebrow{
    font-size:12px;
    font-weight:900;
    letter-spacing:1.5px;
    color:#a991ff;
}


/* =========================================
   HERO CARD
========================================= */

.hero-card{
    background:linear-gradient(
        145deg,
        #191f30,
        #101521
    );
    border:1px solid var(--line);
    padding:36px;
    border-radius:28px;
    box-shadow:0 25px 70px #0007;
    display:flex;
    flex-direction:column;
    gap:12px;
}

.gift{
    font-size:92px;
    text-align:center;
    padding:28px;
}

.hero-card strong{
    font-size:22px;
}

.hero-card small{
    color:var(--muted);
    line-height:1.5;
}


/* =========================================
   TÍTULOS DE SECCIONES
========================================= */

.section-title{
    display:flex;
    justify-content:space-between;
    align-items:end;
}

.section-title h2,
.how h2{
    font-size:36px;
    margin:8px 0 22px;
}


/* =========================================
   GRID DE SORTEOS
========================================= */

.grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:20px;
}


/* =========================================
   TARJETAS
========================================= */

.card{
    position:relative;
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:22px;
    padding:24px;

    /*
       IMPORTANTE:
       evita que contenido largo
       expanda la tarjeta.
    */
    min-width:0;
    max-width:100%;
    overflow:hidden;
}


/* =========================================
   PREMIO
========================================= */

.prize{
    height:150px;
    display:grid;
    place-items:center;
    font-size:80px;
    background:linear-gradient(
        145deg,
        #191f2d,
        #0d111b
    );
    border-radius:16px;
    margin-bottom:18px;
}


/* =========================================
   ESTADO
========================================= */

.status{
    font-size:11px;
    color:var(--green);
    font-weight:900;
}


/* =========================================
   TÍTULO DEL SORTEO

   REDUCIDO Y CORREGIDO PARA QUE
   NUNCA SE SALGA DE LA TARJETA
========================================= */

.card h3{
    font-size:16px;
    line-height:1.25;
    font-weight:700;

    margin:10px 0;

    width:100%;
    max-width:100%;
    min-width:0;

    white-space:normal;

    overflow-wrap:anywhere;
    word-wrap:break-word;
    word-break:break-word;

    overflow:hidden;
}


/* =========================================
   TEXTO DE TARJETAS
========================================= */

.card p{
    color:var(--muted);
    min-height:44px;

    max-width:100%;

    overflow-wrap:anywhere;
    word-break:break-word;
}


/* =========================================
   PROGRESO
========================================= */

.progress-head{
    display:flex;
    justify-content:space-between;
    font-size:13px;
    margin-top:22px;
}

.progress{
    height:9px;
    background:#252b39;
    border-radius:10px;
    overflow:hidden;
    margin-top:9px;
}

.progress i{
    display:block;
    height:100%;
    background:linear-gradient(
        90deg,
        var(--accent),
        var(--accent2)
    );
    border-radius:10px;
}


/* =========================================
   CÓMO FUNCIONA
========================================= */

.how{
    padding:100px 0;
}

.steps{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
}

.steps>div{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:18px;
    padding:22px;

    min-width:0;
}

.steps b{
    display:grid;
    place-items:center;
    width:34px;
    height:34px;
    background:#7255ee;
    border-radius:10px;
}

.steps p,
.notice{
    color:var(--muted);
    line-height:1.55;
}


/* =========================================
   AVISOS
========================================= */

.notice{
    margin-top:22px;
    padding:18px 20px;
    border:1px solid #5846a5;
    background:#16132a;
    border-radius:14px;
}

.notice strong{
    color:white;
}


/* =========================================
   FOOTER
========================================= */

footer{
    text-align:center;
    color:#697386;
    padding:30px;
    border-top:1px solid #151a25;
}


/* =========================================
   FORMULARIOS
========================================= */

.form-wrap{
    max-width:560px;
    margin:60px auto;
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:22px;
    padding:30px;
}

.form-wrap h1{
    margin-top:0;
}

.field{
    margin:14px 0;
}

.field label{
    display:block;
    font-size:13px;
    color:#bac2d0;
    margin-bottom:7px;
}

.field input,
.field select,
.field textarea{
    width:100%;
    padding:13px 14px;
    border-radius:10px;
    border:1px solid #30394a;
    background:#0c1019;
    color:white;
}


/* =========================================
   ERRORES
========================================= */

.error{
    background:#351820;
    color:#ffb5c1;
    padding:12px;
    border-radius:10px;
}


/* =========================================
   PÁGINA DE VIDEO
========================================= */

.watch-layout{
    display:grid;
    grid-template-columns:minmax(0,1.5fr) minmax(280px,.5fr);
    gap:22px;
    padding:42px 0;
}

.video{
    aspect-ratio:16/9;
    background:#000;
    border-radius:18px;
    overflow:hidden;
}

.video iframe{
    width:100%;
    height:100%;
    border:0;
}


/* =========================================
   CRONÓMETRO
========================================= */

.timerbox{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:18px;
    padding:24px;
    height:max-content;

    min-width:0;
}

.timer{
    font-size:50px;
    font-weight:900;
    text-align:center;
    margin:16px 0;
}


/* =========================================
   ADVERTENCIA
========================================= */

.warning{
    background:#2c2111;
    border:1px solid #6e5321;
    color:#ffd98a;
    padding:14px;
    border-radius:12px;
    font-size:13px;
    line-height:1.5;

    overflow-wrap:anywhere;
}


/* =========================================
   ÉXITO
========================================= */

.success{
    background:#112d24;
    border:1px solid #24664f;
    color:#9ff2d2;
    padding:14px;
    border-radius:12px;
}


/* =========================================
   DASHBOARD
========================================= */

.dash-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
}

.stat{
    background:var(--panel);
    border:1px solid var(--line);
    padding:22px;
    border-radius:18px;

    min-width:0;

    overflow:hidden;

    overflow-wrap:anywhere;
    word-break:break-word;
}

.stat b{
    font-size:30px;
}


/* =========================================
   TABLA ADMIN
========================================= */

.admin-table{
    width:100%;
    border-collapse:collapse;
    background:var(--panel);
    border-radius:14px;
    overflow:hidden;
}

.admin-table th,
.admin-table td{
    padding:12px;
    border-bottom:1px solid var(--line);
    text-align:left;
    font-size:13px;
}


/* =========================================
   TABLET / CELULAR
========================================= */

@media(max-width:800px){

    nav a:not(.btn){
        display:none;
    }


    .hero{
        grid-template-columns:1fr;
        min-height:auto;
        padding:60px 0;
    }


    .hero h1{
        font-size:46px;
    }


    .hero-card{
        display:none;
    }


    .grid,
    .steps,
    .dash-grid{
        grid-template-columns:1fr;
    }


    .watch-layout{
        grid-template-columns:1fr;
    }


    .how{
        padding:70px 0;
    }


    .timer{
        font-size:42px;
    }


    /*
       TÍTULO DEL SORTEO
       MÁS PEQUEÑO EN CELULAR
    */

    .card h3{
        font-size:15px;
        line-height:1.25;

        width:100%;
        max-width:100%;

        white-space:normal;

        overflow-wrap:anywhere;
        word-break:break-word;

        overflow:hidden;
    }

}


/* =========================================
   CELULARES PEQUEÑOS
========================================= */

@media(max-width:480px){

    header{
        padding:0 16px;
    }


    main{
        padding:0 16px;
    }


    .card{
        padding:18px;
    }


    .card h3{
        font-size:14px;
        line-height:1.3;
    }


    .prize{
        height:125px;
        font-size:65px;
    }


    .timerbox{
        padding:18px;
    }


    .timer{
        font-size:38px;
    }


    .stat{
        padding:18px;
    }

}

/* ===== CORRECCIÓN DEFINITIVA TÍTULOS ===== */

.card h3,
.card .raffle-title,
h3.raffle-title{
    display:block !important;

    font-size:12px !important;
    line-height:1.25 !important;

    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;

    margin:8px 0 !important;
    padding:0 !important;

    white-space:normal !important;

    overflow-wrap:anywhere !important;
    word-wrap:break-word !important;
    word-break:break-word !important;

    overflow:hidden !important;

    box-sizing:border-box !important;
}

.card,
.raffle-card{
    min-width:0 !important;
    max-width:100% !important;
    overflow:hidden !important;
}

.grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    min-width:0 !important;
}

@media(max-width:800px){

    .grid{
        grid-template-columns:1fr !important;
    }

    .card h3,
    .card .raffle-title,
    h3.raffle-title{
        font-size:11px !important;
    }
}
/* Imagen real del premio en las tarjetas públicas */
.prize .prize-image{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
    object-position:center;
}
