/* =========================================================
   🎮 LOL SCRIM - CASUAL & SPORTY MATCH APP STYLE (FINAL FULL)
   ========================================================= */

:root {
    /* 1. 컬러 시스템 */
    --bg-base: #f4f7fb;
    --bg-panel: rgba(255, 255, 255, 0.88);
    --bg-card: #f8fbff;
    --border-dim: rgba(148, 163, 184, 0.18);
    --text-bright: #0f172a;
    --text-main: #334155;
    --text-muted: #64748b;
    --blue-main: #2563eb;
    --blue-glow: #60a5fa;
    --coral-match: #ef4444;
    --orange-warn: #f59e0b;

    /* 폼·카드 서피스 (라이트 UI / 애드센스 배경과 톤 맞춤) */
    --surface-input: #ffffff;
    --input-border: rgba(148, 163, 184, 0.42);
    --input-placeholder: #94a3b8;
    --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.14);
    --surface-chip: rgba(248, 251, 255, 0.98);
    --surface-muted: rgba(241, 245, 249, 0.9);
    
    /* 2. 폰트 */
    --font-sport: 'Outfit', sans-serif;
    --font-kr: 'Pretendard', sans-serif;

    /* 네이티브 폼 컨트롤 라이트 톤 유도 */
    color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    background: linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
    color: var(--text-main); 
    font-family: var(--font-kr);
    line-height: 1.6; 
    position: relative;
}

/* 🌌 도트 패턴 배경 */
.dot-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background-image: radial-gradient(rgba(96, 165, 250, 0.18) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: .75;
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 유틸리티 & 애니메이션 */
.text-blue { color: var(--blue-glow); }
.text-coral { color: var(--coral-match); }
.text-muted { color: var(--text-muted); }
.text-alert { color: var(--orange-warn); }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-10 { margin-bottom: 10px; }
.full-width { width: 100%; }

/* 대시보드 유틸 클래스 */
.bg-blue-dim { background: rgba(59,130,246,0.12); }
.bg-coral-dim { background: rgba(255,71,87,0.12); }
.bg-alert-dim { background: rgba(245,158,11,0.14); }
.bg-blue { background: var(--blue-main); border-color: var(--blue-main); }
.bg-coral { background: var(--coral-match); border-color: var(--coral-match); }
.bg-muted { background: #334155; border-color: #334155; }
.border-active { border-color: rgba(255,71,87,0.45); }
.border-coral { border: 1px solid rgba(255,71,87,0.5); }
.pulse { animation: pulse 1.2s infinite ease-in-out; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

.blink { animation: blink 1.5s infinite ease-in-out; }
/* 🔴 진짜 방송국 느낌의 LIVE 깜빡임 (부드러운 레드 펄스) */
@keyframes blink {
    0%, 100% { 
        opacity: 1; 
        color: var(--coral-match); 
        text-shadow: 0 0 8px rgba(255, 71, 87, 0.8); 
    }
    50% { 
        opacity: 0.3; 
        color: var(--coral-match); 
        text-shadow: none; 
    }
}
.badge-live {
    background-color: rgba(255, 71, 87, 0.15); 
    color: var(--coral-match);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 800;
    animation: blink 1.5s infinite ease-in-out; 
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 스크림 진행중 뱃지: 진행감(펄스+글로우) */
.my-scrim-schedule-badge.is-playing,
.scrim-status-badge.playing,
.match-playing .badge-live {
    animation: scrimLivePulse 1.25s infinite ease-in-out;
}
@keyframes scrimLivePulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 0 0 rgba(34,197,94,0);
        filter: saturate(1);
    }
    50% {
        transform: translateY(-1px);
        box-shadow: 0 0 16px rgba(34,197,94,0.28);
        filter: saturate(1.35);
    }
}

/* 스크림 종료 유도 가이드 배너 */
.scrim-complete-guide {
    border-radius: 16px;
    border: 1px solid rgba(34,197,94,.22);
    background: linear-gradient(180deg, rgba(34,197,94,.10), rgba(255,255,255,.02));
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.scrim-complete-guide .guide-title {
    font-weight: 900;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 10px;
}
.scrim-complete-guide .guide-title i {
    color: #22c55e;
    text-shadow: 0 0 12px rgba(34,197,94,.28);
}
.scrim-complete-guide .guide-sub {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: .9rem;
    line-height: 1.45;
}
.scrim-complete-guide .guide-actions {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
    justify-content:flex-end;
    margin-top: 2px;
}

/* 공통 버튼 디자인 */
.btn-electric { 
    background-color: var(--blue-main); color: #fff; border: none; 
    padding: 12px 24px; border-radius: 12px; font-weight: 800; font-family: var(--font-kr);
    cursor: pointer; transition: 0.2s; box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}
.btn-electric:hover { background-color: #1d4ed8; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24); }

.btn-small { 
    background: #f8fbff; color: #1e3a8a; border: 1px solid rgba(96, 165, 250, 0.32); 
    padding: 6px 12px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s; 
}
.btn-small:hover { background: var(--blue-main); color: #fff; border-color: var(--blue-main); }

.btn-outline-electric { 
    background: transparent; border: 2px solid var(--blue-glow); color: var(--blue-glow); 
    padding: 8px 20px; border-radius: 20px; font-weight: 700; cursor: pointer; transition: 0.2s; 
}
.btn-outline-electric:hover { background: var(--blue-glow); color: #fff; box-shadow: 0 0 10px rgba(59, 130, 246, 0.4); }

/* =========================================================
   🌐 상단 네비게이션 & 헤더
   ========================================================= */
.topbar { 
    background-color: rgba(255, 255, 255, 0.88); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18); position: sticky; top: 0; z-index: 100;
    box-shadow: 0 8px 30px rgba(148, 163, 184, 0.08);
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 80px; }

.logo { font-family: var(--font-sport); font-weight: 900; font-size: 2rem; color: var(--text-bright); font-style: italic; letter-spacing: -1px; }
.logo span { color: var(--blue-main); }

.main-menu { display: flex; gap: 30px; align-items: center; }
.main-menu a { 
    text-decoration: none; color: var(--text-muted); font-weight: 700; 
    font-size: 1.05rem; transition: 0.2s; padding: 10px 15px; border-radius: 10px;
}
.main-menu a:hover, .main-menu a.active { color: var(--blue-main); background-color: rgba(37,99,235,0.08); }

/* 로그인 상태: 상단 메뉴는 대시보드·팀 찾기·스크림 보드·FAQ만 (안내·팀등록·운영원칙 등 비노출) */
body.easy-scrim-logged-in .main-menu a[href="/about"],
body.easy-scrim-logged-in .main-menu a[href="/team-register"],
body.easy-scrim-logged-in .main-menu a[href="/operations"] {
    display: none !important;
}
body.easy-scrim-logged-in .guest-guide-section {
    display: none !important;
}

/* 대시보드 비로그인 — 시작 가이드 카드 */
.guest-guide-section {
    margin-bottom: 24px;
}
.guest-guide-section .panel-header {
    margin-bottom: 10px;
}
.guest-guide-panel-head.panel-header {
    margin-bottom: 6px;
}
.guest-guide-section .panel-header h2 {
    font-family: var(--font-sport);
    font-size: 1.22rem;
    font-weight: 800;
    margin: 0;
}
.guest-guide-lead {
    margin: 0 0 4px;
    font-size: 0.9rem;
    line-height: 1.5;
}
.guest-guide-track {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    margin-top: 12px;
    overflow-x: auto;
    overflow-y: visible;
    /* 가로 스크롤 + translateY 호버 시 위쪽 잘림 방지 */
    padding: 10px 4px 14px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.guest-guide-track::-webkit-scrollbar {
    height: 6px;
}
.guest-guide-track::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 99px;
}
.guest-guide-chevron {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    color: var(--blue-main);
    font-size: 0.85rem;
    padding: 0 4px;
    opacity: 0.55;
}
.guest-guide-card {
    flex: 1 1 0;
    min-width: 168px;
    max-width: 100%;
    padding: 16px 16px;
    margin: 0;
    min-height: 132px;
    display: grid;
    align-content: start;
    gap: 8px;
    border-radius: 14px;
    text-align: left;
}
/* 스크롤 영역 안에서는 translateY 호버가 잘림 → 그림자·테두리만 강조 */
.guest-guide-section .guest-guide-card.match-card:hover {
    transform: none;
    border-color: var(--blue-glow);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.14);
}
.guest-guide-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--blue-main);
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
}
.guest-guide-card strong {
    color: var(--text-bright);
    font-size: 0.98rem;
    line-height: 1.3;
}
.guest-guide-card .text-muted {
    font-size: 0.84rem;
    line-height: 1.5;
    margin: 0;
}
.guest-guide-foot {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}
.guest-guide-foot .guest-guide-foot-btn {
    min-width: 148px;
    min-height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
}
.guest-guide-foot .guest-guide-foot-btn.btn-electric {
    transform: none;
}
.guest-guide-foot .guest-guide-foot-btn.btn-electric:hover {
    transform: translateY(-1px);
}

/* 유저 액션 (우측 버튼들) */
.user-actions { display: flex; align-items: center; gap: 16px; }
#logoutBtn { order: 99; margin-left: 2px; }
.auth-link {
    display: flex; align-items: center; gap: 8px; color: var(--text-main);
    text-decoration: none; font-weight: 600; font-size: 0.95rem;
    padding: 6px 12px; border-radius: 20px; transition: all 0.2s ease;
}
.auth-link:hover { color: var(--text-bright); background-color: rgba(37, 99, 235, 0.06); }
.auth-link i { font-size: 1.1rem; color: var(--text-muted); }
.auth-link:hover i { color: var(--blue-glow); }

.mypage-state { background: var(--surface-chip); border: 1px solid var(--border-dim); }
.mypage-state:hover { background: rgba(219, 234, 254, 0.75); border-color: rgba(96, 165, 250, 0.35); }

.user-avatar-small {
    width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid var(--border-dim); object-fit: cover;
}
.mypage-state:hover .user-avatar-small { border-color: var(--blue-glow); box-shadow: 0 0 10px rgba(59, 130, 246, 0.3); }

.icon-btn {
    background: transparent; border: none; color: var(--text-muted); font-size: 1.3rem;
    cursor: pointer; position: relative; transition: color 0.2s; padding: 5px;
}
.icon-btn:hover { color: var(--text-bright); }
.logout-btn:hover { color: var(--coral-match) !important; }
.icon-btn .badge {
    position: absolute; top: 0; right: -2px; background-color: var(--coral-match);
    color: #fff; font-size: 0.65rem; font-weight: 800; padding: 2px 5px; border-radius: 10px; transform: translate(30%, -30%);
}

/* 알림 벨: 미확인 알림이 있으면 딸랑딸랑 */
.icon-btn.is-noti-ringing {
    transform-origin: top center;
    animation: notiBellRing 1.15s ease-in-out infinite;
}
@keyframes notiBellRing {
    0% { transform: rotate(0deg); }
    6% { transform: rotate(12deg); }
    12% { transform: rotate(-12deg); }
    18% { transform: rotate(10deg); }
    24% { transform: rotate(-10deg); }
    30% { transform: rotate(7deg); }
    36% { transform: rotate(-7deg); }
    42% { transform: rotate(4deg); }
    48% { transform: rotate(-4deg); }
    54% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

.hamburger-btn {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    background: var(--surface-input);
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.12);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}
.hamburger-btn span {
    width: 18px;
    height: 2px;
    background: var(--text-bright);
    border-radius: 99px;
}

/* =========================================================
   📊 1. 핵심 지표 위젯
   ========================================================= */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 30px 0; }
.stat-widget { 
    background-color: rgba(255,255,255,.82); border: 1px solid var(--border-dim);
    border-radius: 20px; padding: 20px; display: flex; align-items: center; gap: 15px;
    transition: 0.3s; cursor: pointer; box-shadow: 0 12px 28px rgba(148,163,184,.07); backdrop-filter: blur(8px);
}
.stat-widget:hover { transform: translateY(-3px); border-color: var(--blue-glow); background-color: rgba(255,255,255,.94); }
.widget-icon { width: 50px; height: 50px; border-radius: 14px; display: flex; justify-content: center; align-items: center; font-size: 1.4rem; background: rgba(37,99,235,0.08); color: var(--blue-main); }
.widget-icon.coral { background: rgba(255,71,87,0.1); color: var(--coral-match); }
.widget-info p { font-size: 0.85rem; color: var(--text-muted); font-weight: 700; margin-bottom: 2px; }
.widget-info h3 { font-family: var(--font-sport); font-size: 1.8rem; font-weight: 800; color: var(--text-bright); line-height: 1; }

/* =========================================================
   🏆 2. 대시보드 레이아웃
   ========================================================= */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 60px; }
.app-panel { background-color: var(--bg-panel); border-radius: 24px; border: 1px solid var(--border-dim); padding: 30px; box-shadow: 0 18px 44px rgba(148,163,184,.08); backdrop-filter: blur(10px); }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.panel-header h2 { font-family: var(--font-sport); font-size: 1.3rem; font-weight: 800; color: var(--text-bright); }

/* 로그인 페이지: 정책 링크를 카드 왼쪽 하단에 */
.login-card {
    display: grid;
    gap: 10px;
    position: relative;
    padding-bottom: 44px; /* bottom links area */
}
.login-policy-links {
    position: absolute;
    left: 0;
    bottom: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.login-policy-links .btn-small {
    background: #eef6ff;
    color: #1d4ed8;
    border-color: rgba(96, 165, 250, 0.4);
}
.login-policy-links .btn-small:hover {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

/* 대시보드(index) — 싱글뷰 프로모 배너 */
.index-main-tight { margin-top: 8px; }
.single-view-banner-card {
    display: block;
    width: 100%;
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
    min-height: 320px;
    height: clamp(220px, 28vw, 400px);
    border-radius: 16px;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    color: inherit;
}
.single-view-banner-card .banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .35;
    pointer-events: none;
    transform: scale(1);
    transition: transform .35s ease;
}
.single-view-banner-card:hover .banner-img {
    transform: scale(1.04);
}
.single-view-banner-card .banner-caption {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    z-index: 2;
    max-width: min(560px, calc(100% - 24px));
    background: rgba(5,10,16,.78);
    border: 1px solid rgba(255,255,255,.14);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: .82rem;
    line-height: 1.45;
    color: #d9e4ff;
}

/* 강한 비활성(스크림 등록 등) */
button:disabled,
.btn-electric:disabled,
.btn-small:disabled,
a.btn-electric[aria-disabled="true"],
a.btn-small[aria-disabled="true"],
.is-strong-disabled {
    opacity: 0.45 !important;
    filter: grayscale(0.55) saturate(0.7);
    cursor: not-allowed !important;
    box-shadow: none !important;
}
button:disabled {
    pointer-events: none;
}
@media (max-width: 768px) {
    .index-main-tight { margin-top: 4px; }
    .single-view-banner-card {
        min-height: 200px;
        height: clamp(200px, 42vw, 280px);
        margin-bottom: 8px;
        border-radius: 12px;
    }
    .single-view-banner-card .banner-caption {
        left: 8px;
        right: 8px;
        bottom: 8px;
        font-size: .78rem;
        padding: 6px 8px;
    }
}

/* 챔피언 배너 */
.champion-banner {
    --champ-splash: url('https://ddragon.leagueoflegends.com/cdn/img/champion/splash/Pantheon_0.jpg');
    border-radius: 24px; padding: 60px 40px; position: relative; margin-bottom: 24px;
    border: 1px solid rgba(191, 219, 254, 0.8); box-shadow: 0 24px 48px rgba(148, 163, 184, 0.14);
    display: flex; align-items: center; overflow: hidden; min-height: 320px;
    isolation: isolate;
}
.champion-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--champ-splash);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    pointer-events: none;
}
.champion-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to right, rgba(248,251,255,0.96) 24%, rgba(248,251,255,0.18) 100%);
    pointer-events: none;
}
.champion-badge { position: absolute; top: 15px; right: 25px; background: rgba(37, 99, 235, 0.92); border: 1px solid rgba(191,219,254,.9); color: #eff6ff; padding: 8px 18px; border-radius: 10px; font-weight: 700; z-index: 2; }
.champion-content { display: flex; align-items: center; gap: 30px; z-index: 2; width: 100%; }
.champion-avatar { width: 120px; height: 120px; border-radius: 50%; border: 3px solid #bfdbfe; object-fit: cover; box-shadow: 0 12px 26px rgba(37,99,235,.16); }
.champion-title { font-size: 2.5rem; font-weight: 900; color: var(--text-bright); margin-bottom: 6px; line-height: 1.1; }
.champion-subtitle { color: #475569; font-size: 1.2rem; font-weight: 500; margin-bottom: 20px; }
.champion-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.tag-item { background: rgba(255, 255, 255, 0.92); border: 1px solid rgba(191, 219, 254, 0.95); padding: 8px 16px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; color: #1e3a8a; }

/* 라이브 매치 카드 */
.match-list { display: flex; flex-direction: column; gap: 16px; }

/* =========================================================
   Riot legal footer
   ========================================================= */
.legal-footer {
    margin-top: 36px;
    padding: 18px 0 26px;
    border-top: 1px solid rgba(148,163,184,.16);
    color: #64748b;
    font-size: .86rem;
    line-height: 1.55;
}
.legal-footer .legal-footer-inner {
    display: grid;
    gap: 10px;
}
.legal-footer .legal-links {
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}
.legal-footer a {
    color: #1d4ed8;
    text-decoration: none;
    border: 1px solid rgba(191,219,254,.9);
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,.72);
}
.legal-footer a:hover {
    border-color: rgba(59,130,246,.35);
    background: rgba(219,234,254,.8);
}
.legal-footer .riot-disclaimer {
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(191,219,254,.72);
    border-radius: 14px;
    padding: 12px 14px;
}
.match-card { background: rgba(255,255,255,.84); border: 1px solid rgba(191, 219, 254, 0.68); border-radius: 20px; padding: 20px; transition: 0.2s; box-shadow: 0 12px 30px rgba(148,163,184,.07); backdrop-filter: blur(8px); }
.match-card:hover { border-color: var(--blue-glow); transform: translateY(-2px); }
.match-header { display: flex; justify-content: space-between; margin-bottom: 15px; font-family: var(--font-sport); font-size: 0.9rem; font-weight: 700; color: var(--text-muted); }
.match-body { display: flex; justify-content: space-between; align-items: center; }
.team-name { flex: 1; text-align: center; font-weight: 800; font-size: 1.15rem; color: var(--text-bright); }
.vs-ball { width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-family: var(--font-sport); font-weight: 900; font-size: 1.1rem; color: #fff; background: linear-gradient(135deg, #2563eb, #1d4ed8); border: 2px solid #bfdbfe; box-shadow: 0 10px 24px rgba(37,99,235,.22); margin: 0 10px; }

/* 핫매치 VS 카드 확장 */
.vs-inline-mobile {
    display: none;
}
.match-card-vs {
    background: radial-gradient(circle at top, rgba(59,130,246,0.10), transparent 40%), rgba(255,255,255,.9);
    border-color: rgba(59,130,246,0.22);
}
.match-body-vs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
}
.team-slot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-dim);
    border-radius: 12px;
    background: rgba(248,251,255,.92);
    min-height: 62px;
}
.team-slot.right { flex-direction: row-reverse; }
.team-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    object-fit: cover;
    flex: 0 0 auto;
}
.vs-core {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.vs-badge {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sport);
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #ef4444);
    box-shadow: 0 0 16px rgba(37,99,235,0.45);
    border: 2px solid rgba(255,255,255,0.2);
}
.vs-sub {
    font-size: .72rem;
    letter-spacing: .12em;
    color: var(--text-muted);
    font-weight: 700;
}
.vs-core.live .vs-badge {
    animation: pulse 1.1s infinite;
    box-shadow: 0 0 20px rgba(239,68,68,0.6);
}

/* 랭킹 리스트 */
.rank-list { display: flex; flex-direction: column; gap: 12px; }
.rank-item { display: flex; align-items: center; padding: 12px 16px; background-color: rgba(255,255,255,.82); border-radius: 16px; border: 1px solid rgba(191,219,254,.56); box-shadow: 0 10px 22px rgba(148,163,184,.06); }
.rank-num { font-family: var(--font-sport); font-weight: 900; font-size: 1.4rem; color: var(--text-muted); width: 35px; text-align: center; }
.num-1 { color: #FFD700; font-size: 1.6rem; }
.rank-avatar { width: 45px; height: 45px; border-radius: 12px; margin: 0 15px; }
.rank-name { flex: 1; font-weight: 700; color: var(--text-bright); }

/* =========================================================
   📝 폼 & 시간 선택 & 격전 로고
   ========================================================= */
.form-group { margin-bottom: 28px; }
.form-label { display: block; font-weight: 700; color: var(--text-bright); margin-bottom: 12px; font-size: 0.95rem; }
/* 공용 입력 컴포넌트(클래스 유무와 관계없이 텍스트 입력은 동일 톤) */
.form-input,
.form-select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--surface-input);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    color: var(--text-bright);
    font-size: 1rem;
    font-family: var(--font-kr);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.form-input:hover,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]):hover,
select:hover,
textarea:hover {
    border-color: rgba(96, 165, 250, 0.45);
}
.form-input::placeholder,
textarea::placeholder,
input::placeholder {
    color: var(--input-placeholder);
}
.form-select,
select {
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--surface-input);
    background-image:
      linear-gradient(45deg, transparent 50%, rgba(37,99,235,0.75) 50%),
      linear-gradient(135deg, rgba(37,99,235,0.75) 50%, transparent 50%),
      linear-gradient(to right, rgba(148,163,184,0.5), rgba(148,163,184,0.15));
    background-position:
      calc(100% - 18px) 50%,
      calc(100% - 12px) 50%,
      calc(100% - 38px) 50%;
    background-size: 6px 6px, 6px 6px, 1px 55%;
    background-repeat: no-repeat;
    padding-right: 44px;
}
/* 드롭다운 옵션 패널 톤 통일 (지원 브라우저 한정) */
select option,
select optgroup {
    background-color: var(--bg-card);
    color: var(--text-bright);
}
select option:checked {
    background-color: rgba(191, 219, 254, 0.95);
    color: #1d4ed8;
}
.form-input:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue-main);
    outline: none;
    box-shadow: var(--focus-ring), 0 4px 16px rgba(148, 163, 184, 0.12);
    background: var(--surface-input);
}

/* 크롬/엣지 자동완성 시 덮이는 회색·노란 배경 제거 (라이트 폼 흰색 유지) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
select:-webkit-autofill,
select:-webkit-autofill:hover {
    -webkit-text-fill-color: var(--text-bright);
    caret-color: var(--text-bright);
    box-shadow: 0 0 0 1000px #ffffff inset;
    transition: background-color 99999s ease-out;
}
input:-webkit-autofill:focus,
textarea:-webkit-autofill:focus,
select:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-bright);
    caret-color: var(--text-bright);
    box-shadow:
        0 0 0 1000px #ffffff inset,
        var(--focus-ring),
        0 4px 16px rgba(148, 163, 184, 0.12);
    transition: background-color 99999s ease-out;
}

/* 로그인 등 폼: 배경을 변수와 무관하게 흰색으로 고정 */
.login-card .form-input,
#manualLoginCard .form-input {
    background-color: #ffffff;
}
.login-card .form-input:focus,
#manualLoginCard .form-input:focus {
    background-color: #ffffff;
}

.datetime-quick-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.datetime-quick-btn {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-dim);
    background: rgba(59,130,246,0.08);
    color: var(--text-main);
    font-size: 0.82rem;
    cursor: pointer;
}
.datetime-quick-btn:hover {
    background: rgba(219, 234, 254, 0.95);
    color: #1e40af;
    border-color: rgba(96, 165, 250, 0.45);
}


/* =========================================================
   ✨ 커스텀 모달 팝업 (라이트 UI · 알림/uiAlert/팀 상세 공통)
   ========================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.show { opacity: 1; visibility: visible; }

.modal-content {
    background: var(--surface-input);
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 18px;
    padding: 24px 26px 26px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.75) inset;
    transform: translateY(-12px) scale(0.98);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    color: var(--text-main);
}
.modal-overlay.show .modal-content { transform: translateY(0) scale(1); }

/* 목록·폼형 모달(알림, 팀 상세, 탈퇴 등) */
#notiModal .modal-content,
#headerNotiModal .modal-content,
#teamDetailModal .modal-content,
#accountDeleteModal .modal-content,
.modal-content.modal-content--list,
.modal-content.modal-content--noti {
    text-align: left;
}

.modal-noti-body {
    max-height: 320px;
    overflow: auto;
    display: grid;
    gap: 10px;
    padding: 4px 2px 2px;
}

.modal-overlay .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.modal-overlay .panel-header h2 {
    color: var(--text-bright);
    margin: 0;
    font-weight: 800;
    font-size: 1.12rem;
    font-family: var(--font-sport);
}

/* 알림 목록·모달 본문 행 (index/헤더 벨 등 — team-detail 없이도 동일 톤) */
.info-row {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-dim);
    background: var(--surface-chip);
    color: var(--text-main);
    text-align: left;
    line-height: 1.5;
    box-shadow: 0 2px 10px rgba(148, 163, 184, 0.06);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.info-row[data-href],
.info-row[style*="cursor:pointer"] {
    cursor: pointer;
}
.info-row[data-href]:hover {
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(219, 234, 254, 0.55);
}

.modal-icon { font-size: 3rem; margin-bottom: 16px; line-height: 1; }
.modal-icon.error { color: #ef4444; }
.modal-icon.success { color: #16a34a; }
.modal-icon.info { color: var(--blue-main); }
.modal-message {
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.55;
    margin-bottom: 20px;
    white-space: pre-line;
    word-break: keep-all;
}

#globalUiModal .modal-content .modal-message {
    margin-bottom: 14px;
}
#globalUiModal #globalUiModalActions {
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================================
   📱 반응형 (Media Queries)
   ========================================================= */
@media (max-width: 1024px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .champion-banner {
        min-height: 260px;
        padding: 40px 24px;
    }

    .champion-title {
        font-size: 1.9rem;
    }
}

@media (max-width: 768px) {
    .container { padding: 0 14px; }

    .topbar {
        position: sticky;
    }

    .topbar-inner {
        height: auto;
        min-height: 64px;
        padding: 10px 0;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 8px;
    }

    .logo {
        font-size: 1.5rem;
        line-height: 1;
    }

    .hamburger-btn {
        display: inline-flex;
        justify-self: end;
        margin-top: -10px;
        margin-right: 2px;
    }

    .main-menu,
    .user-actions {
        width: 100%;
        grid-column: 1 / -1;
    }

    :root {
        --mobile-drawer-width: min(84vw, 320px);
    }

    .mobile-menu-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 125;
        background: rgba(15, 23, 42, 0.22);
        opacity: 0;
        pointer-events: none;
        transition: opacity .22s ease;
    }
    body.menu-open-mobile .mobile-menu-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .topbar,
    main.container {
        transition: transform .24s ease;
        will-change: transform;
    }

    .mobile-drawer {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: var(--mobile-drawer-width);
        height: 100vh;
        overflow-y: auto;
        padding: calc(env(safe-area-inset-top, 0px) + 34px) 12px 16px;
        border-radius: 0;
        background: var(--surface-input);
        border-left: 1px solid var(--border-dim);
        box-shadow: -8px 0 32px rgba(148, 163, 184, 0.18);
        z-index: 130;
    }
    body.menu-open-mobile .mobile-drawer { display: block; }

    body.menu-open-mobile .topbar {
        z-index: 126;
    }

    body.menu-open-mobile .topbar,
    body.menu-open-mobile main.container {
        transform: translateX(calc(var(--mobile-drawer-width) * -1));
    }

    .mobile-drawer .main-menu {
        display: flex !important;
        flex-direction: column;
        gap: 6px;
        padding: 0;
        width: 100%;
    }
    .mobile-drawer .main-menu a {
        width: 100%;
        padding: 10px 12px;
        border-radius: 10px;
        font-size: 0.95rem;
        color: var(--text-muted);
    }
    .mobile-drawer .main-menu a:hover,
    .mobile-drawer .main-menu a.active {
        color: var(--blue-main);
        background-color: rgba(37, 99, 235, 0.08);
    }

    .mobile-drawer .user-actions {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        width: 100%;
        margin: -14px 0 8px;
        padding: 2px 0 10px;
        border-bottom: 1px solid var(--border-dim);
        overflow-x: auto;
        overflow-y: visible;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        position: relative;
        top: -4px;
    }
    .mobile-drawer .user-actions::-webkit-scrollbar { display: none; }

    .mobile-drawer .user-actions > * {
        width: auto;
        min-width: max-content;
        justify-content: center;
        flex: 0 0 auto;
    }

    .mobile-drawer .icon-btn {
        overflow: visible;
        padding: 8px;
    }
    .mobile-drawer .icon-btn .badge {
        top: -2px;
        right: -4px;
        transform: none;
    }

    .mobile-drawer .main-menu {
        margin-top: 0;
    }

    #logoutBtn { order: 99; }

    .auth-link { padding: 6px 8px; font-size: 0.86rem; }
    .auth-link span { display: none; }
    /* 비로그인 상태에서도 로그인 텍스트는 노출 */
    #loginBtn span { display: inline; }
    .user-avatar-small { width: 24px; height: 24px; }

    .stat-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 16px 0 20px;
    }

    .stat-widget {
        padding: 14px;
        border-radius: 14px;
    }

    .widget-info h3 { font-size: 1.45rem; }

    .app-panel {
        padding: 16px;
        border-radius: 16px;
    }

    .panel-header {
        margin-bottom: 14px;
    }

    .panel-header h2 {
        font-size: 1.05rem;
    }

    .champion-banner {
        padding: 18px 14px;
        min-height: 200px;
        border-radius: 16px;
    }

    .champion-badge {
        position: static;
        margin-bottom: 8px;
        display: inline-flex;
        font-size: 0.76rem;
        padding: 5px 10px;
    }

    .champion-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .champion-avatar {
        width: 72px;
        height: 72px;
    }

    .champion-title {
        font-size: 1.15rem;
        line-height: 1.3;
        margin-bottom: 4px;
    }

    .champion-subtitle {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .tag-item {
        font-size: 0.76rem;
        padding: 5px 10px;
    }

    .rank-item {
        padding: 10px 12px;
        border-radius: 12px;
    }

    .rank-avatar {
        width: 34px;
        height: 34px;
        margin: 0 10px;
    }

    .rank-num { width: 24px; font-size: 1rem; }

    .rank-name,
    .rank-score {
        font-size: 0.88rem;
    }

    .match-card {
        padding: 14px;
        border-radius: 14px;
    }

    .match-header {
        font-size: 0.76rem;
        margin-bottom: 10px;
    }

    .match-body {
        gap: 8px;
        flex-wrap: wrap;
    }

    .team-name {
        min-width: 100%;
        font-size: 0.95rem;
        text-align: left;
    }

    .vs-ball {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
        margin: 0;
    }

    .match-body-vs {
        grid-template-columns: 1fr auto 1fr;
        gap: 8px;
        align-items: center;
    }
    .team-slot,
    .team-slot.right {
        flex-direction: row;
        min-height: 52px;
        padding: 8px 10px;
    }
    .team-slot.right {
        justify-content: flex-start;
    }
    .team-slot .team-name {
        min-width: auto;
        text-align: left;
        font-size: 0.9rem;
        line-height: 1.3;
        word-break: keep-all;
    }
    .team-slot .team-logo {
        display: none;
    }
    .vs-core {
        display: none;
    }
    .vs-inline-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: var(--font-sport);
        font-weight: 900;
        font-size: 0.92rem;
        color: var(--text-bright);
        min-width: 28px;
    }

    .team-action {
        margin-left: auto;
    }

    .btn-outline-electric {
        font-size: 0.82rem;
        padding: 7px 12px;
    }

    .btn-electric.full-width {
        padding: 14px !important;
        font-size: 0.98rem !important;
    }

    #myScrimRegisterForm > div:first-child {
        grid-template-columns: 1fr !important;
    }
}
