/* 定义方正胖头鱼简体字体 - 用于中文字符 */
@font-face {
    font-family: 'Luckiest Guy';
    src: url('/static/fonts/LuckiestGuy-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FangZhengPangTouYu';
    src: url('/static/fonts/方正胖头鱼简体.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    unicode-range: U+4E00-9FFF, U+3400-4DBF, U+20000-2A6DF, U+2A700-2B73F, U+2B740-2B81F, U+2B820-2CEAF, U+F900-FAFF, U+2F800-2FA1F;
    font-display: swap;
}

:root {
    /* b2.lol 风格配色 - 基于图片的颜色占比 */
    /* 主色 - 黄色系（主要内容区域，占20-25%） */
    --primary: #FFC55B; /* 金黄色 - 主要内容区域 */
    --primary-dark: #FFB039; /* 深金黄色 */
    --primary-light: #FFD98A; /* 浅金黄色 */
    --primary-hover: #FFD175; /* 悬停时黄色 */
    
    /* 深蓝色背景（占60-70%）- 主导背景色 */
    --bg-deep: #1D488A; /* 深蓝色 - 主背景 */
    --bg-deep-alt: #153A6B; /* 更深的蓝色 */
    --bg-deep-light: #2A5CA3; /* 稍亮的蓝色 */
    
    /* 浅蓝色 - 交互元素（链接、按钮文字等） */
    --interactive: #5B9BD5; /* 浅蓝色 - 链接和交互元素 */
    --interactive-light: #7BB3E0; /* 更浅的蓝色 */
    --interactive-dark: #4A7FC2; /* 更深的蓝色 */
    
    /* 橙色/红色 - 强调元素 */
    --accent: #FF6B35; /* 橙色 - 强调 */
    --accent-light: #FF8C5A; /* 浅橙色 */
    
    /* 第二层：中间背景色 - 侧边栏/次要容器 */
    --bg-mid: #1D488A; /* 深蓝色，与主背景一致 */
    --bg-mid-alt: #2A5CA3; /* 稍亮的蓝色 */
    
    /* 第三层：浅背景色 - 边框 */
    --bg-light: rgba(255, 255, 255, 0.1); /* 半透明白色，用于边框 */
    --bg-light-alt: rgba(255, 255, 255, 0.2); /* 更不透明的白色 */
    
    /* 文字颜色层次 */
    --text-primary: #ffffff; /* 主要文字 - 纯白 */
    --text-secondary: #e0e0e0; /* 次要文字 - 浅灰 */
    --text-tertiary: #b0b0b0; /* 第三级文字 - 中灰 */
    --text-muted: #808080; /* 弱化文字 - 深灰 */
    
    /* 映射到原有变量名以保持兼容性 */
    --shade1: var(--text-primary);
    --shade2: var(--bg-mid);
    --shade3: var(--bg-light);
    --shade4: var(--text-tertiary);
    --shade5: var(--text-muted);
    --shade6: var(--bg-deep);
    --shade7: var(--bg-mid);
    --shade8: var(--bg-deep);
    
    --tournament-color: var(--primary);
    --tournament-dark: var(--primary-dark);
    
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.6);
    
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 首页样式 */
.home-wrapper {
    padding: 3rem 1rem;
    min-height: calc(100vh);
    max-width: 1200px;
    margin: 0 auto;
}

.home-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn-home {
    padding: 1rem 3rem;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.players-section {
    margin-top: 2rem;
}

.players-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
    letter-spacing: -0.01em;
}

.tournament-select-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.tournament-select-container .tournament-select {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    background: var(--bg-deep);
    color: var(--text-primary);
    border: 1px solid var(--primary);
    min-width: 250px;
    cursor: pointer;
    transition: all 0.3s;
}

.tournament-select-container .tournament-select:hover {
    border-color: var(--primary-light);
    background: var(--bg-deep-light);
}

.tournament-select-container .tournament-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 197, 91, 0.2);
}

.btn-register-large {
    padding: 1rem 3rem;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-register-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.bracket-container.full-width {
    width: 100%;
    max-width: none;
    padding: 0;
}

.btn-bracket-link {
    padding: 1rem 3rem;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-bracket-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 首页选手列表样式 */
.players-list-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

.player-item-home {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--primary);
    border-radius: 8px;
    border: 1px solid var(--primary-dark);
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.player-item-home:hover {
    background: var(--primary-light);
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
}

.player-avatar-home {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-deep);
    flex-shrink: 0;
}

.player-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-deep);
    border: 2px solid var(--bg-deep-alt);
    flex-shrink: 0;
}

.player-name-home {
    font-size: 1.75rem;
    font-weight: 400;
    color: #ffffff;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'FangZhengPangTouYu', 'Luckiest Guy', cursive;
    text-shadow: 
        0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
        0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
        0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
        0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
        0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
        0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
        0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
        0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
        0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
        0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
        0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
        0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000;
    letter-spacing: 0.08em;
    line-height: 1.1;
    -webkit-text-stroke: 0;
}

.seed-badge-home {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    font-family: 'Luckiest Guy', cursive;
    letter-spacing: 0.05em;
    text-shadow: 
        0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000,
        0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000,
        0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000,
        0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000,
        0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000,
        0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000,
        0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000, 0 0 1px #000000;
}

.lang-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--bg-light);
    border-radius: 6px;
    background: var(--bg-deep-light);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s;
    font-weight: 500;
    z-index: 1000;
}

.lang-toggle:hover {
    background: var(--interactive);
    border-color: var(--interactive);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .home-wrapper {
        padding: 2rem 0.5rem;
    }
    
    .home-buttons {
        margin-bottom: 2rem;
        gap: 1rem;
    }
    
    .btn-home {
        padding: 0.875rem 2rem;
        font-size: 1.1rem;
        width: 100%;
        max-width: 300px;
    }
    
    .players-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .tournament-select-container {
        margin-bottom: 1.5rem;
    }
    
    .tournament-select-container .tournament-select {
        min-width: 200px;
        width: 100%;
        max-width: 300px;
    }
    
    .players-list-container {
        padding: 0 0.5rem;
    }
    
    .player-item-home {
        padding: 0.875rem;
        gap: 0.75rem;
    }
    
    .player-avatar-home,
    .player-avatar-placeholder {
        width: 40px;
        height: 40px;
    }
    
    .player-name-home {
        font-size: 1.4rem;
        text-shadow: 
            0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
            0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
            0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
            0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
            0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
            0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
            0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000,
            0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000, 0 0 2px #000000;
    }
    
    .seed-badge-home {
        font-size: 0.9rem;
        text-shadow: 
            0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000,
            0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000,
            0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000,
            0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000,
            0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000,
            0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000,
            0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000, 0 0 0.7px #000000;
    }
}

header {
    background: var(--bg-deep);
    color: var(--text-primary);
    padding: 2rem 0;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--bg-light);
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

.lang-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--bg-light);
    border-radius: 6px;
    background: var(--bg-deep-light);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s;
    font-weight: 500;
}

.lang-toggle:hover {
    background: var(--interactive);
    border-color: var(--interactive);
    color: var(--text-primary);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    position: relative;
}

main {
    flex: 1;
    padding: 0;
    background-color: var(--bg-deep);
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature-card {
    background: var(--bg-deep);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    border: 1px solid var(--bg-light);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--interactive);
    background: var(--bg-deep-light);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--interactive);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.feature-card .btn {
    background-color: var(--primary);
    color: var(--bg-deep);
    font-weight: 600;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-deep);
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--bg-deep);
}

.btn-secondary {
    background-color: var(--bg-deep-light);
    color: var(--text-primary);
    border: 1px solid var(--interactive);
}

.btn-secondary:hover {
    background-color: var(--interactive);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-tertiary {
    background-color: var(--primary-light);
    color: var(--bg-deep);
    font-weight: 600;
}

.btn-tertiary:hover {
    background-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--bg-deep);
}

.tournaments-section,
.bracket-section {
    margin-top: 4rem;
}

.tournaments-section h2,
.bracket-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.tournaments-list {
    display: grid;
    gap: 1.5rem;
}

.tournament-card {
    background: var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--primary-dark);
}

.tournament-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-dark);
    background: var(--primary-light);
}

.tournament-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--bg-deep);
    font-weight: 600;
}

.tournament-card .meta {
    color: var(--bg-deep-alt);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.tournament-card p {
    color: var(--bg-deep-alt);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.tournament-card .status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.status.open {
    background-color: var(--success);
    color: white;
}

.status.closed {
    background-color: var(--bg-light-alt);
    color: var(--text-primary);
}

.status.in-progress {
    background-color: var(--warning);
    color: white;
}

.status.completed {
    background-color: var(--bg-light-alt);
    color: var(--text-primary);
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

.info-message {
    color: var(--text-tertiary);
    text-align: center;
    padding: 2rem;
    font-weight: 400;
}

footer {
    background-color: var(--bg-deep);
    color: var(--text-tertiary);
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
    border-top: 1px solid var(--bg-light);
    font-weight: 400;
}

/* 链接样式 */
a {
    color: var(--interactive);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--interactive-light);
    text-decoration: underline;
}

a:visited {
    color: var(--interactive-dark);
}

/* 按钮内的链接不显示下划线 */
.btn a,
.btn a:hover {
    text-decoration: none;
    color: inherit;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
}
