:root {
    /* Color scheme - unified accent colors */
    --color-accent-blue: 59, 130, 246;
    --color-accent-purple: 147, 51, 234;
    --color-accent-cyan: 34, 211, 238;
    
    /* Category colors */
    --color-podcast: 168, 85, 247;
    --color-project: 59, 130, 246;
    --color-article: 34, 197, 94;
}

html {
    background: #0a0e13;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    will-change: transform;
    transform: translateZ(0);
    pointer-events: none;
    background: 
        repeating-linear-gradient(0deg, rgba(var(--color-accent-cyan), 0.03) 0px, transparent 1px, transparent 40px),
        repeating-linear-gradient(90deg, rgba(var(--color-accent-cyan), 0.03) 0px, transparent 1px, transparent 40px),
        radial-gradient(ellipse 1400px 900px at 25% 20%, transparent 0%, rgba(var(--color-accent-cyan), 0.015) 30%, transparent 60%),
        radial-gradient(ellipse 1200px 800px at 75% 60%, transparent 0%, rgba(var(--color-accent-purple), 0.02) 35%, transparent 65%),
        linear-gradient(135deg, #0a0e13 0%, #0d1117 50%, #0a0e13 100%);
}

body {
    position: relative;
    background: transparent;
}

body::after {
    will-change: opacity;
    transform: translateZ(0);
}

@media (prefers-reduced-motion: reduce) {
    body::after {
        display: none;
    }
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.card-hover:hover .card-glow {
    opacity: 1;
}

/* Sidebar active state glow */
.nav-item-active {
    position: relative;
}
.nav-item-active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(to bottom, rgba(var(--color-accent-blue), 0.8), rgba(var(--color-accent-purple), 0.8));
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(var(--color-accent-blue), 0.5);
}

@media (min-width: 768px) {
    .nav-item-active::before {
        left: -16px;
    }
}

/* Hero background pattern */
.hero-pattern {
    position: relative;
    overflow: hidden;
}
.hero-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, rgba(var(--color-accent-cyan), 0.02) 0px, transparent 1px, transparent 20px),
        repeating-linear-gradient(90deg, rgba(var(--color-accent-cyan), 0.02) 0px, transparent 1px, transparent 20px);
    mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, black 0%, transparent 70%);
    filter: blur(1px);
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
}

/* Candlestick background animation */
@keyframes drift {
    from { transform: translateX(0); }
    to { transform: translateX(-1200px); }
}

.candles-background {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    opacity: 0.55;
    filter: blur(0.5px);
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse 80% 100% at 80% 50%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 100% at 80% 50%, black 20%, transparent 80%);
}

.candles-group {
    animation: drift 90s linear infinite;
    transform-origin: 0 0;
}

/* Fade in on scroll */
@media (prefers-reduced-motion: no-preference) {
    .candles-background {
        animation: fadeIn 2s ease-in;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 0.2; }
}

/* Category-specific colors */
.category-podcast { 
    --category-color: var(--color-podcast);
    border-left-color: rgb(var(--category-color));
}
.category-project { 
    --category-color: var(--color-project);
    border-left-color: rgb(var(--category-color));
}
.category-article { 
    --category-color: var(--color-article);
    border-left-color: rgb(var(--category-color));
}

/* Custom scrollbar styling */
.overflow-x-auto::-webkit-scrollbar {
    height: 6px;
}

.overflow-x-auto::-webkit-scrollbar-track {
    background: transparent;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
    background: rgba(var(--color-accent-cyan), 0.2);
    border-radius: 3px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--color-accent-cyan), 0.4);
}

.tooltip {
    position: fixed;
    left: 0;
    top: 0;
    transform: translate(-9999px, -9999px);
    width: 20rem;
    background: #111827;
    color: #e5e7eb;
    font-size: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #374151;
    box-shadow: 0 10px 25px rgba(0,0,0,.6);
    z-index: 9999999;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
}

.group:hover .tooltip {
    opacity: 1;
}

@media (max-width: 768px) {
    body::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-pattern::before {
        display: none;
    }

    .candles-background {
        filter: none;
        mask-image: none;
        -webkit-mask-image: none;
    }

    .candles-group {
        animation: none;
    }
}
