/* ============================================================
   style.css - Global Styles
   Pertandingan Mengail Ikan
   ============================================================ */

/* CSS Variables */
:root {
    --primary: #0066cc;
    --primary-dark: #004499;
    --primary-light: #3399ff;
    --secondary: #ffd700;
    --secondary-dark: #cc9900;
    --accent: #00cc88;
    --danger: #ff4444;
    --warning: #ff8800;
    --success: #00cc44;
    --dark: #0a0a1a;
    --dark-lighter: #1a1a3a;
    --gray: #333;
    --gray-light: #666;
    --gray-lighter: #999;
    --white: #ffffff;
    --bg-gradient: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 50%, #0a1a2a 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --box-shadow-glow: 0 0 30px rgba(0, 102, 204, 0.3);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-gradient);
    color: var(--white);
    min-height: 100vh;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    text-shadow: var(--text-shadow);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--gray-lighter);
}

/* Links */
a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--card-border);
}

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

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.navbar-brand i {
    color: var(--secondary);
    font-size: 2rem;
}

.navbar-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}

.navbar-menu a {
    color: var(--white);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.navbar-menu a:hover,
.navbar-menu a.active {
    background: var(--primary);
    color: var(--white);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 100px 20px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 102, 204, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.2) 0%, transparent 50%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero-icon {
    font-size: 5rem;
    color: var(--secondary);
    margin-bottom: 2rem;
    animation: float 3s ease-in-out infinite;
}

.hero h1 {
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--white) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--gray-lighter);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.5);
    color: var(--white);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    color: var(--dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary-light);
}

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

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #cc0000 100%);
    color: var(--white);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #009933 100%);
    color: var(--white);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--primary);
    box-shadow: var(--box-shadow-glow);
    transform: translateY(-5px);
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--card-border);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--secondary);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    text-align: center;
    padding: 30px;
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 15px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-lighter);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--white);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    color: var(--white);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 102, 204, 0.3);
}

.form-control::placeholder {
    color: var(--gray-lighter);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 45px;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
}

.table th {
    background: rgba(0, 102, 204, 0.2);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.table tr:last-child td {
    border-bottom: none;
}

/* ============================================================
   LEADERBOARD
   ============================================================ */
.leaderboard-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    padding: 40px 0;
    margin-bottom: 30px;
}

.podium-item {
    text-align: center;
    padding: 20px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.podium-item.gold {
    order: 2;
    transform: scale(1.1);
    border-color: var(--secondary);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.podium-item.silver {
    order: 1;
}

.podium-item.bronze {
    order: 3;
}

.podium-rank {
    font-size: 3rem;
    margin-bottom: 10px;
}

.podium-rank.gold { color: #ffd700; }
.podium-rank.silver { color: #c0c0c0; }
.podium-rank.bronze { color: #cd7f32; }

.podium-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.podium-weight {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
}

/* ============================================================
   QR SCANNER
   ============================================================ */
.scanner-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--primary);
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scanner-frame {
    width: 200px;
    height: 200px;
    border: 3px solid var(--secondary);
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   FULLSCREEN LEADERBOARD
   ============================================================ */
.fullscreen-leaderboard {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-gradient);
    z-index: 9999;
    display: none;
    overflow: hidden;
}

.fullscreen-leaderboard.active {
    display: flex;
}

.fullscreen-main {
    flex: 7;
    padding: 40px;
    overflow-y: auto;
}

.fullscreen-sidebar {
    flex: 3;
    background: rgba(0, 0, 0, 0.3);
    border-left: 1px solid var(--card-border);
    overflow: hidden;
    position: relative;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 102, 204, 0.2);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-scroll {
    height: calc(100vh - 80px);
    overflow: hidden;
    position: relative;
}

.credit-scroll {
    animation: creditScroll 30s linear infinite;
}

@keyframes creditScroll {
    0% { transform: translateY(100%); }
    100% { transform: translateY(-100%); }
}

.credit-scroll:hover {
    animation-play-state: paused;
}

.credit-item {
    padding: 20px;
    border-bottom: 1px solid var(--card-border);
    border-left: 3px solid var(--primary);
    margin: 10px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: var(--transition);
}

.credit-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: var(--secondary);
    transform: translateX(5px);
}

.credit-item.new {
    animation: flashNew 1s ease;
    border-left-color: var(--accent);
}

@keyframes flashNew {
    0%, 100% { background: rgba(0, 204, 136, 0.2); }
    50% { background: rgba(0, 204, 136, 0.4); }
}

.credit-id {
    font-weight: 700;
    color: var(--primary-light);
    font-size: 1.1rem;
}

.credit-nama {
    color: var(--white);
    font-size: 0.95rem;
}

.credit-detail {
    color: var(--gray-lighter);
    font-size: 0.85rem;
    margin-top: 5px;
}

.credit-berat {
    color: var(--secondary);
    font-weight: 700;
    font-size: 1.1rem;
}

.credit-masa {
    color: var(--gray);
    font-size: 0.75rem;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 102, 204, 0.3); }
    50% { box-shadow: 0 0 40px rgba(0, 102, 204, 0.6); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fadeIn { animation: fadeIn 0.5s ease-out; }
.animate-fadeInLeft { animation: fadeInLeft 0.5s ease-out; }
.animate-fadeInRight { animation: fadeInRight 0.5s ease-out; }
.animate-slideUp { animation: slideUp 0.5s ease-out; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }

/* Wave Animation */
.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%230066cc' opacity='.25'/%3E%3Cpath d='M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z' fill='%230066cc' opacity='.5'/%3E%3Cpath d='M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z' fill='%230066cc'/%3E%3C/svg%3E");
    background-size: 50% 100%;
    animation: wave 10s linear infinite;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================================
   ALERTS & MESSAGES
   ============================================================ */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(0, 204, 68, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-danger {
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-warning {
    background: rgba(255, 136, 0, 0.15);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-info {
    background: rgba(0, 102, 204, 0.15);
    border: 1px solid var(--primary);
    color: var(--primary-light);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending {
    background: rgba(255, 136, 0, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.badge-approved {
    background: rgba(0, 204, 68, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-rejected {
    background: rgba(255, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--dark-lighter);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--card-border);
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-lighter);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--white);
}

/* ============================================================
   LOADING
   ============================================================ */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 26, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .navbar-toggle {
        display: block;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-podium {
        flex-direction: column;
        align-items: center;
    }
    
    .podium-item.gold,
    .podium-item.silver,
    .podium-item.bronze {
        order: unset;
        transform: scale(1);
    }
    
    .fullscreen-leaderboard.active {
        flex-direction: column;
    }
    
    .fullscreen-main {
        flex: 1;
    }
    
    .fullscreen-sidebar {
        flex: 1;
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--card-border);
    }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-light); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--gray-lighter); }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

.d-flex { display: flex; }
.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.w-100 { width: 100%; }
.hidden { display: none !important; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }
