/* FILE: public/css/style-home.css */
/* DARK NEON GLASSMORPHISM THEME */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #6366F1; }

body { 
    background-color: #0b1120; /* Dark slate pekat */
    color: #f8fafc; 
    padding-bottom: 20px; /* RUANG KOSONG DIKURANGI AGAR RAPAT */
    overflow-x: hidden; 
}

@media (min-width: 768px) { body { padding-bottom: 20px; } }

/* ANIMASI WARNA-WARNI DI BACKGROUND HEADER PORTAL WARGA */
.header-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 320px;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.3);
    z-index: -1;
}

.fade-in { animation: fadeIn 0.8s ease-out forwards; }
@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.mask-gradient { 
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent); 
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent); 
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* DARK GLASSMORPHISM CARDS */
.clean-card {
    background: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05); 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.clean-card:hover { 
    box-shadow: 0 15px 40px 0 rgba(99, 102, 241, 0.15); 
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-3px); 
}

/* NEON GLOWING STAT CARDS */
.stat-card-animated {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Neon Colors Classes */
.neon-green { border: 1px solid rgba(16, 185, 129, 0.3); box-shadow: 0 0 20px rgba(16, 185, 129, 0.15); }
.neon-green:hover { border-color: rgba(16, 185, 129, 0.8); box-shadow: 0 0 30px rgba(16, 185, 129, 0.3); transform: translateY(-5px); }

.neon-purple { border: 1px solid rgba(139, 92, 246, 0.3); box-shadow: 0 0 20px rgba(139, 92, 246, 0.15); }
.neon-purple:hover { border-color: rgba(139, 92, 246, 0.8); box-shadow: 0 0 30px rgba(139, 92, 246, 0.3); transform: translateY(-5px); }

.neon-cyan { border: 1px solid rgba(6, 182, 212, 0.3); box-shadow: 0 0 20px rgba(6, 182, 212, 0.15); }
.neon-cyan:hover { border-color: rgba(6, 182, 212, 0.8); box-shadow: 0 0 30px rgba(6, 182, 212, 0.3); transform: translateY(-5px); }

.stat-card-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    z-index: 1;
}

.stat-card-animated:hover::after {
    animation: shimmer 1s forwards;
}

@keyframes shimmer {
    0% { left: -150%; }
    100% { left: 200%; }
}

@keyframes flashText {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-gradient-text {
    background: linear-gradient(to right, #ffffff, #a5b4fc, #fbcfe8, #6ee7b7, #ffffff);
    background-size: 300% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: flashText 4s linear infinite;
}

.animated-gradient-text-sub {
    background: linear-gradient(to right, #38bdf8, #818cf8, #f472b6, #38bdf8);
    background-size: 300% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: flashText 6s linear infinite reverse;
}

.animated-gradient-footer {
    background: linear-gradient(90deg, #818cf8, #c084fc, #f472b6, #2dd4bf, #38bdf8, #818cf8);
    background-size: 400% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: flashText 8s linear infinite;
}

/* DARK TABLES */
.table-modern-wrapper {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.table-container {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    color: #f8fafc;
}

th { 
    color: #94a3b8; 
    background-color: rgba(30, 41, 59, 0.5) !important; 
    border-bottom: 1px solid rgba(255,255,255,0.05) !important; 
}
td { 
    border-bottom: 1px solid rgba(255,255,255,0.02) !important; 
}

tbody tr:hover {
    background-color: rgba(30, 41, 59, 0.4) !important;
}

@media (min-width: 768px) {
    th { padding: 16px 24px !important; font-size: 12px !important; }
    td { padding: 16px 24px !important; font-size: 14px !important; }
}

@media (max-width: 767px) {
    th { padding: 12px 16px !important; font-size: 10px !important; }
    td { padding: 12px 16px !important; font-size: 11px !important; }
}

/* 3D CUBE - ADJUSTED FOR DARK MODE */
.cube-scene {
    width: 40px;
    height: 40px;
    perspective: 400px;
}
.cube-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 15s infinite linear;
}
.cube-face {
    position: absolute;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.5);
    border-radius: 10px;
    backdrop-filter: blur(4px);
    overflow: hidden;
    box-shadow: inset 0 0 15px rgba(99, 102, 241, 0.3);
}
.cube-front  { transform: rotateY(  0deg) translateZ(20px); background: #0f172a; padding: 2px;}
.cube-right  { transform: rotateY( 90deg) translateZ(20px); }
.cube-back   { transform: rotateY(180deg) translateZ(20px); }
.cube-left   { transform: rotateY(-90deg) translateZ(20px); }
.cube-top    { transform: rotateX( 90deg) translateZ(20px); }
.cube-bottom { transform: rotateX(-90deg) translateZ(20px); }

@keyframes rotateCube {
    0%   { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

@keyframes flipInX3D {
    0% { transform: perspective(400px) rotateX(90deg); opacity: 0; }
    100% { transform: perspective(400px) rotateX(0deg); opacity: 1; }
}

/* =========================================================
   FITUR BARU: SCROLL REVEAL ANIMATIONS
   ========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* =========================================================
   FITUR BARU: LEADERBOARD LANTAI TER-RAJIN
   ========================================================= */
.leaderboard-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-radius: 16px; margin-bottom: 10px;
    background: rgba(30, 41, 59, 0.5); border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}
.leaderboard-item:hover { 
    transform: translateX(5px); 
    background: rgba(30, 41, 59, 0.8); 
    border-color: rgba(99, 102, 241, 0.3); 
}
.rank-badge { 
    width: 32px; height: 32px; border-radius: 50%; display: flex; 
    align-items: center; justify-content: center; font-weight: 900; font-size: 14px; 
    flex-shrink: 0;
}
.rank-1 { background: rgba(251, 191, 36, 0.2); color: #FBBF24; border: 1px solid rgba(251, 191, 36, 0.4); box-shadow: 0 0 15px rgba(251, 191, 36, 0.4); }
.rank-2 { background: rgba(156, 163, 175, 0.2); color: #9CA3AF; border: 1px solid rgba(156, 163, 175, 0.4); }
.rank-3 { background: rgba(180, 83, 9, 0.2); color: #B45309; border: 1px solid rgba(180, 83, 9, 0.4); }
.rank-other { background: rgba(255, 255, 255, 0.05); color: #64748b; }