/* ===================================
   SCI-FI ENHANCEMENTS
   Holographic effects, cyberpunk elements
   Maintains gambling + gaming aesthetics
   =================================== */

/* Holographic scan line effect */
@keyframes holographic-scan {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 100%;
    }
}

.holographic {
    position: relative;
    overflow: hidden;
}

.holographic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 240, 255, 0.03) 0px,
        transparent 2px,
        transparent 4px,
        rgba(0, 240, 255, 0.03) 6px
    );
    background-size: 100% 6px;
    animation: holographic-scan 8s linear infinite;
    pointer-events: none;
    z-index: 1;
}

/* Cyberpunk glow effect */
.cyber-glow {
    position: relative;
}

.cyber-glow::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00F0FF, #B026FF, #FFD700, #00F0FF);
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    filter: blur(10px);
    animation: cyber-glow-pulse 3s ease-in-out infinite;
    transition: opacity 0.3s ease;
}

.cyber-glow:hover::after {
    opacity: 0.6;
}

@keyframes cyber-glow-pulse {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Holographic text effect */
.holo-text {
    background: linear-gradient(90deg, #00F0FF 0%, #B026FF 50%, #00F0FF 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holo-shimmer 3s linear infinite;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

@keyframes holo-shimmer {
    to {
        background-position: 200% center;
    }
}

/* Sci-fi border effect */
.scifi-border {
    position: relative;
    border: 1px solid transparent;
}

.scifi-border::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(90deg, 
        transparent 0%,
        #00F0FF 25%,
        transparent 50%,
        #B026FF 75%,
        transparent 100%
    );
    background-size: 200% 100%;
    border-radius: inherit;
    z-index: -1;
    animation: scifi-border-flow 4s linear infinite;
}

@keyframes scifi-border-flow {
    to {
        background-position: 200% 0;
    }
}

/* Digital glitch effect */
@keyframes digital-glitch {
    0%, 100% {
        transform: translate(0);
        opacity: 1;
    }
    20% {
        transform: translate(-2px, 2px);
        opacity: 0.8;
    }
    40% {
        transform: translate(2px, -2px);
        opacity: 0.9;
    }
    60% {
        transform: translate(-1px, -1px);
        opacity: 0.85;
    }
    80% {
        transform: translate(1px, 1px);
        opacity: 0.95;
    }
}

.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch-text:hover::before {
    color: #00F0FF;
    animation: digital-glitch 0.3s ease-in-out 2;
    clip-path: inset(0 0 50% 0);
}

.glitch-text:hover::after {
    color: #B026FF;
    animation: digital-glitch 0.3s ease-in-out 2;
    clip-path: inset(50% 0 0 0);
}

/* Scan line overlay for cards */
.card-scanline {
    position: relative;
    overflow: hidden;
}

.card-scanline::after {
    content: '';
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0, 240, 255, 0.3),
        transparent
    );
    animation: scan-down 4s linear infinite;
    pointer-events: none;
}

@keyframes scan-down {
    0% {
        top: -50%;
    }
    100% {
        top: 150%;
    }
}

/* Hexagon corner accents */
.hex-corners {
    position: relative;
}

.hex-corners::before,
.hex-corners::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #00F0FF;
    opacity: 0.6;
}

.hex-corners::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.hex-corners::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

/* Data stream effect */
.data-stream {
    position: relative;
    overflow: hidden;
}

.data-stream::before {
    content: '0101010011010110100101001010101110010110';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    font-family: 'Space Grotesk', monospace;
    font-size: 10px;
    color: rgba(0, 240, 255, 0.1);
    line-height: 1.2;
    white-space: pre-wrap;
    word-wrap: break-word;
    animation: data-flow 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes data-flow {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Neon pulse effect for important elements */
.neon-pulse {
    animation: neon-pulse-anim 2s ease-in-out infinite;
}

@keyframes neon-pulse-anim {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 240, 255, 0.4),
                    0 0 20px rgba(0, 240, 255, 0.2),
                    inset 0 0 10px rgba(0, 240, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 240, 255, 0.6),
                    0 0 40px rgba(0, 240, 255, 0.3),
                    inset 0 0 15px rgba(0, 240, 255, 0.2);
    }
}

/* Circuit board pattern */
.circuit-pattern {
    position: relative;
}

.circuit-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
    pointer-events: none;
}

/* Holographic reflection */
.holo-reflect {
    position: relative;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(0, 240, 255, 0.05) 25%,
        transparent 50%,
        rgba(176, 38, 255, 0.05) 75%,
        transparent 100%
    );
    background-size: 200% 200%;
    animation: holo-reflect-move 6s ease-in-out infinite;
}

@keyframes holo-reflect-move {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Add sci-fi effects to existing elements */
.portfolio-card {
    position: relative;
}

.portfolio-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 240, 255, 0.02) 0px,
        transparent 1px,
        transparent 3px,
        rgba(0, 240, 255, 0.02) 4px
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover::after {
    opacity: 1;
}

/* Enhanced balance display with holographic effect */
.balance-main {
    position: relative;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.3));
}

/* ORB cards with sci-fi enhancement */
.orb-card {
    background: linear-gradient(
        135deg,
        rgba(20, 25, 35, 0.95) 0%,
        rgba(15, 19, 25, 0.98) 100%
    );
    backdrop-filter: blur(10px);
}

.orb-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        #00F0FF,
        transparent
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.orb-card:hover::before {
    opacity: 0.8;
}

/* Sci-fi button enhancement */
.btn-primary,
.view-details-btn {
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.view-details-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:active::before,
.view-details-btn:active::before {
    width: 300px;
    height: 300px;
}

/* Matrix-style number displays */
.amount,
.stat-value,
.performance-value {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    position: relative;
}

/* Cyberpunk corner brackets */
.cyber-brackets {
    position: relative;
}

.cyber-brackets::before,
.cyber-brackets::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
}

.cyber-brackets::before {
    top: -5px;
    left: -5px;
    border-top: 2px solid #00F0FF;
    border-left: 2px solid #00F0FF;
}

.cyber-brackets::after {
    bottom: -5px;
    right: -5px;
    border-bottom: 2px solid #00F0FF;
    border-right: 2px solid #00F0FF;
}

/* Apply effects to specific elements */
.logo {
    animation: holo-shimmer 4s linear infinite;
}

.section-title-main {
    position: relative;
}

.section-title-main::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #00F0FF, transparent);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-scanline::after {
        animation-duration: 8s;
    }
    
    .holographic::before {
        background-size: 100% 4px;
        animation-duration: 4s;
    }
    
    /* Slow down sci-fi effects on mobile */
    .glow-effect,
    .neon-glow {
        animation-duration: 3s;
    }
    
    .cyber-grid {
        animation-duration: 30s;
    }
    
    .data-stream {
        animation-duration: 15s;
    }
}

@media (max-width: 480px) {
    .card-scanline::after {
        animation-duration: 10s;
        opacity: 0.3;
    }
    
    .holographic::before {
        animation-duration: 5s;
        opacity: 0.5;
    }
}

/* ===================================
   GLOBAL SETTINGS CLASSES
   Applied via JavaScript from nav-utils.js
   based on saved user preferences
   =================================== */

/* No Animations Mode */
body.no-animations * {
    animation: none !important;
    transition: none !important;
}

body.no-animations .holographic::before,
body.no-animations .card-scanline::after,
body.no-animations .cyber-grid,
body.no-animations .data-stream {
    animation: none !important;
}

/* Reduce Motion (Accessibility) */
body.reduce-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* Compact Mode */
body.compact-mode .settings-section,
body.compact-mode .sci-fi-card,
body.compact-mode .portfolio-card,
body.compact-mode .orb-card {
    padding: 16px;
}

body.compact-mode .settings-grid,
body.compact-mode .account-management-grid {
    gap: 12px;
}

body.compact-mode .section-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
}

body.compact-mode .card-header,
body.compact-mode .section-title {
    font-size: 16px;
}

body.compact-mode .premium-top-nav .nav-container {
    padding: 8px 24px;
}

/* ===================================
   COMPREHENSIVE LIGHT THEME
   Complete light theme styling for all components
   =================================== */

body.light-theme {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 50%, #f5f7fa 100%);
    color: #1a1a2e;
}

/* Light Theme Navigation */
body.light-theme .premium-top-nav {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body.light-theme .brand-logo {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .brand-logo:hover {
    background: rgba(var(--accent-rgb), 0.05);
    border-color: rgba(var(--accent-rgb), 0.2);
}

body.light-theme .brand-title,
body.light-theme .brand-subtitle {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-theme .nav-pill {
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .nav-pill:hover {
    color: var(--accent-color);
    background: rgba(var(--accent-rgb), 0.08);
}

body.light-theme .nav-pill.active {
    color: var(--accent-color);
    background: rgba(var(--accent-rgb), 0.12);
    border-color: rgba(var(--accent-rgb), 0.3);
}

body.light-theme .gamification-badges .badge-item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: #1a1a2e;
}

body.light-theme .gamification-badges .badge-item:hover {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.2);
}

body.light-theme .nav-glow-line {
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.3;
}

/* Light Theme Cards and Containers */
body.light-theme .sci-fi-card,
body.light-theme .portfolio-card,
body.light-theme .orb-card,
body.light-theme .settings-section,
body.light-theme .stats-card,
body.light-theme .metric-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
    color: #1a1a2e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.light-theme .sci-fi-card:hover,
body.light-theme .portfolio-card:hover,
body.light-theme .orb-card:hover {
    border-color: rgba(var(--accent-rgb), 0.25);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Light Theme User Menu */
body.light-theme .user-menu-dropdown {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

body.light-theme .user-menu-dropdown .menu-item {
    color: #1a1a2e;
}

body.light-theme .user-menu-dropdown .menu-item:hover {
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-color);
}

body.light-theme .user-menu-header {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08), rgba(var(--accent-rgb), 0.03));
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .menu-divider {
    background: rgba(0, 0, 0, 0.06);
}

body.light-theme .menu-section-label {
    color: rgba(0, 0, 0, 0.5);
}

body.light-theme .menu-badge {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-color);
}

/* Light Theme Typography */
body.light-theme .page-title,
body.light-theme .section-title,
body.light-theme .section-header h2,
body.light-theme .card-title,
body.light-theme h1, body.light-theme h2, body.light-theme h3 {
    color: #1a1a2e;
}

body.light-theme .page-subtitle,
body.light-theme .section-subtitle,
body.light-theme .card-subtitle {
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .stat-value,
body.light-theme .amount,
body.light-theme .balance-value,
body.light-theme .metric-value {
    color: #1a1a2e;
}

body.light-theme .stat-label,
body.light-theme .metric-label {
    color: rgba(0, 0, 0, 0.5);
}

/* Light Theme Status Colors */
body.light-theme .positive,
body.light-theme .profit {
    color: #059669;
}

body.light-theme .negative,
body.light-theme .loss {
    color: #dc2626;
}

/* Light Theme Buttons */
body.light-theme .btn-primary,
body.light-theme .primary-btn {
    background: var(--accent-gradient);
    filter: brightness(0.95);
}

body.light-theme .btn-primary:hover,
body.light-theme .primary-btn:hover {
    filter: brightness(1);
}

body.light-theme .btn-secondary,
body.light-theme .secondary-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1a1a2e;
}

body.light-theme .btn-secondary:hover,
body.light-theme .secondary-btn:hover {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.3);
    color: var(--accent-color);
}

/* Light Theme Form Elements */
body.light-theme input,
body.light-theme select,
body.light-theme textarea {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1a1a2e;
}

body.light-theme input:focus,
body.light-theme select:focus,
body.light-theme textarea:focus {
    background: rgba(var(--accent-rgb), 0.03);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

body.light-theme input::placeholder,
body.light-theme select::placeholder,
body.light-theme textarea::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

/* Light Theme Mobile Navigation */
body.light-theme .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

body.light-theme .mobile-nav-item {
    color: rgba(0, 0, 0, 0.5);
}

body.light-theme .mobile-nav-item:hover,
body.light-theme .mobile-nav-item.active {
    color: var(--accent-color);
}

/* Light Theme Tables */
body.light-theme table {
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme th {
    background: rgba(0, 0, 0, 0.02);
    color: rgba(0, 0, 0, 0.6);
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme td {
    border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme tr:hover {
    background: rgba(var(--accent-rgb), 0.03);
}

/* Light Theme Modals */
body.light-theme .modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

body.light-theme .modal-content {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

/* Light Theme Tooltips */
body.light-theme .tooltip {
    background: rgba(26, 26, 46, 0.95);
    color: #ffffff;
}

/* Light Theme Scrollbars */
body.light-theme::-webkit-scrollbar-track {
    background: #f1f1f1;
}

body.light-theme::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

body.light-theme::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Light Theme Accent Color Elements */
body.light-theme .accent-text,
body.light-theme .accent-color {
    color: var(--accent-color);
    filter: brightness(0.9);
}

body.light-theme .accent-bg {
    background: rgba(var(--accent-rgb), 0.1);
}

body.light-theme .accent-border {
    border-color: rgba(var(--accent-rgb), 0.3);
}

/* Light Theme Charts */
body.light-theme .chart-container {
    background: rgba(255, 255, 255, 0.9);
}

/* Light Theme Notifications Dropdown */
body.light-theme .notifications-dropdown {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

body.light-theme .notification-item {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .notification-item:hover {
    background: rgba(var(--accent-rgb), 0.05);
}

/* Light Theme Loading States */
body.light-theme .skeleton,
body.light-theme .loading-placeholder {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.08) 50%, rgba(0, 0, 0, 0.06) 75%);
}

/* Ensure matrix canvas respects display settings */
#matrix-canvas {
    transition: opacity 0.3s ease;
}

body.light-theme #matrix-canvas {
    opacity: 0.15;
    filter: invert(1) hue-rotate(180deg);
}

/* ===================================
   ACCENT COLOR CSS VARIABLES
   Set dynamically by JavaScript
   =================================== */

:root {
    /* Primary Accent (default cyan) */
    --accent-color: #00f0ff;
    --accent-color-secondary: #00c4d4;
    --accent-color-tertiary: #00a8b3;
    --accent-rgb: 0, 240, 255;
    --accent-glow: rgba(0, 240, 255, 0.4);
    --accent-glow-light: rgba(0, 240, 255, 0.2);
    --accent-glow-strong: rgba(0, 240, 255, 0.6);
    --accent-gradient: linear-gradient(135deg, #00f0ff 0%, #00c4d4 100%);
    --accent-gradient-hover: linear-gradient(135deg, #00c4d4 0%, #00a8b3 100%);
    
    /* Legacy support */
    --primary-color: #00f0ff;
    --electric-blue: #00f0ff;
}
