@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap");

:root {
    --bg-primary: #f6f8fc;
    --bg-secondary: #ffffff;
    --bg-soft: #eef3ff;
    --bg-card: rgba(255,255,255,0.92);
    --bg-card-hover: #ffffff;
    --accent: #5b7cff;
    --accent-2: #8f7bff;
    --accent-3: #27c1a5;
    --accent-gradient: linear-gradient(135deg, #5b7cff 0%, #8f7bff 55%, #27c1a5 100%);
    --danger: #e45757;
    --success: #1f9d6d;
    --info: #2f80ed;
    --warning: #d49c20;
    --text: #1d2740;
    --text-soft: #3a4767;
    --text-muted: #6b7895;
    --border: rgba(91, 124, 255, 0.14);
    --border-strong: rgba(91, 124, 255, 0.24);
    --shadow: 0 18px 45px rgba(55, 84, 170, 0.12);
    --shadow-soft: 0 10px 30px rgba(55, 84, 170, 0.08);
    --radius: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Outfit', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(143,123,255,0.12), transparent 35%),
        radial-gradient(circle at 90% 10%, rgba(39,193,165,0.10), transparent 25%),
        linear-gradient(180deg, #fbfcff 0%, #f5f7fc 55%, #eef4ff 100%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; }

body::before,
body::after {
    content: '';
    position: fixed;
    inset: auto;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(18px);
}
body::before {
    width: 320px;
    height: 320px;
    top: 70px;
    left: -90px;
    background: rgba(91, 124, 255, 0.08);
}
body::after {
    width: 280px;
    height: 280px;
    right: -80px;
    top: 320px;
    background: rgba(39, 193, 165, 0.07);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 700px; }
.container-md { max-width: 900px; }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.top-banner {
    background: linear-gradient(135deg, rgba(91,124,255,0.95), rgba(143,123,255,0.95));
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.92em;
    font-weight: 600;
}
.top-banner strong { font-weight: 800; }

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(255,255,255,0.78);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(91, 124, 255, 0.10);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar .logo {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1;
}
.navbar .logo strong {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.navbar .logo span {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
}
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a {
    color: var(--text-soft);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.25s ease;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    background: rgba(91,124,255,0.10);
}
.nav-links .btn-nav {
    background: var(--accent-gradient);
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(91,124,255,0.20);
}
.mobile-menu-btn {
    display: none;
    background: rgba(91,124,255,0.08);
    border: 1px solid var(--border);
    color: var(--accent);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1.2em;
    cursor: pointer;
}

.page-shell { padding-bottom: 40px; }

.hero {
    text-align: center;
    padding: 78px 20px 30px;
    position: relative;
}
.hero h1 {
    font-size: clamp(2.45rem, 5vw, 4.7rem);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -0.045em;
    margin-bottom: 18px;
}
.hero h1 .highlight,
.section-title .highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    max-width: 860px;
    margin: 0 auto 24px;
    color: var(--text-muted);
    font-size: 1.08rem;
    line-height: 1.75;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 34px;
}
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    max-width: 980px;
    margin: 0 auto;
}
.hero-stat {
    background: rgba(255,255,255,0.82);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
}
.hero-stat .number {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-stat .label {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.hero-event-card {
    max-width: 1060px;
    margin: 34px auto 0;
    padding: 26px;
    background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(240,245,255,0.96));
    border: 1px solid var(--border-strong);
    border-radius: 28px;
    box-shadow: var(--shadow);
    text-align: left;
}
.hero-event-card .eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(91,124,255,0.10);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.event-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 22px;
    align-items: stretch;
}
.event-info h2,
.section-title {
    font-size: clamp(1.7rem, 3.5vw, 2.55rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}
.event-info p,
.section-subtitle {
    color: var(--text-muted);
    line-height: 1.75;
}
.event-points {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}
.event-point {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.74);
    border: 1px solid rgba(91,124,255,0.10);
}
.event-point strong { display: block; margin-bottom: 3px; }
.event-point span { color: var(--text-muted); font-size: 0.95rem; line-height: 1.55; }
.point-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: rgba(91,124,255,0.12);
}
.event-side {
    background: linear-gradient(180deg, rgba(91,124,255,0.08), rgba(39,193,165,0.08));
    border-radius: 22px;
    padding: 22px;
    border: 1px solid rgba(91,124,255,0.10);
}
.info-list { display: grid; gap: 12px; }
.info-list .item {
    background: rgba(255,255,255,0.76);
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(91,124,255,0.08);
}
.info-list .label {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.info-list .value {
    font-weight: 700;
    color: var(--text);
    line-height: 1.5;
}
.notice-box {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(255,255,255,0.78);
    border: 1px dashed rgba(91,124,255,0.22);
    color: var(--text-soft);
    line-height: 1.65;
    font-size: 0.96rem;
}

.section {
    padding: 18px 0 0;
}
.section-heading {
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-family: 'Outfit', sans-serif;
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 16px 34px rgba(91,124,255,0.22);
}
.btn-outline {
    background: rgba(255,255,255,0.7);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-outline:hover {
    border-color: rgba(91,124,255,0.38);
    color: var(--accent);
}
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-info { background: var(--info); color: #fff; }
.btn-sm { padding: 10px 16px; font-size: 0.86rem; }
.btn-lg { padding: 16px 30px; font-size: 1rem; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-soft);
    transition: all 0.25s ease;
}
.card:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(91,124,255,0.10);
}
.card-header h2 { font-size: 1.2rem; font-weight: 800; }
.feature-card {
    position: relative;
    overflow: hidden;
}
.feature-card::after {
    content: '';
    position: absolute;
    inset: auto -40px -50px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(91,124,255,0.06);
}
.feature-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: rgba(91,124,255,0.10);
    margin-bottom: 18px;
}
.feature-card h3 { margin-bottom: 10px; font-size: 1.08rem; }
.feature-card p { color: var(--text-muted); line-height: 1.7; }

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-soft);
}
.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(91,124,255,0.18);
    border-radius: 14px;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all 0.2s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(91,124,255,0.12);
    background: #fff;
}
select.form-control { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.table-wrapper { overflow-x: auto; border-radius: 18px; }
table { width: 100%; border-collapse: collapse; }
table th {
    background: rgba(91,124,255,0.08);
    color: var(--accent);
    font-weight: 800;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 18px;
    text-align: left;
}
table td {
    padding: 15px 18px;
    border-bottom: 1px solid rgba(91,124,255,0.08);
    font-size: 0.96rem;
}
table tr:hover td { background: rgba(91,124,255,0.03); }

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
}
.badge-success { background: rgba(31,157,109,0.12); color: var(--success); }
.badge-danger { background: rgba(228,87,87,0.12); color: var(--danger); }
.badge-warning { background: rgba(212,156,32,0.12); color: var(--warning); }
.badge-info { background: rgba(47,128,237,0.12); color: var(--info); }

.alert {
    padding: 16px 18px;
    border-radius: 16px;
    margin-bottom: 18px;
    font-weight: 600;
    line-height: 1.6;
}
.alert-success { background: rgba(31,157,109,0.10); border: 1px solid rgba(31,157,109,0.20); color: var(--success); }
.alert-danger { background: rgba(228,87,87,0.10); border: 1px solid rgba(228,87,87,0.18); color: var(--danger); }
.alert-warning { background: rgba(212,156,32,0.10); border: 1px solid rgba(212,156,32,0.20); color: var(--warning); }
.alert-info { background: rgba(47,128,237,0.10); border: 1px solid rgba(47,128,237,0.18); color: var(--info); }

.phase-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 22px 0 0;
    flex-wrap: wrap;
}
.phase-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255,255,255,0.82);
    border: 1px solid var(--border);
}
.phase-item.active { background: rgba(91,124,255,0.12); color: var(--accent); border-color: rgba(91,124,255,0.28); }
.phase-item.done { background: rgba(31,157,109,0.10); color: var(--success); border-color: rgba(31,157,109,0.24); }

.quiz-container { max-width: 760px; margin: 40px auto; }
.timer-bar {
    width: 100%;
    height: 8px;
    background: rgba(91,124,255,0.12);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 26px;
}
.timer-fill { height: 100%; background: var(--accent-gradient); transition: width 0.1s linear; border-radius: 999px; }
.timer-fill.danger { background: linear-gradient(135deg, #ff7f50, #e45757); }
.timer-display { text-align: center; font-family: 'Space Mono', monospace; font-size: 3em; font-weight: 700; margin-bottom: 10px; color: var(--accent); }
.timer-display.danger { color: var(--danger); }
.question-number { text-align: center; font-size: 0.9em; color: var(--text-muted); margin-bottom: 18px; }
.question-text { font-size: 1.5em; font-weight: 800; text-align: center; margin-bottom: 30px; line-height: 1.45; }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.option-btn {
    padding: 18px 20px;
    background: rgba(255,255,255,0.92);
    border: 2px solid rgba(91,124,255,0.14);
    border-radius: 16px;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}
.option-btn:hover { border-color: var(--accent); background: #fff; transform: translateY(-1px); }
.option-btn .option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(91,124,255,0.12);
    font-weight: 800;
    font-size: 0.9em;
    flex-shrink: 0;
}
.option-btn.correct { border-color: var(--success); background: rgba(31,157,109,0.10); }
.option-btn.correct .option-letter { background: var(--success); color: #fff; }
.option-btn.wrong { border-color: var(--danger); background: rgba(228,87,87,0.10); }
.option-btn.wrong .option-letter { background: var(--danger); color: #fff; }
.option-btn.disabled { pointer-events: none; opacity: 0.72; }

.result-card { text-align: center; padding: 60px 30px; }
.result-score {
    font-family: 'Space Mono', monospace;
    font-size: 5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.result-label { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 26px; }

.bracket { display: flex; gap: 28px; overflow-x: auto; padding: 10px 0; }
.bracket-round { min-width: 240px; }
.bracket-round-title {
    text-align: center;
    font-weight: 800;
    font-size: 0.84rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}
.bracket-match {
    background: rgba(255,255,255,0.88);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}
.bracket-player {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(91,124,255,0.08);
}
.bracket-player:last-child { border-bottom: none; }
.bracket-player.winner { background: rgba(91,124,255,0.08); font-weight: 800; }
.bracket-player .score { font-family: 'Space Mono', monospace; font-weight: 700; color: var(--accent); }

.group-card { margin-bottom: 30px; }
.group-title {
    font-size: 1.05rem;
    font-weight: 800;
    padding: 14px 18px;
    background: rgba(91,124,255,0.08);
    border-radius: 16px 16px 0 0;
    border: 1px solid var(--border);
    border-bottom: none;
}
.match-card {
    background: rgba(255,255,255,0.88);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-soft);
}
.match-player { flex: 1; text-align: center; }
.match-player .name { font-weight: 800; font-size: 1rem; }
.match-player .company { font-size: 0.84rem; color: var(--text-muted); }
.match-vs {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent);
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(91,124,255,0.08);
}
.match-score { font-family: 'Space Mono', monospace; font-size: 1.5rem; font-weight: 700; }
.match-date { font-size: 0.82rem; color: var(--text-muted); text-align: center; margin-top: 8px; }

.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 260px;
    background: rgba(255,255,255,0.92);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 100;
}
.admin-sidebar .logo {
    padding: 0 24px;
    font-size: 1.25rem;
    font-weight: 900;
    margin-bottom: 30px;
    color: var(--accent);
}
.admin-sidebar .logo small { display: block; font-size: 0.6em; color: var(--text-muted); font-weight: 500; margin-top: 4px; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    color: var(--accent);
    background: rgba(91,124,255,0.08);
    border-left-color: var(--accent);
}
.admin-content { margin-left: 260px; flex: 1; padding: 30px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.admin-header h1 { font-size: 1.6rem; font-weight: 900; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat-card {
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow-soft);
}
.stat-card .stat-value {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-card .stat-label { font-size: 0.86rem; color: var(--text-muted); margin-top: 4px; }
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(32, 42, 76, 0.35);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.5em; cursor: pointer; }

.footer {
    text-align: center;
    padding: 44px 20px 58px;
    border-top: 1px solid rgba(91,124,255,0.10);
    margin-top: 72px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer strong { color: var(--text); }
.footer a { color: var(--accent); text-decoration: none; font-weight: 700; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeIn 0.5s ease-out forwards; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.pulse { animation: pulse 2s ease-in-out infinite; }

@media (max-width: 992px) {
    .event-grid { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .navbar { padding: 14px 18px; }
    .mobile-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(18px);
        flex-direction: column;
        padding: 18px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-soft);
    }
    .nav-links.open { display: flex; }
    .hero { padding-top: 60px; }
    .hero-actions, .phase-bar { flex-direction: column; align-items: stretch; }
    .hero-stats { grid-template-columns: 1fr; }
    .options-grid, .form-row { grid-template-columns: 1fr; }
    .match-card { flex-direction: column; text-align: center; }
    .bracket { flex-direction: column; }
    .admin-layout { display: block; }
    .admin-sidebar { position: relative; width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
    .admin-content { margin-left: 0; padding: 20px; }
}

@media (max-width: 560px) {
    .hero h1 { font-size: 2.1rem; }
    .section-title { font-size: 1.75rem; }
    .card, .hero-event-card { padding: 22px; }
    table th, table td { padding: 12px 14px; }
}
