/* 
  Juaralive - Premium Vanilla CSS Design System 
  Designed with Modern Glassmorphism & Gold/Emerald Theme
*/

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.9);
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.7);
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) rgba(15, 23, 42, 0.9);
}

:root {
    /* Color Palette */
    --clr-bg: #090e17; /* Sangat gelap, navy blue mengarah ke hitam */
    --clr-bg-surface: #101826;
    --clr-emerald-500: #10b981;
    --clr-emerald-600: #059669;
    --clr-emerald-400: #34d399;
    --clr-gold-500: #f59e0b;
    --clr-gold-600: #d97706;
    --clr-gold-400: #fbbf24;
    
    --clr-text-main: #f8fafc;
    --clr-text-muted: #94a3b8;
    
    --clr-glass-bg: rgba(255, 255, 255, 0.05);
    --clr-glass-border: rgba(255, 255, 255, 0.1);
    
    /* Gradients */
    --grad-primary: linear-gradient(135deg, var(--clr-emerald-400), var(--clr-emerald-600));
    --grad-gold: linear-gradient(135deg, var(--clr-gold-400), var(--clr-gold-600));
    --grad-glow: linear-gradient(135deg, rgba(16, 185, 129, 0.5), rgba(5, 150, 105, 0));
    
    /* Shadows */
    --shadow-glow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Typography */
    --font-main: 'Outfit', sans-serif;
    
    /* Transition */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

:root[data-theme="light"] {
    --clr-bg: #f8fafc;
    --clr-bg-surface: #ffffff;
    --clr-emerald-500: #059669;
    --clr-emerald-600: #047857;
    --clr-emerald-400: #10b981;
    --clr-gold-500: #d97706;
    --clr-gold-600: #b45309;
    --clr-gold-400: #f59e0b;
    
    --clr-text-main: #0f172a;
    --clr-text-muted: #475569;
    
    --clr-glass-bg: rgba(255, 255, 255, 0.75);
    --clr-glass-border: rgba(0, 0, 0, 0.08);
    
    --grad-primary: linear-gradient(135deg, var(--clr-emerald-400), var(--clr-emerald-600));
    --grad-gold: linear-gradient(135deg, var(--clr-gold-400), var(--clr-gold-600));
    --grad-glow: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0));
    
    --shadow-glow: 0 10px 25px -5px rgba(16, 185, 129, 0.25);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
}

.theme-toggle {
    background: var(--clr-glass-bg);
    border: 1px solid var(--clr-glass-border);
    color: var(--clr-text-main);
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition-smooth);
    font-size: 1.1rem;
    margin-left: 10px;
}
.theme-toggle:hover {
    background: var(--clr-emerald-500);
    color: white; border-color: var(--clr-emerald-500);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--clr-bg);
    color: var(--clr-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 95%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography Utility */
.highlight { color: var(--clr-emerald-400); }
.text-gradient {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-center { text-align: center; }

/* Glassmorphism System */
.glass {
    background: var(--clr-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--clr-glass-border);
}

.glass-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.7) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--clr-glass-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-glass);
}

/* Button System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.05rem;
}

.btn-primary {
    background: var(--grad-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    border-top: none;
    border-left: none;
    border-right: none;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inline-logo {
    justify-content: center;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--clr-emerald-400);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-weight: 500;
    color: var(--clr-text-muted);
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--clr-text-main);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 120px 0 60px;
    min-height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: rgba(16, 185, 129, 0.15);
}

.shape-2 {
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(245, 158, 11, 0.1);
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 300px;
    height: 300px;
    background: rgba(5, 150, 105, 0.2);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-text {
    flex: 1;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--clr-emerald-400);
    margin-bottom: 24px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--clr-text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* Hero Visual Animation */
.hero-visual {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-card {
    width: 320px;
    position: absolute;
}

.visual-card:nth-child(1) {
    top: 50px;
    right: 50px;
    z-index: 2;
}

.visual-card:nth-child(2) {
    bottom: 50px;
    left: 0;
    z-index: 3;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--clr-emerald-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.card-icon.gold {
    background: rgba(245, 158, 11, 0.1);
    color: var(--clr-gold-400);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
}

.score.win {
    color: var(--clr-emerald-400);
    font-size: 1.3rem;
}

.score-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--grad-primary);
}

.ranking-list {
    list-style: none;
}

.ranking-list li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--clr-glass-border);
}

.ranking-list li:last-child {
    border-bottom: none;
}

.rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    margin-right: 12px;
}

.rank.first { background: var(--clr-gold-500); color: white; box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
.rank.second { background: #94a3b8; color: white; }
.rank.third { background: #b45309; color: white; }

.pts {
    margin-left: auto;
    font-weight: 700;
    color: var(--clr-emerald-400);
}

/* Active Event Card */
.active-event-card {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}
.active-header {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clr-emerald-400);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-weight: 600;
}
.active-body h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}
.active-body p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}
.status-icon {
    width: 80px;
    height: 80px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--clr-emerald-400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.pulse-anim {
    animation: pulse 2s infinite;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.float-anim {
    animation: float 6s ease-in-out infinite;
}

.float-anim-delay {
    animation: float 7s ease-in-out infinite;
    animation-delay: 2s;
}

.hover-lift {
    transition: var(--transition-smooth);
}
.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Features Section */
.features {
    padding: 100px 0;
    position: relative;
}

.section-head {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--clr-text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    text-align: center;
    padding: 40px 24px;
}

.f-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 24px;
}

.color-blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.color-emerald { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.color-gold { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.color-rose { background: rgba(244, 63, 94, 0.1); color: #f43f5e; }

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
}

/* Event Section */
.events-section {
    padding: 100px 0;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    text-align: left;
}
.flex-between .section-subtitle { margin: 0; }

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.event-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.event-status.upcoming { background: rgba(59, 130, 246, 0.1); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.2); }
.event-status.ongoing { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.event-status.completed { background: rgba(148, 163, 184, 0.1); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.2); }

.event-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.event-desc {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-meta {
    display: flex;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--clr-glass-border);
}

.meta-item {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.w-100 { width: 100%; }
.mt-15 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

/* Alert */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
}
.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}
.alert-warning code {
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--clr-glass-border);
    margin-top: 100px;
}
.mb-20 { margin-bottom: 20px; }

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--clr-glass-border);
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom);
}

.mob-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    color: var(--clr-text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.mob-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.mob-nav-item.active, .mob-nav-item:hover {
    color: var(--clr-emerald-400);
}

.mob-nav-center {
    position: relative;
    top: -20px;
}

.center-btn {
    width: 50px;
    height: 50px;
    background: var(--grad-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem !important;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
    border: 3px solid #090e17;
    margin-bottom: 4px;
}

/* Responsive */
/* Juri Layout (Desktop: split columns, Mobile: stacked) */
.juri-layout {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr; /* Mobile default */
}

@media (min-width: 993px) {
    .juri-layout {
        grid-template-columns: 1fr 2fr;
        align-items: start;
    }
    
    .juri-sidebar {
        position: sticky;
        top: 90px; /* Below the sticky header */
    }
}

@media (max-width: 992px) {
    .hero-content { flex-direction: column; text-align: center; }
    .hero-title { font-size: 3.5rem; }
    .hero-desc { margin: 0 auto 40px; }
    .hero-actions { justify-content: center; }
    .hero-visual { width: 100%; height: 350px; margin-top: 40px; }
    .visual-card:nth-child(1) { right: 10%; top: 0; }
    .visual-card:nth-child(2) { left: 10%; bottom: 0; }
    .flex-between { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
}

@media (max-width: 768px) {
    .navbar { display: none; }
    .hero { padding-top: 60px; min-height: auto; }
    .page-header { padding-top: 60px !important; }
    .mobile-bottom-nav { display: flex; justify-content: space-around; }
    body { padding-bottom: 80px; } /* Add padding to bottom for navbar */
    .hero-title { font-size: 2.8rem; }
    .visual-card { width: 280px; }
    
    /* Make tables wider on mobile */
    .container { padding: 0 12px; width: 100%; }
    .glass-card { padding: 16px !important; border-radius: 16px; }
}
