/* ===== Index Page — Scoreboard Creator ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0b0a1a;
    min-height: 100vh;
    padding: 24px;
    color: #fff;
    position: relative;
    overflow-x: hidden;
}

/* Animated background grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

/* Floating orbs */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(600px circle at 15% 25%, rgba(251,191,36,0.08) 0%, transparent 70%),
        radial-gradient(500px circle at 85% 75%, rgba(99,102,241,0.08) 0%, transparent 70%),
        radial-gradient(400px circle at 50% 50%, rgba(236,72,153,0.05) 0%, transparent 70%);
}

.container {
    max-width: 920px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ---- Title ---- */
h1 {
    text-align: center;
    font-size: 3em;
    font-weight: 900;
    margin-bottom: 6px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 30%, #f7971e 60%, #ffd200 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 12px rgba(251,191,36,0.3));
}

.subtitle {
    text-align: center;
    color: rgba(148,163,184,0.8);
    margin-bottom: 36px;
    font-size: 1.1em;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* ---- Create Card ---- */
.create-card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 36px;
    margin-bottom: 36px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.06);
    position: relative;
    overflow: hidden;
}

.create-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(251,191,36,0.4), rgba(99,102,241,0.4), transparent);
}

.create-card h2 {
    margin-bottom: 24px;
    font-size: 1.4em;
    font-weight: 700;
    color: #fbbf24;
    letter-spacing: -0.3px;
}

.form-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.form-group { flex: 1; min-width: 200px; }

.form-group label {
    display: block;
    font-size: 0.8em;
    color: rgba(148,163,184,0.8);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 1em;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.25s ease;
}

.form-group input::placeholder { color: rgba(148,163,184,0.4); }

.form-group input:hover, .form-group select:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.07);
}

.form-group input:focus, .form-group select:focus {
    border-color: #fbbf24;
    background: rgba(251,191,36,0.06);
    box-shadow: 0 0 0 4px rgba(251,191,36,0.1), 0 4px 16px rgba(251,191,36,0.1);
}

.form-group select option { background: #15132b; color: #fff; }

/* ---- Buttons ---- */
.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #0b0a1a;
    box-shadow: 0 4px 20px rgba(251,191,36,0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 30px rgba(251,191,36,0.45);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 16px rgba(239,68,68,0.25);
}

.btn-danger:hover {
    box-shadow: 0 6px 24px rgba(239,68,68,0.4);
    transform: translateY(-2px);
}

.btn-play {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 4px 16px rgba(34,197,94,0.25);
    padding: 10px 24px;
}

.btn-play:hover {
    box-shadow: 0 6px 24px rgba(34,197,94,0.4);
    transform: translateY(-2px);
}

/* ---- Scoreboard List ---- */
.scoreboard-list { display: flex; flex-direction: column; gap: 12px; }

.scoreboard-item {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 18px;
    padding: 22px 26px;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s ease;
    flex-wrap: wrap;
    gap: 14px;
    position: relative;
}

.scoreboard-item::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 19px;
    background: linear-gradient(135deg, rgba(251,191,36,0.1), transparent, rgba(99,102,241,0.1));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scoreboard-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(251,191,36,0.2);
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.scoreboard-item:hover::before { opacity: 1; }

.scoreboard-info { flex: 1; min-width: 200px; }

.scoreboard-info h3 {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fbbf24;
    letter-spacing: -0.2px;
}

.scoreboard-info .players {
    color: rgba(148,163,184,0.8);
    font-size: 0.95em;
    font-weight: 400;
}

.scoreboard-info .meta {
    color: rgba(100,116,139,0.7);
    font-size: 0.78em;
    margin-top: 6px;
    font-weight: 400;
}

.scoreboard-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: rgba(100,116,139,0.6);
}

.empty-state .icon {
    font-size: 5em;
    margin-bottom: 20px;
    display: block;
    filter: grayscale(0.3);
}

.empty-state p { font-size: 1.15em; font-weight: 400; }

/* ---- Toast ---- */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    padding: 16px 28px;
    border-radius: 14px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95em;
    z-index: 9999;
    animation: toastIn 0.35s ease, toastOut 0.35s ease 2.85s forwards;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
}

.toast.success { background: rgba(34,197,94,0.9); }
.toast.error { background: rgba(239,68,68,0.9); }

@keyframes toastIn {
    from { transform: translateX(120px) scale(0.9); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes toastOut {
    to { transform: translateY(20px) scale(0.95); opacity: 0; }
}

/* ---- Theme Badge ---- */
.theme-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.72em;
    font-weight: 600;
    background: rgba(251,191,36,0.12);
    color: #fbbf24;
    margin-left: 8px;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

/* ---- Section Title ---- */
h2:not(.create-card h2) {
    margin-bottom: 18px;
    font-size: 1.3em;
    font-weight: 700;
    color: rgba(226,232,240,0.9);
    letter-spacing: -0.3px;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    body { padding: 16px; }
    h1 { font-size: 2.2em; }
    .create-card { padding: 24px; }
    .form-row { flex-direction: column; }
    .form-group { min-width: unset; }
    .scoreboard-item { flex-direction: column; align-items: stretch; }
    .scoreboard-actions { justify-content: flex-end; }
    .toast { left: 16px; right: 16px; bottom: 16px; text-align: center; }
}
