/* =========================================================
   SURVIVOR S51 — RULES PAGE
========================================================= */

.rules-wrap{
    max-width:1100px;
    margin:0 auto;
    padding:0 14px 24px;
    text-align:center;
}


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

.rules-hero{
    max-width:1100px;
    margin:0 auto 18px;
    border:1px solid var(--line);
    border-radius:var(--radius);
    overflow:hidden;
    box-shadow:var(--shadow);
    background:#0b1220;
}

.rules-hero img{
    width:100%;
    height:auto;
    display:block;
    aspect-ratio:16 / 7;
    object-fit:cover;
    background:#000;
}


/* =========================================================
   TITLES
========================================================= */

.rules-title{
    font-size:clamp(28px,5vw,44px);
    margin:18px 0 8px;
    letter-spacing:.02em;
    font-weight:1000;
}

.rules-heading{
    font-size:clamp(22px,4.5vw,32px);
    margin-top:26px;
    margin-bottom:10px;
    font-weight:1000;
}


/* =========================================================
   SCORING TABLE
========================================================= */

.table-wrap{
    max-width:1000px;
    margin:0 auto 24px;
    padding:0 8px;
    overflow-x:auto;
}

.rules-table{
    width:100%;
    max-width:1000px;
    margin:0 auto;
    border-collapse:collapse;
    font-size:1em;
    border:1px solid var(--line);
    border-radius:var(--radius);
    overflow:hidden;
    box-shadow:var(--shadow);
    background:linear-gradient(180deg,#0f1d34,#0b162b);
}

.rules-table th,
.rules-table td{
    border-bottom:1px solid var(--line);
    padding:12px 14px;
    text-align:center;
}

.rules-table th{
    background:
        linear-gradient(
            180deg,
            rgba(0,224,216,.28),
            rgba(0,224,216,.12)
        );

    color:#eaffff;
    font-weight:1000;
    letter-spacing:.12em;
    text-transform:uppercase;
    font-size:14px;
    padding:16px 14px;
}

.rules-table tr:nth-child(even){
    background-color:rgba(13,26,51,.7);
}


/* =========================================================
   POINT PILLS
========================================================= */

.pts{
    display:inline-block;
    background:var(--teal);
    color:#062127;
    font-weight:1000;
    padding:2px 10px;
    border-radius:999px;
    font-size:.95rem;
    white-space:nowrap;
    margin:0 4px;
    box-shadow:0 10px 22px rgba(0,0,0,.35);
}

.payout{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    padding:2px 0;
}

.payout .score-pill{
    display:inline-block;
    background:var(--teal);
    color:#062127;
    font-weight:1000;
    padding:6px 12px;
    border-radius:999px;
    box-shadow:0 10px 22px rgba(0,0,0,.35);
    border:2px solid rgba(6,33,39,.35);
    letter-spacing:.02em;
    white-space:nowrap;
    max-width:100%;
}


/* =========================================================
   RULE SECTIONS
========================================================= */

.section-card{
    max-width:1100px;
    margin:14px auto;
    border:1px solid var(--line);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    background:linear-gradient(180deg,#0f1d34,#0b162b);
    padding:16px 14px;
}

.kicker{
    display:block;
    font-weight:1000;
    letter-spacing:.10em;
    text-transform:uppercase;
    color:#cfefff;
    margin-bottom:10px;
    font-size:clamp(16px,3.7vw,20px);
}


/* =========================================================
   RULE LINES
========================================================= */

.center-lines{
    max-width:880px;
    margin:0 auto;
    display:flex;
    flex-direction:column;
    gap:8px;
    align-items:center;
}

.line{
    width:100%;
    max-width:740px;
    background:rgba(11,18,32,.80);
    border:1px solid var(--line2);
    border-radius:14px;
    padding:10px 12px;
    box-shadow:0 10px 22px rgba(0,0,0,.35);
    font-weight:900;
    letter-spacing:.01em;
}

.subline{
    width:100%;
    max-width:740px;
    color:var(--muted);
    font-weight:800;
    margin-top:2px;
    font-size:13px;
    letter-spacing:.02em;
}

.section-note{
    margin:10px auto 0;
}


/* =========================================================
   BULLET CARDS
========================================================= */

.bullets{
    max-width:740px;
    margin:0 auto;
    display:flex;
    flex-direction:column;
    gap:8px;
    align-items:center;
}

.bullets .b{
    width:100%;
    background:rgba(11,18,32,.80);
    border:1px solid var(--line2);
    border-radius:14px;
    padding:10px 12px;
    font-weight:1000;
    box-shadow:0 10px 22px rgba(0,0,0,.35);
}


/* =========================================================
   GOOD LUCK
========================================================= */

.rules-good-luck{
    margin-top:18px;
    font-weight:1000;
    letter-spacing:.02em;
}


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

.footer-gif{
    max-width:900px;
    margin:24px auto 0;
    padding:16px;
    border:1px solid var(--line);
    border-radius:var(--radius);
    background:rgba(11,18,32,.80);
    box-shadow:var(--shadow);
}

.footer-gif img{
    max-width:100%;
    height:auto;
    border-radius:12px;
    display:inline-block;
    border:1px solid var(--line2);
}


/* =========================================================
   RANDOM GOOD LUCK FLASH
========================================================= */

.luck-flash{
    max-width:900px;
    margin:18px auto 0;
    min-height:42px;

    display:flex;
    align-items:center;
    justify-content:center;

    font-weight:1000;
    letter-spacing:.12em;
    text-transform:uppercase;

    color:var(--gold);

    opacity:0;
    transform:scale(.96);

    text-shadow:
        0 0 8px rgba(255,213,74,.85),
        0 0 18px rgba(255,213,74,.65),
        0 0 34px rgba(255,213,74,.45);

    animation:luckSpark 10s infinite;

    pointer-events:none;
}

.luck-flash::before,
.luck-flash::after{
    content:'✦';
    margin:0 12px;
    color:#fff4b8;
    text-shadow:0 0 14px rgba(255,213,74,.95);
}

@keyframes luckSpark{

    0%,
    70%,
    100%{
        opacity:0;
        transform:scale(.96);
        filter:brightness(1);
    }

    76%,
    90%{
        opacity:1;
        transform:scale(1);
        filter:brightness(1.45);
    }

    83%{
        opacity:1;
        transform:scale(1.04);
        filter:brightness(1.9);
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media(max-width:700px){

    .rules-wrap{
        padding-left:9px;
        padding-right:9px;
    }

    .table-wrap{
        padding:0;
    }

    .rules-table th,
    .rules-table td{
        padding:10px 8px;
        font-size:13px;
    }

    .rules-table th{
        font-size:11px;
        padding:13px 8px;
    }

    .section-card{
        padding:14px 10px;
    }

    .line,
    .bullets .b{
        padding:10px;
        font-size:14px;
    }

    .luck-flash{
        font-size:12px;
        letter-spacing:.08em;
    }

    .luck-flash::before,
    .luck-flash::after{
        margin:0 6px;
    }

}


/* =========================================================
   SAFE AREA
========================================================= */

@supports(padding:max(0px)){

    .rules-wrap{
        padding-left:
            max(
                14px,
                env(safe-area-inset-left)
            );

        padding-right:
            max(
                14px,
                env(safe-area-inset-right)
            );

        padding-bottom:
            max(
                20px,
                env(safe-area-inset-bottom)
            );
    }

}