:root {
    --bg-primary: #0a0f1c;
    --bg-secondary: #151b2e;
    --bg-tertiary: #1a2236;
    --bg-card: #1e2642;
    --bg-hover: #252f4a;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-primary: #6366f1;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --accent-glow: rgba(99, 102, 241, 0.4);
    --red-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --blue-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-primary);
}

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

nav {
    background: rgba(21, 27, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

.logo svg {
    width: 32px;
    height: 32px;
}

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

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.hero {
    text-align: center;
    padding: 80px 0 60px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

section {
    padding: 60px 0;
}

section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-md);
}

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

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    nav .container { height: 56px; }
    .logo { font-size: 1.1rem; }
    .nav-links a { padding: 6px 12px; font-size: 0.9rem; }
    .hero { padding: 48px 0 32px; }
    .hero h1 { font-size: 2rem; }
    .hero .subtitle { font-size: 1rem; }
    section h2 { font-size: 1.25rem; }
    .card { padding: 16px; }
}

footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 8px 0;
}

footer .copyright {
    font-size: 0.85rem;
    opacity: 0.7;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
}

.tag-primary {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
}

.tag-secondary {
    background: rgba(6, 182, 212, 0.2);
    color: var(--accent-secondary);
}

.ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.ball:hover {
    transform: scale(1.1);
}

.ball.red {
    background: var(--red-gradient);
}

.ball.blue {
    background: var(--blue-gradient);
}

.mini-ball {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    margin: 2px;
}

.mini-ball.red {
    background: var(--red-gradient);
}

.mini-ball.blue {
    background: var(--blue-gradient);
}

.balls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px 0;
}

.balls-row .label {
    color: var(--text-muted);
    font-size: 0.9rem;
    width: 40px;
}

.balls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.table-container {
    overflow-x: auto;
}

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

th, td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

td {
    color: var(--text-primary);
}

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