
:root {
    --blue-50: #eef6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #75a7ff;
    --blue-400: #3b82f6;
    --blue-500: #0d6efd;
    --blue-600: #0b57d0;
    --blue-700: #1e40af;
    --muted: #6b7280;
    --card: #ffffff;
    --bg: linear-gradient(135deg, #f7fbff 0%, #eef6ff 50%, #e0f2fe 100%);
    --danger: #ef4444;
    --success: #10b981;
    --text: #1f2937;
}

html[data-theme="dark"] {
    --blue-50: #0f172a;
    --blue-100: #1e3a8a;
    --blue-200: #1e40af;
    --blue-300: #1e7fe0;
    --blue-400: #3b82f6;
    --blue-500: #0d6efd;
    --blue-600: #3b82f6;
    --blue-700: #60a5fa;
    --muted: #d1d5db;
    --card: #1f2937;
    --bg: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e3a8a 100%);
    --danger: #fca5a5;
    --success: #86efac;
    --text: #f0f4f8;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: var(--bg);
    background-attachment: fixed;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    transition: background 400ms ease, color 400ms ease;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 40px auto;
    padding: 24px 40px;
    display: block;
}

.banner-section {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #f0f0f0;
}

.banner-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 350px;
    object-fit: cover;
}

nav {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 18px 32px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.08);
    border-bottom: 1px solid rgba(13, 110, 253, 0.1);
    transition: all 300ms ease;
}

.nav-brand {
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.logo {
    height: 24px;
    width: auto;
    object-fit: contain;
}

html[data-theme="dark"] nav {
    background: rgba(31, 41, 55, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom-color: rgba(59, 130, 246, 0.1);
}

nav a {
    color: var(--blue-600);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 200ms ease;
    font-size: 0.95rem;
}

nav a:hover {
    background: rgba(13, 110, 253, 0.12);
    color: var(--blue-700);
    transform: translateY(-1px);
}

.theme-toggle {
    margin-left: auto;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 200ms ease;
    box-shadow: none;
}

.theme-toggle:hover {
    background: rgba(13, 110, 253, 0.1);
    transform: scale(1.1);
}

.nav-user {
    margin-right: 8px;
    margin-left: auto;
    padding: 10px 16px;
    color: var(--blue-600);
    font-weight: 600;
    font-size: 0.95rem;
    background: rgba(13, 110, 253, 0.06);
    border-radius: 10px;
    border: 1px solid rgba(13, 110, 253, 0.2);
    animation: slideIn 300ms ease-out;
    white-space: nowrap;
}

.nav-logout {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.nav-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

hr { border: 0; height: 1px; background: transparent; margin: 0; }

h1, h2 { 
    color: var(--text);
    margin: 0 0 16px 0;
    font-weight: 700;
    letter-spacing: -0.5px;
    animation: fadeInDown 500ms ease-out;
}
h2 { font-size: 1.6rem; }
h1 { font-size: 2rem; }

.card {
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.95) 100%);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 12px 40px rgba(13, 110, 253, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(13, 110, 253, 0.06);
    backdrop-filter: blur(10px);
    transition: all 300ms ease;
    animation: fadeInUp 500ms ease-out;
}

html[data-theme="dark"] .card {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.95) 100%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
    border-color: rgba(59, 130, 246, 0.1);
}

.card:hover {
    box-shadow: 0 16px 50px rgba(13, 110, 253, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: rgba(13, 110, 253, 0.12);
    transform: translateY(-2px);
}

html[data-theme="dark"] .card:hover {
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Auth Page Styles */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.95) 100%);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(13, 110, 253, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(13, 110, 253, 0.08);
    animation: slideUp 600ms ease-out;
}

html[data-theme="dark"] .auth-card {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.98) 0%, rgba(17, 24, 39, 0.98) 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(59, 130, 246, 0.12);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

html[data-theme="dark"] .auth-header h2 {
    background: linear-gradient(135deg, #93c5fd 0%, #bfdbfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0;
}

html[data-theme="dark"] .auth-subtitle {
    color: #cbd5e1;
}

.auth-form {
    margin: 25px 0;
}

.form-group {
    margin-bottom: 20px;
    animation: fadeIn 400ms ease-out;
}

.form-group:nth-child(1) {
    animation-delay: 100ms;
}

.form-group:nth-child(2) {
    animation-delay: 200ms;
}

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

html[data-theme="dark"] .form-group label {
    color: #e0f2fe;
}

form { margin-top: 20px; }

input[type="text"], input[type="password"], input[type="email"], input[type="file"], textarea, select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid rgba(13, 110, 253, 0.15);
    border-radius: 12px;
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    outline: none;
    transition: all 200ms ease;
    font-size: 0.95rem;
    color: var(--text);
}

html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="file"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.9) 0%, rgba(17, 24, 39, 0.9) 100%);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--text);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.08), 0 8px 24px rgba(13, 110, 253, 0.1);
    background: #fff;
    transform: translateY(-2px);
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
    background: rgba(31, 41, 55, 0.95);
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1), 0 8px 24px rgba(96, 165, 250, 0.15);
}

input::placeholder {
    color: #9ca3af;
}

button {
    display: inline-block;
    padding: 12px 24px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-600) 100%);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 200ms ease;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.2);
}

.auth-button {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    animation: fadeIn 400ms ease-out 300ms both;
}

button:hover { 
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.3);
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-700) 100%);
}

button:active {
    transform: translateY(0);
}

button.secondary {
    background: transparent;
    color: var(--blue-600);
    border: 1.5px solid rgba(13, 110, 253, 0.2);
    box-shadow: none;
}

button.secondary:hover {
    background: rgba(13, 110, 253, 0.06);
    box-shadow: none;
}

p { margin: 12px 0 0 0; }

.message { 
    color: #065f46; 
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
    padding: 14px 16px;
    border-radius: 12px;
    border-left: 4px solid var(--success);
    font-weight: 500;
    animation: slideDown 300ms ease-out;
}

html[data-theme="dark"] .message {
    color: #86efac;
    background: linear-gradient(135deg, rgba(134, 239, 172, 0.12) 0%, rgba(134, 239, 172, 0.06) 100%);
    border-left-color: #86efac;
}

.error { 
    color: #991b1b;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.04) 100%);
    padding: 14px 16px;
    border-radius: 12px;
    border-left: 4px solid var(--danger);
    font-weight: 500;
}

html[data-theme="dark"] .error {
    color: #fca5a5;
    background: linear-gradient(135deg, rgba(252, 165, 165, 0.12) 0%, rgba(252, 165, 165, 0.06) 100%);
    border-left-color: #fca5a5;
}

.error-banner {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.08) 100%);
    color: var(--danger);
    padding: 14px 16px;
    border-radius: 12px;
    border-left: 4px solid var(--danger);
    margin-bottom: 20px;
    font-weight: 600;
    animation: shake 400ms ease-out;
}

html[data-theme="dark"] .error-banner {
    background: linear-gradient(135deg, rgba(252, 165, 165, 0.12) 0%, rgba(252, 165, 165, 0.08) 100%);
    color: #fca5a5;
    border-left-color: #fca5a5;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(13, 110, 253, 0.08);
}

.auth-footer p {
    margin: 0;
    color: var(--muted);
}

html[data-theme="dark"] .auth-footer p {
    color: #cbd5e1;
}

.auth-footer a {
    color: var(--blue-600);
    text-decoration: none;
    font-weight: 600;
    transition: all 200ms ease;
}

.auth-footer a:hover {
    color: var(--blue-700);
    text-decoration: underline;
}

html[data-theme="dark"] .auth-footer a:hover {
    color: #60a5fa;
}

/* Leaderboard table */
table.leaderboard { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    animation: fadeInUp 500ms ease-out;
}

table.leaderboard th, table.leaderboard td { 
    text-align: left; 
    padding: 16px 18px;
}

table.leaderboard thead th { 
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.08) 0%, rgba(13, 110, 253, 0.04) 100%);
    color: var(--text);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(13, 110, 253, 0.1);
}

html[data-theme="dark"] table.leaderboard thead th {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
    color: #e0f2fe;
    border-bottom-color: rgba(59, 130, 246, 0.2);
}

table.leaderboard tbody tr { 
    background: var(--card);
    border-bottom: 1px solid rgba(13, 110, 253, 0.06);
    transition: all 200ms ease;
}

table.leaderboard tbody tr:hover { 
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.04) 0%, rgba(13, 110, 253, 0.02) 100%);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.06);
    transform: translateX(4px);
}

html[data-theme="dark"] table.leaderboard tbody tr {
    color: #e0f2fe;
    border-bottom-color: rgba(59, 130, 246, 0.08);
}

html[data-theme="dark"] table.leaderboard tbody tr:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);
}

table.leaderboard tbody tr:last-child {
    border-bottom: none;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue-300) 0%, var(--blue-500) 100%);
    color: white;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
    transition: all 300ms ease;
}

.rank-badge:nth-child(1) {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.username-cell { 
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
}

html[data-theme="dark"] .username-cell {
    color: #e0f2fe;
}

.leaderboard-empty { 
    padding: 32px 18px;
    color: var(--muted);
    text-align: center;
    font-style: italic;
}

.meta { 
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Upload form specific */
.upload-area { display: flex; flex-direction: column; gap: 16px; }

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Upload form specific */
.upload-area { display: flex; flex-direction: column; gap: 16px; }

.upload-card {
    max-width: 600px;
    margin: 40px auto;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 2px dashed rgba(13, 110, 253, 0.3);
    padding: 20px;
    text-align: center;
    background: rgba(13, 110, 253, 0.02);
    transition: all 200ms ease;
}

.file-input-wrapper:hover {
    border-color: rgba(13, 110, 253, 0.6);
    background: rgba(13, 110, 253, 0.04);
}

html[data-theme="dark"] .file-input-wrapper {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.02);
}

html[data-theme="dark"] .file-input-wrapper:hover {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(59, 130, 246, 0.04);
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-input-label {
    display: block;
    color: var(--blue-600);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

html[data-theme="dark"] .file-input-label {
    color: #93c5fd;
}

.upload-info {
    margin-top: 24px;
    padding: 18px;
    background: rgba(13, 110, 253, 0.04);
    border-radius: 12px;
    border-left: 4px solid var(--blue-500);
    animation: slideUp 600ms ease-out 400ms both;
}

html[data-theme="dark"] .upload-info {
    background: rgba(59, 130, 246, 0.06);
    border-left-color: #60a5fa;
}

.upload-info-title {
    margin: 0 0 12px 0;
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
}

.upload-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.upload-info-list li {
    padding: 6px 0;
    color: var(--text);
    font-size: 0.9rem;
}

.upload-info-list strong {
    color: var(--blue-600);
    font-weight: 700;
}

html[data-theme="dark"] .upload-info-list strong {
    color: #93c5fd;
}

/* Loading state styles */
.loading-state {
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 300ms ease-out;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid rgba(13, 110, 253, 0.15);
    border-top-color: var(--blue-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

html[data-theme="dark"] .spinner {
    border-color: rgba(59, 130, 246, 0.15);
    border-top-color: #60a5fa;
}

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

.loading-state p {
    color: var(--text);
    font-weight: 600;
    margin: 0;
    font-size: 1.05rem;
}

/* Success state styles */
.success-state {
    text-align: center;
    padding: 40px 20px;
    animation: slideUp 400ms ease-out;
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.12);
    border-radius: 50%;
    font-size: 2.5rem;
    color: var(--success);
    animation: popIn 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-state p {
    margin: 0 0 8px 0;
    color: var(--text);
    font-weight: 600;
    font-size: 1.2rem;
}

.success-subtitle {
    color: var(--muted);
    font-size: 0.95rem !important;
    font-weight: 500 !important;
}

/* Competition Info Page */
.competition-card {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 48px 56px;
}

.competition-card .auth-header {
    padding-bottom: 32px;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(13, 110, 253, 0.1);
}

.competition-section {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(13, 110, 253, 0.1);
}

.competition-section:last-of-type {
    border-bottom: none;
}

.competition-section h3 {
    color: var(--text);
    font-size: 1.3rem;
    margin: 0 0 16px 0;
    font-weight: 700;
}

html[data-theme="dark"] .competition-section h3 {
    color: #e0f2fe;
}

.competition-section p {
    color: var(--text);
    line-height: 1.8;
    margin: 0 0 12px 0;
}

html[data-theme="dark"] .competition-section p {
    color: #e0f2fe;
}

.competition-section a {
    color: var(--blue-600);
    text-decoration: none;
    font-weight: 600;
    transition: all 200ms ease;
}

.competition-section a:hover {
    color: var(--blue-700);
    text-decoration: underline;
}

html[data-theme="dark"] .competition-section a {
    color: #93c5fd;
}

html[data-theme="dark"] .competition-section a:hover {
    color: #bfdbfe;
}

.competition-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
}

.competition-list li {
    padding: 10px 0 10px 28px;
    position: relative;
    color: var(--text);
    line-height: 1.6;
}

html[data-theme="dark"] .competition-list li {
    color: #e0f2fe;
}

.competition-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--blue-600);
    font-weight: 700;
}

html[data-theme="dark"] .competition-list li:before {
    color: #93c5fd;
}

.competition-list strong {
    color: var(--text);
    font-weight: 700;
}

html[data-theme="dark"] .competition-list strong {
    color: #e0f2fe;
}

.info-box {
    background: rgba(13, 110, 253, 0.04);
    border: 1.5px solid rgba(13, 110, 253, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 0;
}

html[data-theme="dark"] .info-box {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.15);
}

.competition-cta {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.cta-button {
    flex: 1;
    min-width: 200px;
    padding: 16px 24px;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    transition: all 200ms ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
}

.cta-button {
    background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-600) 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(13, 110, 253, 0.3);
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-700) 100%);
}

.cta-button.secondary {
    background: transparent;
    color: var(--blue-600);
    border: 1.5px solid rgba(13, 110, 253, 0.3);
    box-shadow: none;
}

.cta-button.secondary:hover {
    background: rgba(13, 110, 253, 0.06);
    border-color: rgba(13, 110, 253, 0.6);
    box-shadow: none;
}

html[data-theme="dark"] .cta-button.secondary {
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.4);
}

html[data-theme="dark"] .cta-button.secondary:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.7);
}

/* Dataset file boxes */
.dataset-file {
    background: rgba(13, 110, 253, 0.04);
    border: 1px solid rgba(13, 110, 253, 0.1);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
}

html[data-theme="dark"] .dataset-file {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.15);
}

.dataset-file h4 {
    margin: 0 0 10px 0;
    color: var(--blue-600);
    font-size: 1.1rem;
    font-weight: 700;
}

html[data-theme="dark"] .dataset-file h4 {
    color: #93c5fd;
}

.dataset-file p {
    margin: 6px 0;
    font-size: 0.9rem;
    color: var(--text);
}

html[data-theme="dark"] .dataset-file p {
    color: #e0f2fe;
}

/* Submission box */
.submission-box {
    background: rgba(16, 185, 129, 0.04);
    border: 1.5px solid rgba(16, 185, 129, 0.15);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
}

html[data-theme="dark"] .submission-box {
    background: rgba(134, 239, 172, 0.06);
    border-color: rgba(134, 239, 172, 0.2);
}

.submission-box h4 {
    margin: 0 0 12px 0;
    color: var(--success);
    font-size: 1.05rem;
    font-weight: 700;
}

html[data-theme="dark"] .submission-box h4 {
    color: #86efac;
}

.submission-box p {
    margin: 8px 0;
    color: var(--text);
}

html[data-theme="dark"] .submission-box p {
    color: #e0f2fe;
}

/* Code example box */
.code-example {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.5) 0%, rgba(17, 24, 39, 0.5) 100%);
    border: 1px solid rgba(13, 110, 253, 0.1);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 18px;
    overflow-x: auto;
}

html[data-theme="dark"] .code-example {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.8) 0%, rgba(10, 15, 25, 0.8) 100%);
    border-color: rgba(59, 130, 246, 0.15);
}

.code-example h4 {
    margin: 0 0 12px 0;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
}

html[data-theme="dark"] .code-example h4 {
    color: #e0f2fe;
}

.code-example pre {
    margin: 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow-x: auto;
}

.code-example code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    color: #e0f2fe;
    line-height: 1.5;
}

html[data-theme="dark"] .code-example code {
    color: #c7d2e0;
}

/* Score box */
.score-box {
    background: rgba(59, 130, 246, 0.06);
    border: 1.5px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
}

.score-box h4 {
    margin: 0 0 12px 0;
    color: var(--blue-600);
    font-size: 1.05rem;
    font-weight: 700;
}

html[data-theme="dark"] .score-box h4 {
    color: #93c5fd;
}

.score-box p {
    color: var(--text);
}

html[data-theme="dark"] .score-box p {
    color: #e0f2fe;
}

.score-box p code {
    background: rgba(13, 110, 253, 0.08);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Monaco', 'Courier New', monospace;
    color: var(--blue-600);
    font-size: 0.9rem;
}

html[data-theme="dark"] .score-box p code {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

/* Inline code */
code {
    background: rgba(13, 110, 253, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--blue-600);
}

html[data-theme="dark"] code {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

/* Small screens */
@media (max-width: 640px) {
    .container { padding: 16px; margin: 18px auto; }
    nav { padding: 12px 16px; gap: 8px; flex-wrap: wrap; }
    h2 { font-size: 1.3rem; }
    .card { padding: 20px; }
    .auth-card { padding: 24px; }
    .competition-card { padding: 24px 20px; }
    table.leaderboard th, table.leaderboard td { padding: 12px 10px; }
    .auth-container { min-height: calc(100vh - 80px); }
}

/* Utility classes */
.text-center { text-align: center; }
.muted { color: var(--muted); }

/* Accessibility focus */
a:focus, button:focus, input:focus {
    outline: 2px solid var(--blue-500);
    outline-offset: 2px;
}

