/* วงล้อ 3 มิติ SUANPATHUM GAMES — ใช้ร่วมกันหลายหน้า (hero และรายการแข่งขัน) */
.skp3d {
    --pink: #ff3d9a;
    --pink2: #ff7ac0;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    padding: 2.2rem 0 1.6rem;
    margin-bottom: 2.5rem;
    background:
        radial-gradient(ellipse 70% 55% at 50% 78%, rgba(255, 61, 154, .22), transparent 70%),
        radial-gradient(ellipse 60% 50% at 15% 10%, rgba(53, 94, 252, .35), transparent 70%),
        linear-gradient(180deg, #010d24 0%, #011A41 55%, #05122e 100%);
    font-family: 'Noto Sans Thai', 'Open Sans', sans-serif;
}

.skp3d-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.skp3d-head {
    text-align: center;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.skp3d-logo {
    width: 76px;
    height: auto;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .15), 0 0 28px rgba(255, 61, 154, .55);
}

.skp3d-kicker {
    margin-top: .6rem;
    font-size: .85rem;
    letter-spacing: .04em;
    color: #c9d6ff;
}

.skp3d-title {
    margin: .15rem 0 .5rem;
    font-weight: 800;
    font-size: clamp(1.5rem, 4.2vw, 2.7rem);
    line-height: 1.2;
    background: linear-gradient(90deg, #fff 20%, var(--pink2) 60%, #ffb48a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.skp3d-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .3rem .9rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .25);
}

.skp3d-badge .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #9aa7c7;
}

.skp3d-badge.is-open .dot {
    background: #35e08a;
    box-shadow: 0 0 10px #35e08a;
    animation: skp3dPulse 1.4s infinite;
}

.skp3d-badge.is-soon .dot {
    background: #ffc233;
}

.skp3d-badge.is-closed .dot {
    background: #ff6b6b;
}

@keyframes skp3dPulse {
    50% {
        opacity: .35;
    }
}

.skp3d-hero { padding-top: calc(98px + 1.4rem); }

/* เวที 3 มิติ */
.skp3d-stage {
    --cw: 320px;
    --ch: 240px;
    position: relative;
    height: calc(var(--ch) + 90px);
    margin-top: .6rem;
    perspective: 1400px;
    perspective-origin: 50% 42%;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    outline: none;
}

.skp3d-stage.is-drag {
    cursor: grabbing;
}

.skp3d-stage:focus-visible {
    box-shadow: inset 0 0 0 3px #ffbf00;
}

.skp3d-ring {
    position: absolute;
    left: 50%;
    top: 40px;
    width: var(--cw);
    height: var(--ch);
    margin-left: calc(var(--cw) / -2);
    transform-style: preserve-3d;
    will-change: transform;
}

.skp3d-card {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: #0b2150;
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7), 0 0 24px rgba(255, 61, 154, .18);
    color: #fff;
    text-decoration: none;
    display: block;
    -webkit-box-reflect: below 6px linear-gradient(transparent 70%, rgba(255, 255, 255, .16));
}

.skp3d-card img:not(.skp3d-wm) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.skp3d-card.is-info {
    padding: 1.15rem 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(150deg, var(--c1), var(--c2));
}

.skp3d-wm {
    position: absolute;
    right: -26px;
    top: -26px;
    width: 150px;
    opacity: .16;
    border-radius: 50%;
    pointer-events: none;
    filter: grayscale(1) brightness(2);
}

.skp3d-ico {
    position: absolute;
    left: 1.15rem;
    top: 1rem;
    font-size: 2.3rem;
    text-shadow: 0 4px 16px rgba(0, 0, 0, .45);
}

.skp3d-ct {
    font-weight: 800;
    font-size: 1.28rem;
    line-height: 1.25;
}

.skp3d-cs {
    margin-top: .3rem;
    font-size: .88rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, .86);
}

.skp3d-tag {
    align-self: flex-start;
    margin-top: .6rem;
    padding: .15rem .7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    font-size: .78rem;
    font-weight: 700;
}

/* แสงใต้วงล้อ + แถบเรืองแสงสีชมพู */
.skp3d-glow {
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: min(760px, 92%);
    height: 70px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(255, 61, 154, .55), transparent 70%);
    filter: blur(14px);
    pointer-events: none;
}

.skp3d-bar {
    position: relative;
    height: 4px;
    width: min(820px, 88%);
    margin: -2px auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, transparent, var(--pink) 20%, #fff 50%, var(--pink) 80%, transparent);
    box-shadow: 0 0 14px 2px var(--pink), 0 0 46px 10px rgba(255, 61, 154, .55);
    animation: skp3dBar 3.2s ease-in-out infinite alternate;
}

@keyframes skp3dBar {
    from {
        opacity: .75;
        box-shadow: 0 0 10px 1px var(--pink), 0 0 30px 6px rgba(255, 61, 154, .4);
    }

    to {
        opacity: 1;
        box-shadow: 0 0 18px 3px var(--pink), 0 0 60px 14px rgba(255, 61, 154, .65);
    }
}

.skp3d-ctrl {
    display: flex;
    justify-content: center;
    gap: .6rem;
    margin-top: 1.1rem;
    position: relative;
    z-index: 2;
}

.skp3d-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    cursor: pointer;
    transition: background .2s, box-shadow .2s, transform .2s;
}

.skp3d-btn:hover {
    background: rgba(255, 61, 154, .35);
    box-shadow: 0 0 16px rgba(255, 61, 154, .6);
    transform: translateY(-1px);
}

@media (max-width: 767px) {
    .skp3d-hero {
        padding-top: calc(58px + 1rem);
    }

    .skp3d-logo {
        width: 60px;
    }

    .skp3d-stage {
        --cw: 236px;
        --ch: 190px;
        perspective: 900px;
    }

    .skp3d-card {
        -webkit-box-reflect: unset;
    }

    .skp3d-ct {
        font-size: 1.08rem;
    }

    .skp3d-ico {
        font-size: 1.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .skp3d-bar {
        animation: none;
    }

    .skp3d-badge .dot {
        animation: none;
    }
}
    

/* ===== โหมด "arena" (วงล้อเลือกประเภทรายการแข่งขัน) ===== */
.skp3d-arena { margin-bottom: 0; padding: 4rem 0 0; }
.skp3d-arena .skp3d-head .eyebrow {
    display: inline-block; padding: .28rem 1rem; border-radius: 999px; font-size: .75rem; letter-spacing: .14em;
    text-transform: uppercase; font-weight: 700; color: #ff9ccc; background: rgba(255, 61, 154, .16); border: 1px solid rgba(255, 61, 154, .35);
}
.skp3d-arena .skp3d-title { margin-top: .6rem; }
.skp3d-hint { color: #b9c8f5; font-size: .92rem; margin: 0 0 .4rem; }
.skp3d-card.is-pick { cursor: pointer; text-align: left; font: inherit; padding: 0; }
.skp3d-card.is-pick.is-info { padding: 1.15rem 1.2rem; }
.skp3d-card.is-active { border-color: #ff7ac0; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7), 0 0 0 2px #ff3d9a, 0 0 34px rgba(255, 61, 154, .65); }
.skp3d-more { margin-top: .6rem; align-self: flex-start; font-size: .8rem; font-weight: 700; color: #fff; opacity: .9; }
.skp3d-more i { margin-left: .3rem; }

.arena-tabs { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 1.2rem auto 0; padding: 0 1rem; max-width: 900px; position: relative; z-index: 2; }
.arena-tab {
    border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .07); color: #e6ecff; border-radius: 999px;
    padding: .4rem 1rem; font-weight: 600; font-size: .9rem; cursor: pointer; transition: .2s;
}
.arena-tab:hover { background: rgba(255, 61, 154, .25); }
.arena-tab[aria-selected="true"] { background: linear-gradient(135deg, #ff3d9a, #E93C05); border-color: transparent; color: #fff; box-shadow: 0 8px 22px -8px rgba(255, 61, 154, .8); }
.arena-tab .n { opacity: .8; font-weight: 500; margin-left: .35rem; }

.arena-panels { position: relative; z-index: 3; margin-top: 2rem; padding-bottom: 4rem; }
.arena-panel {
    background: #fff; color: #1b2540; border-radius: 26px; padding: 1.4rem 1.4rem 1.6rem;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .6);
    animation: arenaIn .45s ease both;
}
.arena-panel[hidden] { display: none; }
@keyframes arenaIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
.arena-ph { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px dashed #dfe5f6; }
.arena-ph .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 1.4rem; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 10px 22px -10px var(--c1); }
.arena-ph h3 { margin: 0; font-size: 1.35rem; font-weight: 800; color: #0b1b3f; }
.arena-ph small { color: #5a6b86; display: block; }
.arena-ph .grow { flex: 1 1 180px; }
.arena-ph a.all { font-weight: 700; font-size: .9rem; color: #355EFC; text-decoration: none; }
.arena-search { position: relative; flex: 0 1 260px; }
.arena-search input { width: 100%; border: 1.5px solid #d9e0f3; border-radius: 999px; padding: .45rem 1rem .45rem 2.3rem; font-size: .92rem; }
.arena-search input:focus { outline: none; border-color: #355EFC; box-shadow: 0 0 0 4px rgba(53, 94, 252, .15); }
.arena-search i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #8a97b6; }
.arena-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .9rem; }
.arena-grid .skp-item {
    border: 1px solid #e6ebf8; border-radius: 16px; padding: 1rem 1.1rem; background: linear-gradient(180deg, #fff, #f8faff);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.arena-grid .skp-item:hover { transform: translateY(-3px); border-color: #ffb3d7; box-shadow: 0 16px 30px -18px rgba(255, 61, 154, .55); }
.arena-grid .skp-item .code { display: inline-block; font-weight: 800; font-size: .78rem; letter-spacing: .06em; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); border-radius: 8px; padding: .12rem .55rem; margin-right: .5rem; }
.arena-empty { text-align: center; color: #5a6b86; padding: 2rem 1rem; display: none; }
.arena-empty.show { display: block; }

@media (max-width: 767px) {
    .skp3d-arena { padding-top: 3rem; }
    .arena-panel { border-radius: 20px; padding: 1.1rem 1rem 1.3rem; }
    .arena-grid { grid-template-columns: 1fr; }
}

/* ===== เพิ่มความว้าวให้การ์ดข้อมูล/คณะสี ===== */
.skp3d-card.is-info { overflow: hidden; border: 1px solid rgba(255, 255, 255, .28); box-shadow: 0 18px 40px -14px var(--c1), inset 0 0 60px rgba(255, 255, 255, .06); }
.skp3d-card.is-info::before { content: ""; position: absolute; inset: -40% -60%; background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, .26) 50%, transparent 58%); transform: translateX(-60%); animation: skp3dShine 5.5s ease-in-out infinite; pointer-events: none; }
.skp3d-card.is-info::after { content: ""; position: absolute; left: 50%; top: 18%; width: 150px; height: 150px; margin-left: -75px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .38), transparent); filter: blur(6px); pointer-events: none; }
.skp3d-card.is-info .skp3d-ico { left: 50%; top: 20%; transform: translateX(-50%); font-size: 3.6rem; z-index: 1; text-shadow: 0 6px 22px rgba(0, 0, 0, .5), 0 0 26px rgba(255, 255, 255, .55); animation: skp3dFloat 4.2s ease-in-out infinite; }
.skp3d-card.is-info .skp3d-ct, .skp3d-card.is-info .skp3d-cs, .skp3d-card.is-info .skp3d-tag { position: relative; z-index: 1; }
.skp3d-card.is-info .skp3d-tag { background: rgba(255, 255, 255, .28); backdrop-filter: blur(4px); }
@keyframes skp3dShine { 0%, 55% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
@keyframes skp3dFloat { 50% { transform: translate(-50%, -8px); } }
@media (prefers-reduced-motion: reduce) { .skp3d-card.is-info::before, .skp3d-card.is-info .skp3d-ico { animation: none; } }
