/* ============================================================
   GOAL SCORE PRO - Admin Dashboard Styles
   Cyberpunk/Futuristic Theme
   ============================================================ */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

/* ============================================================
   ROOT VARIABLES - Goal Score Pro Color Palette
   ============================================================ */
:root {
    /* Primary Colors */
    --cyber-cyan: #00D9FF;
    --neon-magenta: #D946EF;
    --deep-navy: #0F1825;
    
    /* Supporting Colors */
    --slate-card: #1E2A38;
    --graphite: #2C3E50;
    --electric-white: #F8FAFC;
    --muted-gray: #94A3B8;
    
    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    
    /* Glow Effects */
    --cyan-glow: 0 4px 20px rgba(0, 217, 255, 0.3);
    --magenta-glow: 0 4px 20px rgba(217, 70, 239, 0.3);
    --card-glow: 0 4px 20px rgba(0, 217, 255, 0.1);
}

/* ============================================================
   BASE STYLES
   ============================================================ */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0F1825 0%, #1a2332 100%);
    color: var(--electric-white);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.font-display {
    font-family: 'Exo 2', sans-serif;
}

.font-mono {
    font-family: 'Fira Code', monospace;
}

/* ============================================================
   GRADIENTS
   ============================================================ */
.gradient-cyber {
    background: linear-gradient(135deg, var(--cyber-cyan) 0%, var(--neon-magenta) 100%);
}

.gradient-cyan-magenta {
    background: linear-gradient(135deg, #00D9FF 0%, #D946EF 100%);
}

.gradient-success {
    background: linear-gradient(135deg, #10B981 0%, #38ef7d 100%);
}

.gradient-warning {
    background: linear-gradient(135deg, #F59E0B 0%, #f5576c 100%);
}

.gradient-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* ============================================================
   HEADER STYLES
   ============================================================ */
header {
    background: linear-gradient(135deg, var(--cyber-cyan) 0%, var(--neon-magenta) 100%);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.2);
}

.logo-container {
    background: var(--slate-card);
    border: 2px solid var(--cyber-cyan);
    box-shadow: var(--cyan-glow);
    transition: all 0.3s ease;
}

.logo-container:hover {
    box-shadow: 0 4px 30px rgba(0, 217, 255, 0.5);
    transform: scale(1.05);
}

/* ============================================================
   CARD STYLES
   ============================================================ */
.card {
    background: rgba(30, 42, 56, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.2);
    border-color: rgba(0, 217, 255, 0.5);
}

.card-glow-cyan {
    box-shadow: var(--cyan-glow);
}

.card-glow-magenta {
    box-shadow: var(--magenta-glow);
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
    background: rgba(30, 42, 56, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cyber-cyan), var(--neon-magenta));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.3);
    border-color: var(--cyber-cyan);
}

.stat-value {
    font-family: 'Exo 2', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #00D9FF !important;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
}

/* ============================================================
   SUBSCRIPTION BADGES
   ============================================================ */
.subscription-badge {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-freemium {
    background: rgba(148, 163, 184, 0.2);
    color: var(--muted-gray);
    border: 1px solid var(--graphite);
}

.badge-premium {
    background: rgba(0, 217, 255, 0.2);
    color: var(--cyber-cyan);
    border: 1px solid var(--cyber-cyan);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

.badge-platinum {
    background: rgba(217, 70, 239, 0.2);
    color: var(--neon-magenta);
    border: 1px solid var(--neon-magenta);
    box-shadow: 0 0 10px rgba(217, 70, 239, 0.3);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--cyber-cyan);
    color: var(--deep-navy);
    box-shadow: var(--cyan-glow);
}

.btn-primary:hover {
    background: #00F0FF;
    box-shadow: 0 4px 30px rgba(0, 217, 255, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--neon-magenta);
    color: white;
    box-shadow: var(--magenta-glow);
}

.btn-secondary:hover {
    background: #E95DFF;
    box-shadow: 0 4px 30px rgba(217, 70, 239, 0.5);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--cyber-cyan);
    border: 1px solid var(--graphite);
}

.btn-ghost:hover {
    border-color: var(--cyber-cyan);
    box-shadow: var(--cyan-glow);
}

/* ============================================================
   TABLES
   ============================================================ */
.table-container {
    background: rgba(30, 42, 56, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(15, 24, 37, 0.8);
}

thead th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00D9FF;
    border-bottom: 2px solid rgba(0, 217, 255, 0.3);
}

tbody tr {
    border-bottom: 1px solid rgba(44, 62, 80, 0.5);
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: rgba(0, 217, 255, 0.08);
    border-left: 3px solid var(--cyber-cyan);
}

tbody td {
    padding: 1rem 1.5rem;
    color: #F8FAFC;
}

.user-row {
    cursor: pointer;
}

.user-row:hover {
    background: rgba(0, 217, 255, 0.1);
}

/* ============================================================
   TABS
   ============================================================ */
.tabs-container {
    background: var(--slate-card);
    border: 1px solid var(--graphite);
    border-radius: 12px 12px 0 0;
}

.tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--muted-gray);
    font-weight: 600;
    border-bottom: 3px solid transparent;
}

.tab:hover {
    color: var(--cyber-cyan);
}

.tab-active {
    color: var(--cyber-cyan);
    border-bottom-color: var(--cyber-cyan);
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 24, 37, 0.9);
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1E2A38;
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 217, 255, 0.2);
    animation: modalFadeIn 0.3s ease;
}

.modal-header {
    background: linear-gradient(135deg, var(--cyber-cyan) 0%, var(--neon-magenta) 100%);
    padding: 1.5rem;
    border-radius: 14px 14px 0 0;
}

.modal-body {
    padding: 2rem;
}

.user-detail-modal .modal-content {
    max-width: 800px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ============================================================
   FORMS & INPUTS
   ============================================================ */
.form-input {
    background: var(--deep-navy);
    border: 1px solid var(--graphite);
    color: var(--electric-white);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    width: 100%;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

.form-input::placeholder {
    color: var(--muted-gray);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--electric-white);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-cyan {
    color: var(--cyber-cyan);
}

.text-magenta {
    color: var(--neon-magenta);
}

.text-muted {
    color: var(--muted-gray);
}

.glow-text-cyan {
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.glow-text-magenta {
    text-shadow: 0 0 10px rgba(217, 70, 239, 0.5);
}

/* ============================================================
   HEXAGONAL GRID BACKGROUND PATTERN
   ============================================================ */
.hex-pattern {
    background-image: 
        linear-gradient(30deg, rgba(0, 217, 255, 0.02) 12%, transparent 12.5%, transparent 87%, rgba(0, 217, 255, 0.02) 87.5%, rgba(0, 217, 255, 0.02)),
        linear-gradient(150deg, rgba(0, 217, 255, 0.02) 12%, transparent 12.5%, transparent 87%, rgba(0, 217, 255, 0.02) 87.5%, rgba(0, 217, 255, 0.02)),
        linear-gradient(30deg, rgba(0, 217, 255, 0.02) 12%, transparent 12.5%, transparent 87%, rgba(0, 217, 255, 0.02) 87.5%, rgba(0, 217, 255, 0.02)),
        linear-gradient(150deg, rgba(0, 217, 255, 0.02) 12%, transparent 12.5%, transparent 87%, rgba(0, 217, 255, 0.02) 87.5%, rgba(0, 217, 255, 0.02));
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px;
}

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.progress-bar {
    height: 8px;
    background: var(--graphite);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyber-cyan), var(--neon-magenta));
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

/* ============================================================
   NOTIFICATIONS/ALERTS
   ============================================================ */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    background: var(--slate-card);
    border: 1px solid var(--graphite);
    box-shadow: var(--cyan-glow);
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

.notification-success {
    border-color: var(--success);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.notification-error {
    border-color: var(--danger);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--deep-navy);
}

::-webkit-scrollbar-thumb {
    background: var(--graphite);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyber-cyan);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

/* Custom scrollbar for activity containers */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(44, 62, 80, 0.3);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 217, 255, 0.4);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 217, 255, 0.7);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 768px) {
    .stat-value {
        font-size: 2rem;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    thead th {
        font-size: 0.65rem;
        padding: 0.75rem 1rem;
    }
    
    tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* ============================================================
   USER DETAIL STYLES
   ============================================================ */
.user-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.user-detail-item {
    background: var(--deep-navy);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--graphite);
}

.user-detail-label {
    font-size: 0.75rem;
    color: var(--muted-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.user-detail-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--electric-white);
    font-family: 'Fira Code', monospace;
}

.user-activity-chart {
    background: var(--deep-navy);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--graphite);
    margin-top: 1.5rem;
}

/* Custom Select Dropdown - matching toggle switch style */
.custom-select {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(0, 217, 255, 0.3) !important;
    color: #FFFFFF !important;
    cursor: pointer;
    transition: all 0.3s ease;
    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='%2300D9FF' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    padding-right: 32px !important;
}

.custom-select:hover {
    border-color: var(--cyan-400) !important;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
    background: rgba(255, 255, 255, 0.15) !important;
}

.custom-select:focus {
    outline: none;
    border-color: var(--cyan-400) !important;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.4);
    background: rgba(255, 255, 255, 0.15) !important;
}

/* All options - same color as closed dropdown */
.custom-select option {
    background-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    padding: 12px;
    font-weight: 500;
}

/* Purple effect on hover - like Message History */
.custom-select option:hover {
    background-color: rgba(217, 70, 239, 0.25) !important;
    background: rgba(217, 70, 239, 0.25) !important;
    color: #D946EF !important;
}

/* Checked/selected option - same as default */
.custom-select option:checked {
    background-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

/* Active/focus state */
.custom-select option:focus {
    background-color: rgba(217, 70, 239, 0.25);
    background: rgba(217, 70, 239, 0.25);
    color: #D946EF;
}

/* ======================
   Custom Dropdown Styles
   ====================== */
.dropdown {
    position: relative;
}

.dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-trigger:hover {
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

.dropdown .chevron {
    width: 14px;
    height: 14px;
    color: #00D9FF;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 20;
}

.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-option {
    padding: 10px 12px;
    color: #FFFFFF;
    transition: all 0.15s ease;
}

.dropdown-option:hover {
    background: linear-gradient(135deg, rgba(217, 70, 239, 0.3), rgba(168, 85, 247, 0.2));
    color: #D946EF;
}

/* Refresh Button Press Effect */
.refresh-btn {
    transition: all 0.2s ease;
    transform: scale(1);
}

.refresh-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.6);
}

.refresh-btn:active {
    transform: scale(0.95);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.8) inset;
    background: linear-gradient(135deg, rgba(0, 183, 255, 0.3), rgba(0, 217, 255, 0.2)) !important;
}

/* ============================================================
   ENHANCED UI - Status Colors
   ============================================================ */
.text-success {
    color: #10B981 !important;
}

.text-warning {
    color: #F59E0B !important;
}

.text-danger {
    color: #EF4444 !important;
}

.bg-success {
    background-color: #10B981;
}

.bg-warning {
    background-color: #F59E0B;
}

.bg-danger {
    background-color: #EF4444;
}

/* ============================================================
   ALERT BADGE ANIMATION
   ============================================================ */
@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.animate-pulse {
    animation: pulse-badge 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================================
   ENHANCED TAB STYLES
   ============================================================ */
.tab {
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--muted-gray);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    font-size: 0.85rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================================
   CARD HOVER EFFECTS
   ============================================================ */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 217, 255, 0.15);
    border-color: rgba(0, 217, 255, 0.4);
}

/* ============================================================
   STAT CARD ENHANCEMENTS
   ============================================================ */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(0, 217, 255, 0.03) 45%,
        rgba(0, 217, 255, 0.05) 50%,
        rgba(0, 217, 255, 0.03) 55%,
        transparent 60%
    );
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* ============================================================
   ENHANCED TABLE ROWS
   ============================================================ */
tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: rgba(0, 217, 255, 0.08);
    border-left: 3px solid var(--cyber-cyan);
    transform: translateX(2px);
}

/* ============================================================
   FADE IN ANIMATION
   ============================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.animate-fade-in-down {
    animation: fadeIn 0.2s ease forwards;
}

/* ============================================================
   SCROLLBAR FOR FAILED PREDICTIONS
   ============================================================ */
#failedPredictionsListContainer::-webkit-scrollbar {
    width: 8px;
}

#failedPredictionsListContainer::-webkit-scrollbar-track {
    background: rgba(44, 62, 80, 0.3);
    border-radius: 4px;
}

#failedPredictionsListContainer::-webkit-scrollbar-thumb {
    background: rgba(239, 68, 68, 0.4);
    border-radius: 4px;
}

#failedPredictionsListContainer::-webkit-scrollbar-thumb:hover {
    background: rgba(239, 68, 68, 0.7);
}
