/* 自定义样式 */

/* 全局样式 */
body {
    font-family: 'Inter', system-ui, sans-serif;
    scroll-behavior: smooth;
}

/* 导航栏 */
header {
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 按钮样式 */
.btn-primary {
    @apply bg-primary text-white px-6 py-3 rounded-lg font-medium hover:bg-secondary transition-colors;
}

.btn-secondary {
    @apply bg-white text-primary border border-primary px-6 py-3 rounded-lg font-medium hover:bg-gray-100 transition-colors;
}

/* 卡片样式 */
.card {
    @apply bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition-shadow;
}

/* 标题样式 */
.section-title {
    @apply text-2xl font-bold text-dark mb-4;
}

.section-subtitle {
    @apply text-gray-600 mt-4 max-w-2xl mx-auto;
}

/* 分割线 */
.section-divider {
    @apply w-20 h-1 bg-primary mx-auto;
}

/* 图标背景 */
.icon-bg {
    @apply w-16 h-16 rounded-full flex items-center justify-center mb-4;
}

/* 表单样式 */
.form-input {
    @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .section-title {
        @apply text-xl;
    }
    
    .btn-primary,
    .btn-secondary {
        @apply px-4 py-2;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* 延迟动画 */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2563EB;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1D4ED8;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(37, 99, 235, 0.3);
    border-radius: 50%;
    border-top-color: #2563EB;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 悬停效果 */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.03);
}

/* 文本截断 */
.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 背景渐变 */
.bg-gradient-primary {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 100%);
}

/* 阴影效果 */
.shadow-card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-card-hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 文本阴影 */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 间距工具类 */
.mt-12 {
    margin-top: 3rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* 响应式工具类 */
@media (max-width: 640px) {
    .sm:text-center {
        text-align: center;
    }
    
    .sm:mx-auto {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .md:text-center {
        text-align: center;
    }
    
    .md:mx-auto {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 1024px) {
    .lg:text-center {
        text-align: center;
    }
    
    .lg:mx-auto {
        margin-left: auto;
        margin-right: auto;
    }
}

/* 赛事卡片样式 */
.event-card {
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 分类卡片样式 */
.category-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 导航栏激活状态 */
.nav-active {
    @apply text-primary font-medium;
}

/* 标签样式 */
.tag {
    @apply px-2 py-1 rounded text-xs font-medium;
}

.tag-primary {
    @apply bg-primary text-white;
}

.tag-secondary {
    @apply bg-secondary text-white;
}

.tag-accent {
    @apply bg-accent text-dark;
}

/* 搜索框样式 */
.search-input {
    @apply bg-gray-100 text-dark px-4 py-2 rounded-full focus:outline-none focus:ring-2 focus:ring-primary w-48 md:w-64;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #10B981;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

/* 评分星星样式 */
.stars {
    color: #F59E0B;
}

/* 加载更多按钮 */
.load-more {
    @apply bg-white text-primary border border-primary px-6 py-3 rounded-lg font-medium hover:bg-gray-100 transition-colors w-full text-center;
}

/* 分页样式 */
.pagination {
    @apply flex justify-center space-x-2 mt-8;
}

.pagination button {
    @apply bg-white text-primary border border-primary px-4 py-2 rounded-lg hover:bg-primary hover:text-white transition-colors;
}

.pagination button.active {
    @apply bg-primary text-white;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    transform: translateY(50px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

/* 视频播放器样式 */
.video-player {
    @apply w-full aspect-video bg-black rounded-lg overflow-hidden;
}

/* 评论样式 */
.comment {
    @apply bg-white rounded-lg p-4 mb-4 shadow-sm;
}

.comment-author {
    @apply font-semibold text-dark;
}

.comment-content {
    @apply text-gray-600 mt-2;
}

.comment-time {
    @apply text-gray-500 text-xs mt-2;
}

/* 排行榜样式 */
.ranking-item {
    @apply flex items-center p-4 border-b border-gray-200 hover:bg-gray-50 transition-colors;
}

.ranking-number {
    @apply text-accent font-bold text-xl mr-4;
}

.ranking-title {
    @apply text-dark font-medium;
}

.ranking-score {
    @apply text-gray-600 ml-auto;
}

/* 倒计时样式 */
.countdown {
    @apply flex space-x-4;
}

.countdown-item {
    @apply bg-dark text-white px-4 py-2 rounded-lg text-center;
}

.countdown-number {
    @apply text-2xl font-bold;
}

.countdown-label {
    @apply text-xs text-gray-400;
}

/* 表单验证样式 */
.form-error {
    @apply text-red-500 text-sm mt-1;
}

.form-success {
    @apply text-green-500 text-sm mt-1;
}

/* 按钮加载状态 */
.btn-loading {
    @apply opacity-75 cursor-not-allowed;
}

/* 赛事状态标签 */
.status-badge {
    @apply px-3 py-1 rounded-full text-sm font-medium;
}

.status-upcoming {
    @apply bg-blue-100 text-blue-800;
}

.status-active {
    @apply bg-green-100 text-green-800;
}

.status-ended {
    @apply bg-gray-100 text-gray-800;
}

/* 面包屑导航 */
.breadcrumb {
    @apply flex items-center space-x-2 text-sm text-gray-600;
}

.breadcrumb-item {
    @apply hover:text-primary transition-colors;
}

.breadcrumb-separator {
    @apply text-gray-400;
}

/* 页脚链接 */
.footer-link {
    @apply text-gray-400 hover:text-white transition-colors;
}

/* 社交媒体图标 */
.social-icon {
    @apply text-gray-400 hover:text-white transition-colors;
}

/* 合作伙伴标志 */
.partner-logo {
    @apply flex items-center justify-center p-4 bg-white rounded-lg shadow-sm hover:shadow-md transition-shadow;
}

/* 注册/登录表单 */
.auth-form {
    @apply bg-white p-8 rounded-lg shadow-md;
}

.auth-form-title {
    @apply text-2xl font-bold mb-6 text-center;
}

.auth-form-subtitle {
    @apply text-gray-600 mb-6 text-center;
}

/* 首页英雄区域 */
.hero-section {
    @apply pt-24 pb-16 bg-gradient text-white;
}

.hero-title {
    @apply text-4xl md:text-5xl font-bold mb-4 text-shadow;
}

.hero-subtitle {
    @apply text-lg md:text-xl mb-8;
}

/* 平台特色区域 */
.features-section {
    @apply py-16 bg-white;
}

.features-title {
    @apply text-3xl font-bold mb-4 text-center;
}

.features-subtitle {
    @apply text-gray-600 max-w-2xl mx-auto text-center mb-12;
}

/* 合作伙伴区域 */
.partners-section {
    @apply py-16 bg-gray-50;
}

.partners-title {
    @apply text-2xl font-bold mb-4 text-center;
}

.partners-subtitle {
    @apply text-gray-600 text-center mb-12;
}

/* 注册区域 */
.cta-section {
    @apply py-16 bg-gradient-accent text-white text-center;
}

.cta-title {
    @apply text-3xl font-bold mb-4;
}

.cta-subtitle {
    @apply text-lg mb-8 max-w-2xl mx-auto;
}

/* 页脚区域 */
.footer {
    @apply bg-dark text-white py-12;
}

.footer-title {
    @apply text-xl font-semibold mb-4;
}

.footer-subtitle {
    @apply text-lg font-semibold mb-4;
}

.footer-text {
    @apply text-gray-400;
}

.footer-bottom {
    @apply border-t border-gray-800 mt-8 pt-8 text-center text-gray-400;
}