html,
body {
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top, #111827, #020617 55%, #000);
    color: #e5e7eb;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

#particles-js {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.logo {
    font-family: 'Orbitron', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #22c55e;
}

.logo i {
    color: #22c55e;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.nav-links a {
    text-decoration: none;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: #e5e7eb;
    transition: 0.15s all ease-out;
    background: rgba(15, 23, 42, 0.8);
}

.nav-links a:hover {
    border-color: #22c55e;
    transform: translateY(-1px);
}

.nav-links a.primary {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    color: #022c22;
    font-weight: 600;
}

.nav-links a.danger {
    border-color: #f97373;
    color: #fecaca;
}

/* Content wrapper so footer stays at bottom */
.content {
    padding-bottom: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
    gap: 1.5rem;
    align-items: stretch;
    margin-top: 0.5rem;
}

/* Khusus homepage: hero lebih ke tengah layar */
.hero.hero-home {
    min-height: calc(100vh - 180px);
    align-items: center;
}

.hero-text h1 {
    font-family: 'Orbitron', system-ui, sans-serif;
    font-size: clamp(2rem, 3vw, 2.6rem);
    margin-bottom: 0.75rem;
    color: #f9fafb;
}

.hero-text p {
    color: #9ca3af;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-card {
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.1), rgba(15, 23, 42, 0.95));
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}

.hero-card h2 {
    font-family: 'Orbitron', system-ui, sans-serif;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.hero-card ul {
    list-style: none;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.hero-card li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-block: 0.2rem;
    color: #e5e7eb;
}

.hero-card li i {
    color: #22c55e;
    font-size: 0.7rem;
}

.hint {
    font-size: 0.8rem;
    color: #a5b4fc;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    background: rgba(15, 23, 42, 0.9);
    padding: 0.1rem 0.3rem;
    border-radius: 0.3rem;
    font-size: 0.8rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    background: rgba(30, 64, 175, 0.7);
    color: #e5e7eb;
    transition: 0.15s all ease-out;
}

.btn i {
    font-size: 0.9rem;
}

.btn.primary {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    color: #052e16;
    font-weight: 600;
}

.btn.outline {
    background: transparent;
    border-color: #22c55e;
}

.btn.ghost {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.6);
    font-size: 0.9rem;
}

.btn.full {
    width: 100%;
}

.btn.small {
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.9);
}

.danger-btn {
    background: rgba(185, 28, 28, 0.9);
    border-color: rgba(248, 113, 113, 0.8);
}

/* Auth card - made bigger */
.auth-card {
    width: 100%;
    max-width: 520px;              /* sebelumnya 420, sekarang lebih lebar */
    margin: 3rem auto 0;
    padding: 2rem;                 /* lebih lega */
    border-radius: 1.2rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: radial-gradient(circle at top, rgba(37, 99, 235, 0.12), rgba(15, 23, 42, 0.96));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
}

.auth-card h1 {
    font-family: 'Orbitron', system-ui, sans-serif;
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.auth-card h1 i {
    color: #22c55e;
}

/* Form */
.form {
    display: grid;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.form label {
    font-size: 0.95rem;
    display: grid;
    gap: 0.4rem;
    color: #d1d5db;
}

.form input {
    padding: 0.85rem 0.9rem;       /* lebih tinggi dan lebar */
    border-radius: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    font-size: 0.95rem;
}

.form input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4);
}

.alert {
    padding: 0.75rem 0.9rem;
    border-radius: 0.7rem;
    background: rgba(248, 250, 252, 0.03);
    border: 1px solid rgba(248, 113, 113, 0.6);
    color: #fecaca;
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
}

/* Dashboard */
.dashboard {
    margin-top: 1.5rem;
}

.dashboard-header h1 {
    font-family: 'Orbitron', system-ui, sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

.dashboard-header p {
    font-size: 0.9rem;
    color: #9ca3af;
}

.progress-card {
    margin-top: 1rem;
    margin-bottom: 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), rgba(15, 23, 42, 0.96));
}

.progress-card h2 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
}

.progress-bar {
    width: 100%;
    height: 0.55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: inherit;
    transition: width 0.25s ease-out;
}

.level-grid {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.level-card {
    text-decoration: none;
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 0.85rem 0.9rem;
    background: rgba(15, 23, 42, 0.96);
    transition: 0.15s all ease-out;
    display: grid;
    gap: 0.35rem;
}

.level-card:hover {
    border-color: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.8);
}

.level-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.level-badge {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(30, 64, 175, 0.8);
    color: #e5e7eb;
}

.level-card h3 {
    font-size: 0.95rem;
}

.level-card p {
    font-size: 0.8rem;
    color: #9ca3af;
}

.status {
    font-size: 0.75rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
}

.status.completed {
    background: rgba(22, 163, 74, 0.16);
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, 0.7);
}

.status.locked {
    background: rgba(30, 64, 175, 0.16);
    color: #bfdbfe;
    border: 1px solid rgba(59, 130, 246, 0.7);
}

.level-card.completed {
    border-color: rgba(34, 197, 94, 0.8);
}

/* Level page */
.level-page {
    margin-top: 1.5rem;
    display: grid;
    gap: 1rem;
}

.level-header-main h1 {
    font-family: 'Orbitron', system-ui, sans-serif;
    font-size: 1.35rem;
    margin-bottom: 0.4rem;
}

.level-header-main p {
    font-size: 0.9rem;
    color: #9ca3af;
}

.challenge-card {
    padding: 1.1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: radial-gradient(circle at top, rgba(37, 99, 235, 0.12), rgba(15, 23, 42, 0.96));
}

.challenge-card h2 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
}

.mt {
    margin-top: 0.7rem;
}

/* Leaderboard & tables */
.leaderboard {
    margin-top: 1.5rem;
}

.leaderboard h1 {
    font-family: 'Orbitron', system-ui, sans-serif;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.leaderboard h1 i {
    color: #facc15;
}

.table-wrapper {
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.96);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

thead {
    background: rgba(15, 23, 42, 1);
}

th, td {
    padding: 0.55rem 0.75rem;
    text-align: left;
}

th {
    font-weight: 600;
    color: #d1d5db;
}

tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.9);
}

tbody tr:nth-child(odd) {
    background: rgba(15, 23, 42, 0.85);
}

tbody tr:hover {
    background: rgba(15, 23, 42, 1);
}

/* Admin dashboard */
.admin-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
}

.stat-card {
    padding: 1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.96);
}

.stat-card h2 {
    font-size: 0.95rem;
    margin-bottom: 0.45rem;
    color: #e5e7eb;
}

.stat-number {
    font-family: 'Orbitron', system-ui, sans-serif;
    font-size: 1.4rem;
    color: #22c55e;
}

.admin-links {
    margin-top: 1rem; 
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Footer */
.site-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(31, 41, 55, 0.8);
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
}

/* Utility */
.muted {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .auth-card {
        margin-top: 2rem;
        padding: 1.5rem;
    }
}
