/* Enhanced Futuristic Theme with Animations */

/* Animated Background Particles */
.particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9), transparent);
    border-radius: 50%;
    animation: float-particle 20s infinite linear;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* Grid Background Pattern */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Glowing Orbs */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    animation: pulse-glow 8s ease-in-out infinite;
}

.glow-orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(251, 146, 60, 0.4), transparent);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.glow-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent);
    bottom: 10%;
    right: 10%;
    animation-delay: 2s;
}

.glow-orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.3), transparent);
    top: 50%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes pulse-glow {

    0%,
    100% {
        transform: scale(1) translate(0, 0);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.2) translate(20px, 20px);
        opacity: 0.5;
    }
}

/* Dark Mode Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: var(--color-bg-card);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-glow);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow-cyan);
}

.theme-toggle-icon {
    font-size: 20px;
    transition: transform 0.5s ease;
}

.theme-toggle:hover .theme-toggle-icon {
    transform: rotate(180deg);
}

.theme-toggle-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
}

/* Light Mode Variables */
body.light-mode {
    --color-cosmic-dark: #f8fafc;
    --color-deep-space: #ffffff;
    --color-space-blue: #e2e8f0;
    --color-bg-primary: #f8fafc;
    --color-bg-secondary: #ffffff;
    --color-bg-card: rgba(255, 255, 255, 0.9);
    --color-bg-sidebar: rgba(255, 255, 255, 0.98);
    --color-text: #0f172a;
    --color-text-muted: #475569;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
}

body.light-mode .sidebar {
    border-right: 1px solid #e2e8f0;
}

body.light-mode .resource-card {
    border: 1px solid #e2e8f0;
}

body.light-mode .glow-orb {
    opacity: 0.15;
}

body.light-mode .particle {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent);
}

/* Neon Text Effect */
.neon-text {
    text-shadow:
        0 0 10px rgba(99, 102, 241, 0.8),
        0 0 20px rgba(99, 102, 241, 0.6),
        0 0 30px rgba(99, 102, 241, 0.4);
    animation: neon-flicker 2s infinite alternate;
}

@keyframes neon-flicker {

    0%,
    100% {
        text-shadow:
            0 0 10px rgba(99, 102, 241, 0.8),
            0 0 20px rgba(99, 102, 241, 0.6),
            0 0 30px rgba(99, 102, 241, 0.4);
    }

    50% {
        text-shadow:
            0 0 5px rgba(99, 102, 241, 1),
            0 0 10px rgba(99, 102, 241, 0.8),
            0 0 15px rgba(99, 102, 241, 0.6);
    }
}

/* Holographic Card Effect */
.holo-card {
    position: relative;
    overflow: hidden;
}

.holo-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    transform: rotate(45deg);
    animation: holo-shine 3s infinite;
}

@keyframes holo-shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Scan Line Effect - DISABLED */
/*
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            rgba(6, 182, 212, 0.8),
            transparent);
    animation: scan 8s linear infinite;
    pointer-events: none;
    z-index: 9999;
}

@keyframes scan {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}
*/

/* Glitch Effect for Titles */
.glitch-effect {
    position: relative;
}

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

.glitch-effect::before {
    animation: glitch-1 2.5s infinite;
    color: rgba(6, 182, 212, 0.7);
    z-index: -1;
}

.glitch-effect::after {
    animation: glitch-2 2.5s infinite;
    color: rgba(251, 146, 60, 0.7);
    z-index: -2;
}

@keyframes glitch-1 {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

@keyframes glitch-2 {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(2px, -2px);
    }

    40% {
        transform: translate(2px, 2px);
    }

    60% {
        transform: translate(-2px, -2px);
    }

    80% {
        transform: translate(-2px, 2px);
    }

    100% {
        transform: translate(0);
    }
}

/* Floating Animation for Cards */
.float-animate {
    animation: float-up-down 6s ease-in-out infinite;
}

@keyframes float-up-down {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Pulse Effect */
.pulse-effect {
    animation: pulse-scale 2s ease-in-out infinite;
}

@keyframes pulse-scale {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Typing Animation */
@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: var(--color-neon-cyan);
    }
}

/* Enhanced Buttons */
.btn {
    position: relative;
    overflow: hidden;
}

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

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Cyber Border Effect */
.cyber-border {
    position: relative;
    border: 1px solid transparent;
}

.cyber-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: inherit;
    clip-path: polygon(0 0,
            100% 0,
            100% calc(100% - 20px),
            calc(100% - 20px) 100%,
            0 100%);
}

/* Data Stream Effect */
.data-stream {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.1;
}

.data-stream::before {
    content: '01010101 01110101 01011010 01010101 01110101 01011010';
    position: absolute;
    font-family: monospace;
    font-size: 12px;
    color: var(--color-neon-cyan);
    animation: stream-flow 20s linear infinite;
    white-space: nowrap;
}

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

    100% {
        transform: translateY(100vh);
    }
}