/**
 * YoureNu Forum - Dark Neural Theme
 * 
 * The default dark theme with neural network aesthetics
 */

/* Dark Theme Color Palette */
:root {
    /* Primary Colors */
    --primary-bg: #0a0a0a;
    --secondary-bg: #1a1a1a;
    --tertiary-bg: #2a2a2a;
    
    /* Accent Colors */
    --accent-color: #00ff41;
    --accent-hover: #00cc33;
    --accent-text: #000000;
    --accent-color-rgb: 0, 255, 65;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --text-disabled: #555555;
    
    /* Border Colors */
    --border-color: #333333;
    --border-hover: #444444;
    --border-focus: var(--accent-color);
    
    /* Background States */
    --hover-bg: rgba(255, 255, 255, 0.05);
    --active-bg: rgba(0, 255, 65, 0.1);
    --input-bg: #1a1a1a;
    
    /* Status Colors */
    --success-color: #00ff41;
    --success-bg: rgba(0, 255, 65, 0.1);
    --error-color: #ff4444;
    --error-bg: rgba(255, 68, 68, 0.1);
    --warning-color: #ffaa00;
    --warning-bg: rgba(255, 170, 0, 0.1);
    --info-color: #00aaff;
    --info-bg: rgba(0, 170, 255, 0.1);
    
    /* Neural Level Colors */
    --level-1-color: #888888; /* Initiate - Gray */
    --level-2-color: #00aaff; /* Adapter - Blue */
    --level-3-color: #aa00ff; /* Synthesizer - Purple */
    --level-4-color: #ff6600; /* Architect - Orange */
    --level-5-color: #00ff41; /* Quantum - Green */
    
    /* Reputation Colors */
    --rep-initiate: #888888;
    --rep-adapter: #00aaff;
    --rep-synthesizer: #aa00ff;
    --rep-architect: #ff6600;
    --rep-quantum: #00ff41;
    
    /* Neural Pattern Colors */
    --pattern-stroke: var(--accent-color);
    --pattern-node: var(--accent-color);
    --pattern-bg: rgba(0, 0, 0, 0.8);
    --pattern-grid: rgba(255, 255, 255, 0.1);
}

/* Body Background with Neural Network Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 255, 65, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 65, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(0, 255, 65, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Enhanced Loading Animation for Dark Theme */
.neural-pulse {
    box-shadow: 
        0 0 20px var(--accent-color),
        inset 0 0 20px rgba(0, 255, 65, 0.1);
}

.neural-pulse::before {
    box-shadow: 0 0 10px var(--accent-color);
}

/* Header Enhancements */
.main-header {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
}

.logo-text {
    background: linear-gradient(45deg, var(--accent-color), #00cc33);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(0, 255, 65, 0.5));
}

/* Navigation Enhancements */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

/* Form Enhancements */
.form-input {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.form-input:focus {
    background: rgba(26, 26, 26, 0.9);
    border-color: var(--accent-color);
    box-shadow: 
        0 0 0 3px rgba(0, 255, 65, 0.1),
        0 0 20px rgba(0, 255, 65, 0.2);
}

/* Button Enhancements */
.btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, var(--accent-color), #00cc33);
    box-shadow: 0 4px 15px rgba(0, 255, 65, 0.3);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    box-shadow: 
        0 6px 20px rgba(0, 255, 65, 0.4),
        0 0 30px rgba(0, 255, 65, 0.3);
    transform: translateY(-2px);
}

/* Card Enhancements */
.card {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    border-color: rgba(0, 255, 65, 0.3);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 255, 65, 0.1);
}

/* Neural Level Badges */
.neural-level {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.neural-level::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: currentColor;
    opacity: 0.1;
    z-index: -1;
}

.level-1 {
    color: var(--level-1-color);
    border: 1px solid var(--level-1-color);
}

.level-2 {
    color: var(--level-2-color);
    border: 1px solid var(--level-2-color);
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.3);
}

.level-3 {
    color: var(--level-3-color);
    border: 1px solid var(--level-3-color);
    box-shadow: 0 0 10px rgba(170, 0, 255, 0.3);
}

.level-4 {
    color: var(--level-4-color);
    border: 1px solid var(--level-4-color);
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.3);
}

.level-5 {
    color: var(--level-5-color);
    border: 1px solid var(--level-5-color);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
    animation: quantum-pulse 2s ease-in-out infinite;
}

@keyframes quantum-pulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 255, 65, 0.6);
    }
}

.level-icon {
    font-size: 1em;
    filter: drop-shadow(0 0 5px currentColor);
}

/* Reputation Styling */
.reputation {
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
}

.reputation.initiate {
    color: var(--rep-initiate);
    background: rgba(136, 136, 136, 0.1);
}

.reputation.adapter {
    color: var(--rep-adapter);
    background: rgba(0, 170, 255, 0.1);
}

.reputation.synthesizer {
    color: var(--rep-synthesizer);
    background: rgba(170, 0, 255, 0.1);
}

.reputation.architect {
    color: var(--rep-architect);
    background: rgba(255, 102, 0, 0.1);
}

.reputation.quantum {
    color: var(--rep-quantum);
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

/* Message Enhancements */
.message {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-left: 4px solid var(--accent-color);
}

.message.success {
    border-left-color: var(--success-color);
    background: rgba(0, 255, 65, 0.05);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

.message.error {
    border-left-color: var(--error-color);
    background: rgba(255, 68, 68, 0.05);
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.1);
}

.message.warning {
    border-left-color: var(--warning-color);
    background: rgba(255, 170, 0, 0.05);
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.1);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

/* Selection Styling */
::selection {
    background: rgba(0, 255, 65, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(0, 255, 65, 0.3);
    color: var(--text-primary);
}

/* Focus Indicators */
*:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .neural-pulse,
    .level-5 {
        animation: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-bg: #000000;
        --secondary-bg: #111111;
        --text-primary: #ffffff;
        --border-color: #555555;
        --accent-color: #00ff00;
    }
}

/* Print Styles */
@media print {
    body::before {
        display: none;
    }
    
    .main-header,
    .main-footer,
    .loading-screen {
        display: none;
    }
    
    .main-content {
        max-width: none;
        padding: 0;
    }
    
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
}

/* Dark Theme Specific Animations */
@keyframes matrix-rain {
    0% {
        transform: translateY(-100vh);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

.matrix-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.matrix-effect::before {
    content: '01001001010010010100100101001001';
    position: absolute;
    top: -100vh;
    left: 0;
    width: 100%;
    height: 200vh;
    color: rgba(0, 255, 65, 0.1);
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    line-height: 1;
    animation: matrix-rain 10s linear infinite;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Glitch Effect for Special Elements */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-bg);
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #ff0000;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #00ffff;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 14%, 15%, 49%, 50%, 99%, 100% {
        transform: translate(0);
    }
    15%, 49% {
        transform: translate(-2px, 2px);
    }
}

@keyframes glitch-2 {
    0%, 20%, 21%, 62%, 63%, 99%, 100% {
        transform: translate(0);
    }
    21%, 62% {
        transform: translate(2px, -2px);
    }
}

/* Holographic Effect */
.holographic {
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(0, 255, 65, 0.1) 50%,
        transparent 70%
    );
    background-size: 200% 200%;
    animation: holographic-shift 3s ease-in-out infinite;
}

@keyframes holographic-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Cyber Grid Background */
.cyber-grid {
    background-image: 
        linear-gradient(rgba(0, 255, 65, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 20px;
    }
}
