:root {
    --primary: #00f2fe;
    --secondary: #4facfe;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-bg-light: rgba(255, 255, 255, 0.03);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #f472b6;
    --success: #22c55e;
    --warning: #f59e0b;
    --border: rgba(255, 255, 255, 0.1);
    --radius-lg: 1rem;
    --radius-md: 0.75rem;
    --radius-sm: 0.5rem;
    --space-xl: 2.5rem;
    --space-lg: 2rem;
    --space-md: 1rem;
    --space-sm: 0.5rem;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
    }
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.glass-card-sm {
    padding: var(--space-md);
    background: var(--card-bg-light);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

h1, h2, h3 {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    margin-top: 0;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

.btn {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

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

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

input[type="text"], 
input[type="password"], 
input[type="email"], 
input[type="number"], 
input[type="date"], 
input[type="time"],
select, 
textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.1);
}

/* Forms */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: rgba(34, 197, 94, 0.05);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid rgba(34, 197, 94, 0.1);
}

.checkbox-group label {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
}

.help-block, .form-text {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.text-danger, .invalid-feedback {
    display: block;
    font-size: 0.875rem;
    color: var(--accent);
    margin-top: 0.25rem;
}

/* Custom Checkbox */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--success);
    cursor: pointer;
}

.match-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.score-input {
    width: 60px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--secondary);
    color: white;
    border-radius: 0.5rem;
}

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

.standings-table th, .standings-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.timer-display {
    font-size: 4rem;
    font-weight: 800;
    text-align: center;
    font-family: monospace;
    color: var(--accent);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 5%;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-lg);
}

.nav-brand {
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.nav-brand h1 {
    margin: 0;
    font-size: 1.5rem;
}

.nav-brand span {
    font-size: 0.875rem;
    font-weight: 400;
    opacity: 0.8;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.winner-highlight {
    background: rgba(34, 197, 94, 0.1);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
}

.winner-text {
    color: var(--success);
    font-weight: 600;
}

.highlight-player {
    color: var(--primary);
}
