/* 星芒高校联盟赛事系统 - 样式表 */
:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --accent: #d4af37;
    --accent-light: #e6c65a;
    --bg: #f7fafc;
    --bg-dark: #edf2f7;
    --text: #2d3748;
    --text-light: #718096;
    --white: #ffffff;
    --success: #38a169;
    --warning: #d69e2e;
    --danger: #e53e3e;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-sm: 4px;
}

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

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* 导航栏 */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo-icon { color: var(--accent); font-size: 1.5rem; }

.nav-links { display: flex; gap: 32px; }

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active { color: var(--primary); }

.nav-auth, .nav-user { display: flex; align-items: center; gap: 12px; }

.user-dropdown { position: relative; cursor: pointer; }

.user-name {
    padding: 8px 16px;
    background: var(--bg);
    border-radius: var(--radius);
    font-weight: 500;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    display: none;
    overflow: hidden;
}

.user-dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-menu a:hover { background: var(--bg); }

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover { background: var(--primary-light); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-accent { background: var(--accent); color: var(--primary); }
.btn-accent:hover { background: var(--accent-light); }

.btn-secondary { background: #4a5568; color: var(--white); }
.btn-secondary:hover { background: #2d3748; }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-sm { padding: 6px 12px; font-size: 0.875rem; }
.btn-lg { padding: 14px 28px; font-size: 1.1rem; }

/* 主内容区 */
.main-content { flex: 1; padding: 40px 0; }

/* 卡片 */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 1.1rem;
}

.card-body { padding: 24px; }

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

textarea.form-control { min-height: 120px; resize: vertical; }

.form-hint { font-size: 0.875rem; color: var(--text-light); margin-top: 4px; }

/* 表格 */
.table-wrapper { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text);
    position: sticky;
    top: 0;
}

.table tr:hover { background: var(--bg); }

/* 状态标签 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-success { background: #c6f6d5; color: #22543d; }
.badge-warning { background: #fefcbf; color: #744210; }
.badge-danger { background: #fed7d7; color: #742a2a; }
.badge-info { background: #bee3f8; color: #2a4365; }
.badge-gray { background: var(--bg-dark); color: var(--text-light); }

/* 首页 Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 { font-size: 2.5rem; margin-bottom: 16px; }
.hero p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 32px; }

/* 赛事卡片 */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.event-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.event-cover {
    height: 180px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
}

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

.event-info { padding: 20px; }

.event-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 16px;
}

.event-meta span { display: flex; align-items: center; gap: 4px; }

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    background: var(--white);
    border: 1px solid var(--border);
}

.pagination a:hover { background: var(--bg); }
.pagination .active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* 页脚 */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 40px 0;
    margin-top: auto;
}

.footer-content { text-align: center; }
.footer-brand { font-size: 1.25rem; font-weight: 600; margin-bottom: 16px; }
.footer-links { margin-bottom: 16px; }
.footer-links a { color: rgba(255,255,255,0.8); text-decoration: none; margin: 0 12px; }
.footer-links a:hover { color: var(--white); }
.footer-copyright { font-size: 0.875rem; opacity: 0.7; }

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden { display: none; }

.modal-content {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
    width: 90%;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 { margin: 0; }

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body { padding: 24px; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 工具类 */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }

/* 响应式 */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 1.75rem; }
    .event-grid { grid-template-columns: 1fr; }
}
