/* =================================== */
/* Ligue 1 France */
/* =================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&display=swap');

/* === 全局变量（保留原始法甲配色）=== */
:root {
    --blue-main: #4A90E2;            /* 浅蓝：主色 */
    --blue-dark: #0077CC;            /* 中蓝：强调 */
    --red-accent: #ED2939;           /* 红色强调 */
    --white-bg: #ffffff;
    --text-main: #1a1a1a;            /* 主要文字 */
    --text-accent: #0077CC;
    --bg-gradient: linear-gradient(135deg, #f8fbff 0%, #ffffff 40%, #f0f4f8 100%);
}

/* === 全局重置 === */
*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}
html, body { 
    margin: 0; 
    padding: 0; 
    min-height: 100vh; 
    overflow-x: hidden; 
}

/* === 容器 === */
.container {
    margin: 0 auto;
    padding: 20px 10px;
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    width: 100%;
}

/* === 头部 === */
.container h1 {
    color: var(--text-main);
    text-align: center;
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.league-logo, .country-flag {
    width: 50px; height: 50px; object-fit: contain;
    filter: drop-shadow(0 0 8px var(--red-accent));
}
.league-logo { border-radius: 50%; border: 3px solid var(--red-accent); padding: 4px; }
.country-flag { animation: sunflare 2s infinite; }
@keyframes sunflare {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

/* === SEO 年份链接 === */
.seo-year-links {
    position: absolute; left: -9999px; opacity: 0; pointer-events: none;
}

/* === 信息栏 === */
.info-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    padding: 10px 14px;
    background: rgba(237, 41, 57, 0.15);
    border: 1.5px solid var(--red-accent);
    border-radius: 10px;
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 6px rgba(237, 41, 57, 0.15);
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
    text-align: center;
    text-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.15);
}
.info-item {
    flex: 1;
    min-width: 180px;
    padding: 0;
    margin: 0;
}
.info-item::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--red-accent);
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.notice {
    margin: 12px 0;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(237, 41, 57, 0.15);
    color: var(--text-main);
    border: 1.5px solid var(--red-accent);
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 6px rgba(237, 41, 57, 0.15);
    line-height: 1.5;
    text-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.15);
}

/* === 章节标题 === */
.section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    text-align: center;
    margin: 24px 0 16px;
    padding: 10px 16px;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.08), transparent);
    border-bottom: 3px solid var(--blue-main);
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}
.section-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--red-accent) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0.15;
    pointer-events: none;
}

/* === 日期导航 === */
.date-nav {
    display: none; flex-wrap: wrap; gap: 10px;
    background: rgba(255, 255, 255, 0.9); padding: 15px;
    border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    margin-bottom: 20px; justify-content: center;
    backdrop-filter: blur(8px); overflow-x: auto;
}
.date-nav.active { display: flex; }
.date-nav::-webkit-scrollbar { height: 8px; }
.date-nav::-webkit-scrollbar-thumb { background: var(--red-accent); border-radius: 4px; }

.date-tag {
    padding: 8px 14px;
    background: rgba(237, 41, 57, 0.12);
    border: 1.5px solid var(--red-accent);
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    transition: all 0.3s;
    white-space: nowrap;
    font-weight: 700;
    min-width: 100px;
    flex: 0 1 auto;
    color: var(--text-main);
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}
.date-tag:hover, .date-tag.active {
    background: var(--red-accent);
    color: #ffffff;
    transform: translateY(-2px);
}
.date-tag.current {
    background: var(--blue-main);
    color: white;
    font-weight: 800;
    border-color: var(--blue-main);
}

/* === 过滤器 === */
.filters {
    display: none; grid-template-columns: 1fr; gap: 16px;
    background: rgba(255, 255, 255, 0.9); padding: 18px;
    border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    margin-bottom: 20px; border: 1.5px solid var(--red-accent);
    backdrop-filter: blur(8px);
}
.filters.active { display: grid; }
.filters label {
    font-size: 15px; font-weight: 700; color: var(--text-main); margin-bottom: 8px;
}
.filters select, .filters input, .filters button {
    width: 100%; padding: 12px; border: 1.5px solid var(--red-accent);
    border-radius: 10px; font-size: 15px; background: rgba(255,255,255,0.9);
    color: var(--text-main); height: 44px; transition: all 0.3s;
}
.filters select:focus, .filters input:focus {
    border-color: var(--blue-main); box-shadow: 0 0 0 3px rgba(74,144,226,0.3); outline: none;
}
.filters button {
    background: linear-gradient(45deg, var(--blue-main), var(--blue-dark));
    color: white; font-weight: 700; cursor: pointer; text-transform: uppercase;
}
.filters button:hover {
    background: linear-gradient(45deg, var(--blue-dark), #001F5C);
    transform: translateY(-3px); box-shadow: 0 6px 16px rgba(74,144,226,0.4);
}

/* === 按钮 === */
.toggle-filters {
    background: linear-gradient(45deg, var(--blue-main), var(--blue-dark));
    color: white; border: none; padding: 12px 20px; border-radius: 10px;
    cursor: pointer; font-weight: 700; font-size: 15px; text-transform: uppercase;
    transition: all 0.3s; min-width: 140px; margin: 16px auto; display: block;
}
.toggle-filters:hover {
    background: linear-gradient(45deg, var(--blue-dark), #001F5C);
    transform: translateY(-3px); box-shadow: 0 6px 16px rgba(74,144,226,0.4);
}

/* === 比赛卡片 === */
.match-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    border-left: 5px solid var(--blue-main);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--text-main);
}
.match-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(74,144,226,0.25);
    border-left-color: var(--red-accent);
}
.match-card .teams { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 16px; 
    margin: 16px 0; 
}
.match-card .team { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 8px; 
    flex: 1; 
    min-width: 0; 
}
.match-card .team-logo { 
    width: 50px; 
    height: 50px; 
    border-radius: 50%; 
    border: 3px solid var(--blue-main); 
}
.match-card .team span { 
    font-weight: 600; 
    font-size: 16px; 
    color: var(--text-main); 
    text-align: center; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    width: 100%; 
}
.match-card .score { 
    font-size: 32px; 
    font-weight: 900; 
    color: var(--blue-main); 
    background: rgba(74,144,226,0.1); 
    padding: 8px 16px; 
    border-radius: 12px; 
    min-width: 80px; 
    text-align: center; 
}
.match-card .status { 
    text-align: center; 
    font-weight: bold; 
    color: var(--text-main); 
    font-size: 15px; 
    text-transform: uppercase; 
    background: rgba(237, 41, 57, 0.15); 
    padding: 6px 12px; 
    border-radius: 8px; 
    border: 1px solid var(--red-accent);
}
.match-card .details { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 12px; 
    font-size: 14px; 
    color: var(--text-main); 
    background: rgba(74,144,226,0.05); 
    padding: 14px; 
    border-radius: 10px; 
    line-height: 1.5; 
}

/* === 比赛日期样式 === */
.match-card .date {
    font-size: 16px;
    font-weight: 800;
    color: var(--blue-main);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(74, 144, 226, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--blue-main);
    margin-bottom: 8px;
}

/* === 自动刷新提示条 === */
#auto-refresh-indicator {
    position: fixed;
    top: 200px;
    right: 12px;
    background: rgba(30, 41, 59, 0.92);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    z-index: 9999;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(-10px);
}
#auto-refresh-indicator.visible {
    opacity: 1;
    transform: translateY(0);
}
.refresh-icon {
    font-size: 16px;
    animation: spin 1.5s linear infinite;
    animation-play-state: paused;
}
.refresh-icon.spinning {
    animation-play-state: running;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.auto-refresh-hidden {
    display: none;
}

.notice.utc-notice {
    margin: 12px 0 20px 0;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.6;
    background: rgb(255 195 0);
    border: 1.5px solid var(--gold-border);
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 2px 6px rgba(166, 124, 0, 0.15);
}

.notice.utc-notice a {
    color: var(--blue-main);
    text-decoration: underline;
    font-weight: 700;
}

.notice.utc-notice a:hover {
    color: var(--blue-dark);
    text-decoration: none;
}

/* === 响应式：桌面端 === */
@media (min-width: 769px) {
    .container h1 { font-size: 32px; margin-bottom: 20px; }
    .league-logo, .country-flag { width: 60px; height: 60px; }
    .filters { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); padding: 20px; }
    .match-card { padding: 24px; }
    .match-card .team-logo { width: 60px; height: 60px; border-width: 3.5px; }
    .match-card .score { font-size: 36px; }
    .match-card .details { grid-template-columns: 1fr 1fr; font-size: 15px; }
    .date-nav { flex-direction: row; justify-content: center; }
    .date-tag { font-size: 15px; padding: 12px 20px; }
    .section-title { font-size: 20px; margin: 28px 0 18px; }
    .match-card .date { font-size: 18px; }
}

/* === 响应式：手机端 === */
@media (max-width: 768px) {
    html, body { height: 100dvh; min-height: 100dvh; }
    .container { padding: 16px 10px; min-height: 100dvh; }
    .container h1 { font-size: 16px; gap: 10px; margin-bottom: 14px; }
    .league-logo, .country-flag { width: 40px; height: 40px; }
    .notice { font-size: 14px; padding: 10px 14px; margin: 10px 0; border-width: 1.2px; }
    .info-bar { font-size: 12px; }
    .toggle-filters { padding: 10px 16px; font-size: 13px; min-width: 130px; font-weight: 600; }
    .filters { padding: 14px; gap: 12px; }
    .filters label { font-size: 14px; margin-bottom: 6px; }
    .filters select, .filters input, .filters button { padding: 10px; font-size: 14px; height: 40px; border-radius: 8px; border-width: 1.2px; }
    .date-nav { padding: 10px; gap: 8px; margin-bottom: 16px; }
    .date-tag { font-size: 12.5px; padding: 7px 12px; min-width: 90px; border-width: 1.2px; }
    .match-card { padding: 16px; gap: 14px; margin: 0 auto 16px; max-width: calc(100% - 20px); }
    .match-card .teams { gap: 12px; margin: 12px 0; }
    .match-card .team-logo { width: 40px; height: 40px; border-width: 2.5px; }
    .match-card .team span { font-size: 14px; }
    .match-card .score { font-size: 26px; padding: 6px 12px; min-width: 70px; }
    .match-card .status { font-size: 13px; padding: 5px 10px; }
    .match-card .details { font-size: 13px; padding: 12px; gap: 10px; }
    .section-title { font-size: 16px; margin: 20px 0 14px; padding: 8px 12px; }
    .match-card .date { font-size: 14px; padding: 6px 10px; }
    #auto-refresh-indicator { top: 155px; right: 8px; font-size: 12px; padding: 7px 12px; }
    .notice.utc-notice {
        font-size: 13px;
        padding: 12px 14px;
    }
}

/* === 极小屏 === */
@media (max-width: 390px) {
    .container { padding: 12px 8px; }
    .container h1 { font-size: 18px; gap: 8px; margin-bottom: 12px; }
    .league-logo, .country-flag { width: 32px; height: 32px; }
    .toggle-filters { font-size: 9px; min-width: 120px; }
    .date-tag { font-size: 11.5px; padding: 6px 10px; min-width: 80px; }
    .filters select, .filters input, .filters button { font-size: 13px; height: 38px; padding: 8px; }
    .match-card { padding: 14px; max-width: calc(100% - 10px); }
    .match-card .team-logo { width: 36px; height: 36px; border-width: 2px; }
    .match-card .team span { font-size: 13px; }
    .match-card .score { font-size: 22px; }
    .match-card .details { font-size: 12px; }
    .section-title { font-size: 15px; padding: 7px 10px; }
    .match-card .date { font-size: 13px; padding: 5px 8px; }
    .notice.utc-notice {
        font-size: 12px;
        padding: 10px 12px;
    }
}