:root {
    /* Premium Color Palette for World Cup (Deep Blue) */
    --primary: #1d4ed8; /* Royal Blue for Football */
    --primary-hover: #1e40af;
    --secondary: #0f172a; /* Near Black */
    --secondary-hover: #020617;
    --accent: #dc2626; /* Strong Red for Live indicators */
    --accent-hover: #b91c1c;
    --background: #f1f5f9; /* Soft gray to reduce eye strain */
    --surface: #ffffff; /* Pure white for content cards */
    
    /* Text Colors */
    --text-strong: #020617; /* Headings */
    --text-main: #1e293b; /* Body text */
    --text-muted: #475569; /* Secondary text */
    
    /* Layout & Borders */
    --border: #e2e8f0;
    --radius: 16px; /* Softer, modern corners */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    font-size: 17px; /* Increased base size for mobile legibility */
    line-height: 1.7; /* Optimal reading height */
    letter-spacing: -0.01em; /* Tighter tracking for Korean */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 800px; /* Constrained width for optimal reading line length */
    margin: 0 auto;
    padding: 0 20px;
}

/* ------------------- HEADER ------------------- */
.header {
    background: var(--surface);
    color: var(--text-strong);
    padding: 30px 0;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-bottom: 4px solid var(--primary);
    position: relative;
    z-index: 10;
}

.header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px;
    order: 2; /* 로고 밑으로 이동 */
    margin-top: 5px;
}

.back-link:hover {
    color: var(--primary);
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.logo span {
    background: linear-gradient(to right, var(--primary), #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ------------------- AD SLOTS ------------------- */
.ad-slot {
    background-color: transparent;
    display: block;
    text-align: center;
    margin: 40px auto;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.ad-top { min-height: 100px; }
.ad-square { min-height: 250px; max-width: 336px; }
.ad-bottom { min-height: 120px; margin-bottom: 0; }

/* ------------------- GROUP STANDINGS ------------------- */
.group-standings-wrapper {
    background: #1e3a8a; /* 다크 모드 테마 */
    border-radius: var(--radius);
    padding: 30px;
    margin-top: 30px;
    box-shadow: var(--shadow-lg);
    color: var(--surface);
    overflow-x: auto;
}

.group-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
    font-size: 0.95rem;
}

.standings-table th {
    color: #94a3b8;
    font-weight: 600;
    text-align: center;
    padding: 12px 10px;
    border-bottom: 1px solid #334155;
    white-space: nowrap;
}

.standings-table th.th-team {
    text-align: left;
}

.standings-table td {
    padding: 16px 10px;
    text-align: center;
    border-bottom: 1px solid #1e293b;
    color: #e2e8f0;
    font-weight: 500;
}

.standings-table td.td-team {
    text-align: left;
    font-weight: 700;
    color: var(--surface);
}

.standings-table .td-rank {
    font-weight: 800;
    color: #94a3b8;
}

.standings-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.05);
}

.standings-table td.td-points {
    font-weight: 800;
    color: var(--primary);
}

/* 모바일 순위표 스크롤 안내 */
.scroll-hint {
    display: none;
    font-size: 0.8rem;
    color: #64748b;
    text-align: right;
    margin-top: 10px;
}

@media (max-width: 640px) {
    .scroll-hint { display: block; }
    .group-standings-wrapper { padding: 20px 15px; }
}

/* ------------------- PAGE 1: SCHEDULE LIST ------------------- */
.schedule-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px;
    margin-top: 30px;
    box-shadow: var(--shadow-md);
}

.section-header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 1.6rem;
    color: var(--text-strong);
    font-weight: 800;
    margin-bottom: 8px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.schedule-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.schedule-link {
    text-decoration: none;
    color: inherit;
    display: block;
    outline: none;
}

.schedule-item {
    display: flex;
    align-items: center;
    padding: 30px 25px; /* Huge touch target */
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--surface);
    transition: var(--transition);
}

.schedule-link:focus-visible .schedule-item,
.schedule-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* Highlighted Match (LIVE) */
.schedule-item.highlight {
    border: 2px solid #fca5a5;
    background-color: #fef2f2;
}

.date-col {
    width: 100px;
    text-align: center;
    border-right: 1px solid var(--border);
    padding-right: 20px;
    margin-right: 20px;
}

.date-col .day {
    display: block;
    font-weight: 800;
    color: var(--text-strong);
    font-size: 1.2rem;
}

.date-col .time {
    display: block;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    margin-top: 4px;
}

.match-col {
    flex-grow: 1;
}

.match-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-strong);
    margin-bottom: 8px;
}

.players {
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 500;
}

.status-col {
    min-width: 120px;
    text-align: right;
}

.status {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 800;
    background: #f1f5f9;
    color: var(--text-muted);
}

.status.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.3);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* ------------------- PAGE 2: HERO & DETAILS ------------------- */
.hero-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 50px 40px;
    margin-top: 30px;
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 8px;
    background: linear-gradient(to right, var(--primary), #3b82f6);
}

.live-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 1px;
    background-color: #fef2f2;
    color: var(--accent);
    border: 1px solid #fecdd3;
    margin-bottom: 25px;
}

.match-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--text-strong);
    line-height: 1.3;
}

.countdown-wrapper {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    display: inline-block;
    margin-bottom: 40px;
    min-width: 280px;
}

.countdown-text {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 10px;
}

.countdown {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
    line-height: 1;
}

/* Action Cards */
.action-card {
    background: #f0fdf4;
    border-radius: var(--radius);
    padding: 35px;
    border: 1px solid #bbf7d0;
    text-align: left; /* 글씨 좌측 정렬 */
}

.action-card h3 {
    color: #166534;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.action-desc {
    color: #15803d;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 1.05rem;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: flex-start; /* 버튼도 좌측 정렬 */
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* BIG Touchable Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 36px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.15rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
    min-height: 60px; /* Minimum touch target height */
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-secondary { background: #1e3a8a; color: white; }
.btn-secondary:hover { background: var(--secondary-hover); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.copyright-notice {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Replay Card */
.replay-card {
    background: #fff1f2;
    border-color: #fecdd3;
    margin-top: 25px;
}

/* ------------------- SEO CONTENT ------------------- */
.seo-content-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px;
    margin-top: 40px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-size: 1.4rem;
    color: var(--text-strong);
    font-weight: 800;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.seo-text-box h4 {
    font-size: 1.25rem;
    color: var(--text-strong);
    font-weight: 800;
    margin-bottom: 15px;
    margin-top: 30px;
}

.seo-text-box h4:first-child {
    margin-top: 0;
}

.seo-text-box ul {
    list-style: none;
    margin-bottom: 20px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.seo-text-box li {
    margin-bottom: 10px;
    padding-left: 18px;
    position: relative;
    font-weight: 500;
}

.seo-text-box li:last-child { margin-bottom: 0; }

.seo-text-box li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    top: -2px;
}

.seo-text-box p {
    text-align: justify;
    margin-bottom: 20px;
    font-weight: 400;
}

.divider {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 40px 0;
}

/* ------------------- FOOTER ------------------- */
.footer {
    text-align: center;
    padding: 50px 0;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 60px;
}

.footer p {
    font-weight: 500;
}

.footer .disclaimer {
    font-size: 0.95rem;
    margin-top: 15px;
    opacity: 0.7;
}

/* ------------------- RESPONSIVE (MOBILE) ------------------- */
@media (max-width: 640px) {
    .container { padding: 0 15px; }
    
    .logo { font-size: 1.8rem; }
    .subtitle { font-size: 0.95rem; }
    
    .schedule-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 25px 20px;
        position: relative;
    }
    
    .date-col {
        border-right: none;
        border-bottom: 1px solid var(--border);
        width: 100%;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 10px;
        padding-bottom: 15px;
        margin-bottom: 15px;
        margin-right: 0;
    }
    
    .date-col .time { margin-top: 0; }
    
    .status-col {
        position: absolute;
        top: 20px;
        right: 15px;
    }
    
    .status { padding: 6px 14px; font-size: 0.85rem; }
    
    .hero-section { padding: 35px 20px; }
    .match-title { font-size: 1.8rem; }
    .countdown { font-size: 2.8rem; }
    
    .action-card { padding: 25px 20px; }
    .button-group { flex-direction: column; }
    .btn { width: 100%; font-size: 1.1rem; }
    
    .seo-content-section { padding: 25px 20px; }
}
