/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    width: 80%;
    margin: 0 auto;
    padding: 20px 0;
}

/* 导航栏 */
nav {
    background-color: #2c3e50;
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo h1 {
    font-size: 24px;
    font-weight: bold;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.nav-menu li a {
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-menu li a:hover {
    background-color: #34495e;
}

/* 轮播图 */
.carousel {
    background-color: #3498db;
    color: #fff;
    padding: 40px 0;
}

.carousel h2 {
    margin-bottom: 30px;
    text-align: center;
}

.carousel-content {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
}

.carousel-item {
    min-width: 300px;
    text-align: center;
}

.carousel-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* 赛事预告 */
.event-preview {
    padding: 40px 0;
    background-color: #fff;
}

.event-preview h2 {
    margin-bottom: 30px;
    text-align: center;
}

.event-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.event-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.event-card:hover {
    transform: translateY(-5px);
}

.event-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.event-info {
    padding: 15px;
}

.event-info h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.event-info p {
    margin-bottom: 8px;
    font-size: 14px;
}

.btn {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-primary {
    background-color: #e74c3c;
}

.btn-primary:hover {
    background-color: #c0392b;
}

/* 精彩内容 */
.highlight {
    padding: 40px 0;
    background-color: #f4f4f4;
}

.highlight h2 {
    margin-bottom: 30px;
    text-align: center;
}

.highlight-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.highlight-item {
    text-align: center;
}

.highlight-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.highlight-item h3 {
    color: #2c3e50;
}

/* 直播入口 */
.live-entry {
    padding: 40px 0;
    background-color: #fff;
}

.live-entry h2 {
    margin-bottom: 30px;
    text-align: center;
}

.live-card {
    display: flex;
    gap: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.live-img {
    position: relative;
    width: 40%;
}

.live-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e74c3c;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.live-info {
    padding: 20px;
    width: 60%;
}

.live-info h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.live-info p {
    margin-bottom: 15px;
    font-size: 14px;
}

/* 积分榜入口 */
.ranking-entry {
    padding: 40px 0;
    background-color: #3498db;
    color: #fff;
}

.ranking-entry h2 {
    margin-bottom: 30px;
    text-align: center;
}

.ranking-types {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.ranking-type {
    background-color: rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.ranking-type:hover {
    background-color: rgba(255,255,255,0.3);
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ranking-card {
    display: flex;
    align-items: center;
    background-color: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
}

.rank {
    font-size: 24px;
    font-weight: bold;
    width: 50px;
    text-align: center;
}

.ranking-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.user-info h4 {
    font-size: 16px;
    margin-bottom: 3px;
}

.user-info p {
    font-size: 14px;
    opacity: 0.8;
}

.points {
    font-size: 20px;
    font-weight: bold;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: #3498db;
}

.footer-section p {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    font-size: 14px;
    opacity: 0.8;
}

/* 统计页面样式 */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #3498db;
    margin-top: 10px;
}

.stats-section {
    margin-bottom: 40px;
}

.chart-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.type-stats, .distribution-stats {
    list-style: none;
}

.type-stats li, .distribution-stats li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-name, .type-name {
    width: 120px;
    font-weight: bold;
}

.progress-bar {
    flex: 1;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: #3498db;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.stat-count, .type-count {
    width: 100px;
    text-align: right;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.stats-table th, .stats-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.stats-table th {
    background-color: #3498db;
    color: #fff;
    font-weight: bold;
}

.trend-stats {
    list-style: none;
    display: flex;
    gap: 10px;
    align-items: end;
    height: 300px;
    padding: 20px 0;
}

.trend-stats li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-month {
    font-size: 12px;
    font-weight: bold;
}

.bar-chart {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bar {
    width: 80%;
    background-color: #3498db;
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
}

/* 支付页面样式 */
.payment-info {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.payment-info h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.event-details, .payment-details {
    margin-bottom: 20px;
}

.event-details p, .payment-details p {
    margin-bottom: 10px;
    font-size: 16px;
}

.payment-result {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.success-message h2 {
    color: #27ae60;
    margin-bottom: 20px;
}

.error-message h2 {
    color: #e74c3c;
    margin-bottom: 20px;
}

.result-details {
    margin: 30px 0;
    text-align: left;
}

.result-details h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.action-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

/* 消息提示 */
.success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        width: 95%;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 10px;
    }
    
    .live-card {
        flex-direction: column;
    }
    
    .live-img, .live-info {
        width: 100%;
    }
    
    .live-img {
        height: 200px;
    }
    
    .ranking-types {
        flex-wrap: wrap;
    }
    
    /* 统计页面响应式 */
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .type-stats li, .distribution-stats li {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .stat-name, .type-name, .stat-count, .type-count {
        width: 100%;
        text-align: left;
    }
    
    .stats-table {
        font-size: 14px;
    }
    
    .stats-table th, .stats-table td {
        padding: 8px;
    }
    
    /* 横向滚动表格 */
    .stats-table-container {
        overflow-x: auto;
    }
    
    /* 趋势图表响应式 */
    .trend-stats {
        gap: 5px;
        height: 200px;
    }
    
    .bar-chart {
        height: 150px;
    }
    
    .stat-month {
        font-size: 10px;
    }
    
    /* 支付页面响应式 */
    .payment-info, .payment-result {
        padding: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .event-list, .highlight-list {
        grid-template-columns: 1fr;
    }
    
    .carousel-item {
        min-width: 250px;
    }
}