/**
 * 3I Atlas Hub - Solar System & Cosmic Theme
 * Complete redesign with deep space, planets, and cosmic elements
 */

:root {
    /* Solar System Color Palette */
    --deep-space: #0a0e27;
    --space-void: #0f1629;
    --nebula-purple: #6b46c1;
    --nebula-blue: #2563eb;
    --nebula-pink: #a855f7;
    --sun-orange: #f97316;
    --sun-yellow: #fbbf24;
    --earth-blue: #3b82f6;
    --mars-red: #ef4444;
    --jupiter-brown: #d97706;
    --saturn-gold: #f59e0b;
    --star-white: #ffffff;
    --star-bright: #e0e7ff;
    --star-dim: #94a3b8;
    --comet-cyan: #06b6d4;
    --comet-green: #10b981;
    
    /* Text Colors */
    --text-primary: #e0e7ff;
    --text-secondary: #cbd5e1;
    --text-dim: #94a3b8;
    
    /* Gradients */
    --gradient-space: linear-gradient(135deg, #0a0e27 0%, #1e1b4b 50%, #312e81 100%);
    --gradient-nebula: radial-gradient(ellipse at top, #6b46c1 0%, #3b82f6 50%, transparent 100%);
    --gradient-sun: radial-gradient(circle, #fbbf24 0%, #f97316 50%, #dc2626 100%);
    --gradient-planet: radial-gradient(circle, rgba(59, 130, 246, 0.6) 0%, rgba(37, 99, 235, 0.3) 100%);
    --gradient-comet: linear-gradient(135deg, #06b6d4 0%, #10b981 50%, #06b6d4 100%);
    
    /* Shadows & Glows */
    --glow-sun: 0 0 40px rgba(251, 191, 36, 0.6), 0 0 80px rgba(249, 115, 22, 0.4);
    --glow-star: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.4);
    --glow-planet: 0 0 20px rgba(59, 130, 246, 0.5);
    --glow-nebula: 0 0 60px rgba(107, 70, 193, 0.3);
    --shadow-deep: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-cosmic: 0 10px 40px rgba(0, 0, 0, 0.3);
    
    /* Legacy Compatibility */
    --primary-color: var(--nebula-purple);
    --secondary-color: var(--nebula-blue);
    --accent-color: var(--comet-cyan);
    --success-color: var(--comet-green);
    --danger-color: var(--mars-red);
    --warning-color: var(--sun-orange);
    --info-color: var(--nebula-blue);
}

/* Base Styles - Deep Space Background */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: var(--deep-space);
    background-image: 
        radial-gradient(2px 2px at 20px 30px, var(--star-white), transparent),
        radial-gradient(2px 2px at 60px 70px, var(--star-bright), transparent),
        var(--gradient-nebula);
    background-size: 400px 400px, 500px 500px, 100% 100%;
    background-position: 0 0, 100px 100px, 0 0;
    background-repeat: repeat;
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    /* animation: starField 100s linear infinite; DISABLED FOR PERFORMANCE - static stars only */
    /* perspective: 1000px; DISABLED FOR PERFORMANCE */
}

/* Cosmic Experience Active State */
body.cosmic-experience-active {
    /* Allow scrolling */
}

body.cosmic-experience-active .main-content {
    position: relative;
    z-index: 10;
    background: transparent;
}

/* Cosmic Canvas - Interactive Particle System */
#cosmic-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
    mix-blend-mode: screen;
}

/* Parallax Elements - DISABLED */
.parallax-cosmic {
    /* will-change: transform;
    transition: transform 0.1s ease-out; */
}

@keyframes starField {
    0% { background-position: 0 0, 50px 50px, 100px 100px, 150px 150px, 200px 200px, 250px 250px, 0 0; }
    100% { background-position: -200px -200px, -250px -250px, -300px -300px, -350px -350px, -400px -400px, -450px -450px, 0 0; }
}

/* Animated Solar System in Background - OPTIMIZED */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        /* Sun at center */
        radial-gradient(circle at 50% 50%, rgba(251, 191, 36, 0.08) 0%, transparent 25%),
        /* Earth orbit */
        radial-gradient(circle at 50% 50%, transparent 42%, rgba(59, 130, 246, 0.06) 42%, transparent 45%);
    pointer-events: none;
    z-index: 0;
    /* animation: solarRotation 200s linear infinite; DISABLED FOR PERFORMANCE */
}

@keyframes solarRotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animated Planets - DISABLED FOR PERFORMANCE */
.planet-orbit {
    /* position: fixed;
    pointer-events: none;
    z-index: 1; */
    display: none; /* Hide planets for performance */
}

.planet-mercury,
.planet-venus,
.planet-earth,
.planet-mars {
    display: none; /* Hide planet animations */
}

@keyframes planetOrbit {
    /* DISABLED */
}

/* Floating Comets - DISABLED FOR PERFORMANCE */
.comet-trail {
    /* position: fixed;
    width: 300px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--comet-cyan), transparent);
    pointer-events: none;
    z-index: 2;
    animation: cometFly 8s linear infinite;
    opacity: 0.6; */
    display: none; /* Completely hide for performance */
}

.comet-trail::after {
    content: '';
    position: absolute;
    right: 0;
    width: 12px;
    height: 12px;
    background: var(--comet-cyan);
    border-radius: 50%;
    box-shadow: var(--glow-star);
}

@keyframes cometFly {
    0% { top: -10%; left: 20%; opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { top: 110%; left: 80%; opacity: 0; }
}

/* Main Content Container */
.container, .container-fluid {
    position: relative;
    z-index: 10;
    background: transparent;
}

.main-content {
    position: relative;
    z-index: 10;
}

/* Navigation - Deep Space */
.navbar {
    background: rgba(10, 14, 39, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(107, 70, 193, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-nebula);
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-sun);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.5);
    filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.3));
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.75rem 1rem !important;
    border-radius: 0.5rem;
    margin: 0 0.25rem;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--comet-cyan);
    transition: width 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--star-bright) !important;
    background: rgba(107, 70, 193, 0.2);
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(107, 70, 193, 0.3);
    box-shadow: 0 0 15px rgba(107, 70, 193, 0.3);
}

/* Dropdown Menu */
.dropdown-menu {
    background: rgba(15, 22, 41, 0.98) !important;
    /* backdrop-filter: blur(20px); DISABLED FOR PERFORMANCE */
    border: 1px solid rgba(107, 70, 193, 0.3);
    box-shadow: var(--shadow-deep);
    border-radius: 12px;
    padding: 0.5rem;
}

.dropdown-item {
    color: var(--text-primary) !important;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(107, 70, 193, 0.3) !important;
    color: var(--star-bright) !important;
    transform: translateX(5px);
}

/* Hero Section - Cosmic */
.hero-section {
    background: transparent;
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(107, 70, 193, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(37, 99, 235, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: nebulaPulse 8s ease-in-out infinite;
}

@keyframes nebulaPulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.cosmic-title {
    font-size: 4rem;
    font-weight: 900;
    background: var(--gradient-sun);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(251, 191, 36, 0.5));
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.cosmic-text {
    background: var(--gradient-nebula);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite;
}

@keyframes textShimmer {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 10px rgba(107, 70, 193, 0.5)); }
    50% { filter: brightness(1.3) drop-shadow(0 0 20px rgba(107, 70, 193, 0.8)); }
}

.cosmic-subtitle {
    color: var(--text-secondary);
    font-size: 1.3rem;
    line-height: 1.6;
}

.cosmic-btn {
    background: var(--gradient-sun) !important;
    border: 2px solid var(--sun-orange) !important;
    color: var(--deep-space) !important;
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 12px;
    box-shadow: var(--glow-sun);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cosmic-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.cosmic-btn:hover::before {
    left: 100%;
}

.cosmic-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 60px rgba(251, 191, 36, 0.8);
}

/* Cards - Celestial Bodies with 3D Effects */
.card {
    background: rgba(5, 10, 25, 0.98) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(107, 70, 193, 0.5);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(107, 70, 193, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    color: #ffffff !important;
    transform-style: preserve-3d;
}

.card::before {
    /* DISABLED FOR PERFORMANCE - shimmer effect causes lag */
    /* content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(107, 70, 193, 0.4), transparent);
    transition: left 0.6s ease;
    z-index: 1; */
}

.card:hover::before {
    /* left: 100%; */
}

.card:hover {
    transform: translateY(-4px); /* Simplified - no scale for performance */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(107, 70, 193, 0.3);
    border-color: rgba(107, 70, 193, 0.6);
}

/* 3D Card Tilt Effect - DISABLED FOR PERFORMANCE */
.card-3d {
    /* transform-style: preserve-3d; */
    /* transition: transform 0.3s ease; */
    /* will-change: transform; */
}

.card-3d:hover {
    /* transition: transform 0.1s ease; */
}

/* Staggered Fade Animation */
.stagger-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Animation - DISABLED FOR PERFORMANCE */
.float-cosmic {
    /* animation: floatCosmic 4s ease-in-out infinite; */
}

@keyframes floatCosmic {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    33% { 
        transform: translateY(-15px) rotate(1deg); 
    }
    66% { 
        transform: translateY(-8px) rotate(-1deg); 
    }
}

/* Stats Cards - Enhanced */
.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(15, 22, 41, 0.8) !important;
    backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(107, 70, 193, 0.3);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(107, 70, 193, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item:hover {
    transform: translateY(-5px); /* Simplified - no scale */
    box-shadow: var(--shadow-deep), var(--glow-nebula);
    border-color: rgba(107, 70, 193, 0.6);
}

.card-header {
    background: rgba(107, 70, 193, 0.15) !important;
    border-bottom: 1px solid rgba(107, 70, 193, 0.3);
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    color: var(--star-bright);
}

.card-title,
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    color: #ffffff !important;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Ensure all links in cards are highly visible - MAXIMUM SPECIFICITY */
.card a,
.card-title a,
.card-body a,
h5.card-title a,
.card h5 a,
.card h6 a,
.news-item a:not(.btn):not(.badge),
.post-card a:not(.btn):not(.badge) {
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 15px rgba(255, 255, 255, 0.2) !important;
    transition: all 0.3s ease;
    display: block;
}

.card a:hover,
.card-title a:hover,
.card-body a:hover,
h5.card-title a:hover,
.card h5 a:hover,
.card h6 a:hover,
.news-item a:not(.btn):not(.badge):hover,
.post-card a:not(.btn):not(.badge):hover {
    color: #ffffff !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 1), 0 0 25px rgba(107, 70, 193, 0.6) !important;
    transform: translateY(-1px);
}

.card-text,
.card-body p,
.card-body div {
    color: var(--text-secondary) !important;
    line-height: 1.7;
}

.card-body {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
    background: transparent !important;
}

/* Ensure text-decoration-none doesn't hide our colors */
.card a.text-decoration-none,
.text-decoration-none {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Buttons - Stellar */
.btn-primary {
    background: var(--gradient-nebula) !important;
    border: 2px solid var(--nebula-purple) !important;
    color: var(--star-white) !important;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(107, 70, 193, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(107, 70, 193, 0.6);
    border-color: var(--nebula-pink);
}

.btn-outline-primary {
    background: transparent !important;
    border: 2px solid var(--nebula-purple) !important;
    color: var(--nebula-purple) !important;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--gradient-nebula) !important;
    color: var(--star-white) !important;
    box-shadow: 0 0 25px rgba(107, 70, 193, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, var(--comet-green) 0%, #059669 100%) !important;
    border: 2px solid var(--comet-green) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--mars-red) 0%, #dc2626 100%) !important;
    border: 2px solid var(--mars-red) !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

/* Badges - Planetary - HIGHLY VISIBLE */
.badge {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 0.4rem 0.9rem !important;
    border-radius: 20px !important;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(139, 92, 246, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.05em !important;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    color: #ffffff !important;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(99, 102, 241, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.badge.bg-success,
.badge.bg-secondary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(16, 185, 129, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

/* Forms - Space Station */
.form-control,
.form-select {
    background: rgba(15, 22, 41, 0.8) !important;
    border: 1px solid rgba(107, 70, 193, 0.3) !important;
    color: var(--text-primary) !important;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background: rgba(15, 22, 41, 0.9) !important;
    border-color: var(--nebula-purple) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(107, 70, 193, 0.25), 0 0 20px rgba(107, 70, 193, 0.3) !important;
    outline: none;
}

.form-control::placeholder {
    color: var(--text-dim) !important;
    opacity: 0.7;
}

.form-label {
    color: var(--text-secondary) !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Alerts - Cosmic Messages */
.alert {
    background: rgba(15, 22, 41, 0.9) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-cosmic);
}

.alert-info {
    border-color: var(--nebula-blue);
    background: rgba(37, 99, 235, 0.15) !important;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
}

.alert-success {
    border-color: var(--comet-green);
    background: rgba(16, 185, 129, 0.15) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.alert-warning {
    border-color: var(--sun-orange);
    background: rgba(249, 115, 22, 0.15) !important;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.2);
}

.alert-danger {
    border-color: var(--mars-red);
    background: rgba(239, 68, 68, 0.15) !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

/* Stats Cards - Planetary Stats */
.stat-item {
    background: rgba(15, 22, 41, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(107, 70, 193, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: rgba(107, 70, 193, 0.6);
    box-shadow: var(--shadow-deep), var(--glow-nebula);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-sun);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.5));
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Sections & Titles */
.section-title {
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-nebula);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(107, 70, 193, 0.5));
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: var(--gradient-sun);
    border-radius: 2px;
    box-shadow: var(--glow-sun);
}

.section-subtitle {
    color: var(--text-secondary);
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

/* Pagination - Stellar Navigation */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.page-link {
    background: rgba(15, 22, 41, 0.8) !important;
    border: 1px solid rgba(107, 70, 193, 0.3) !important;
    color: var(--text-primary) !important;
    border-radius: 10px;
    margin: 0 4px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: rgba(107, 70, 193, 0.3) !important;
    border-color: var(--nebula-purple) !important;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(107, 70, 193, 0.4);
}

.page-item.active .page-link {
    background: var(--gradient-nebula) !important;
    border-color: var(--nebula-purple) !important;
    box-shadow: 0 0 20px rgba(107, 70, 193, 0.5);
}

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item {
    color: var(--text-dim);
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

.breadcrumb-item a {
    color: var(--nebula-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--comet-cyan);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* Footer - Deep Space */
.footer {
    background: rgba(10, 14, 39, 0.95) !important;
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(107, 70, 193, 0.3);
    margin-top: 4rem;
    padding: 3rem 0;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-nebula);
    opacity: 0.5;
}

.footer h5, .footer h6 {
    color: var(--star-bright);
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer p, .footer .text-muted {
    color: var(--text-secondary);
}

.footer a {
    color: var(--text-dim);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: var(--comet-cyan);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
    transform: translateX(5px);
}

/* Links */
a {
    color: var(--nebula-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--comet-cyan);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* Text Colors */
.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-dim) !important;
}

/* Sidebar - Space Station Module */
.sidebar {
    background: rgba(15, 22, 41, 0.8) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-cosmic);
}

.sidebar h3, .sidebar h4, .sidebar h5 {
    color: var(--star-bright) !important;
    font-weight: 700;
    margin-bottom: 1rem;
}

.sidebar .list-group-item {
    background: transparent !important;
    border: 1px solid rgba(107, 70, 193, 0.2);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.sidebar .list-group-item:hover {
    background: rgba(107, 70, 193, 0.2) !important;
    border-color: var(--nebula-purple);
    transform: translateX(5px);
    color: var(--star-bright);
}

.sidebar .list-group-item.active {
    background: rgba(107, 70, 193, 0.3) !important;
    border-color: var(--nebula-purple);
    color: var(--star-white);
    box-shadow: 0 0 15px rgba(107, 70, 193, 0.4);
}

/* News Items - Cosmic Articles */
.news-item,
.post-card {
    background: rgba(15, 22, 41, 0.8) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.news-item:hover,
.post-card:hover {
    transform: translateY(-8px);
    border-color: rgba(107, 70, 193, 0.6);
    box-shadow: var(--shadow-deep), var(--glow-nebula);
}

/* TITLES - MAXIMUM VISIBILITY */
.news-item .card-title,
.post-card .card-title,
.card .card-title,
h5.card-title,
h6.card-title,
.card h5,
.card h6,
.card-title a,
.card h5 a,
.card h6 a,
.card-title a:link,
.card-title a:visited,
.card-title a:active {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 1.25rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.75rem !important;
    text-shadow: 
        0 0 10px rgba(0, 0, 0, 1),
        0 0 20px rgba(0, 0, 0, 0.8),
        0 2px 8px rgba(0, 0, 0, 1),
        0 0 25px rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.news-item .card-title:hover,
.post-card .card-title:hover,
.card .card-title:hover,
.card-title a:hover {
    color: #ffffff !important;
    text-shadow: 
        0 0 15px rgba(255, 255, 255, 0.5),
        0 0 30px rgba(107, 70, 193, 0.6),
        0 2px 12px rgba(0, 0, 0, 1),
        0 0 35px rgba(107, 70, 193, 0.8) !important;
    transform: translateY(-1px);
}

.news-item .card-text,
.post-card .card-text,
.card-body p:not(.card-title),
.card p:not(.card-title),
.card-body .card-text {
    color: #d1d5db !important;
    line-height: 1.7;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
}

/* Override Bootstrap text-muted in cards */
.card .text-muted,
.card-body .text-muted,
.card-footer .text-muted {
    color: #9ca3af !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
}

.news-meta,
.post-meta,
.card-footer,
.card-footer small,
.card-footer .text-muted {
    color: #cbd5e1 !important;
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Ensure all headings are highly visible */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Section headings */
h2.mb-4,
section h2,
.main-content h2 {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
    font-weight: 800;
}

/* Category badges - OVERRIDE previous badge styles for visibility */
.badge {
    font-weight: 700 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
}

/* Scrollbar - Cosmic */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--space-void);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-nebula);
    border-radius: 6px;
    border: 2px solid var(--space-void);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--nebula-purple);
    box-shadow: 0 0 10px rgba(107, 70, 193, 0.5);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Typography - Cosmic Fonts */
h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--star-bright);
    text-shadow: 0 0 20px rgba(224, 231, 255, 0.3);
    letter-spacing: 0.05em;
}

h1, .display-1, .display-2, .display-3 {
    font-weight: 900;
}

h2, h3, .display-4 {
    font-weight: 800;
}

h4, h5, h6 {
    font-weight: 700;
}

.navbar-brand {
    font-family: 'Orbitron', sans-serif;
}

/* Responsive */
@media (max-width: 768px) {
    .cosmic-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .cosmic-title {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* Additional Cosmic Elements */
.astronomical-object {
    position: relative;
    display: inline-block;
}

.sun-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.4) 0%, transparent 70%);
    animation: sunPulse 3s ease-in-out infinite;
}

@keyframes sunPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.9;
    }
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, rgba(15, 22, 41, 0.5) 25%, rgba(107, 70, 193, 0.2) 50%, rgba(15, 22, 41, 0.5) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   COMPREHENSIVE COMPONENT STYLING
   ============================================ */

/* Tables - Cosmic Data Displays */
.table {
    background: transparent !important;
    color: var(--text-primary);
}

.table thead th {
    background: rgba(107, 70, 193, 0.2) !important;
    color: var(--star-bright) !important;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    border-bottom: 2px solid rgba(107, 70, 193, 0.4);
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.table tbody td {
    color: var(--text-secondary) !important;
    padding: 1rem;
    border-bottom: 1px solid rgba(107, 70, 193, 0.1);
    vertical-align: middle;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(107, 70, 193, 0.15) !important;
    transform: scale(1.01);
    box-shadow: 0 0 15px rgba(107, 70, 193, 0.2);
}

.table-hover tbody tr:hover td {
    color: var(--star-bright) !important;
}

.table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

/* List Groups - Celestial Lists */
.list-group {
    background: transparent;
}

.list-group-item {
    background: rgba(15, 22, 41, 0.5) !important;
    border: 1px solid rgba(107, 70, 193, 0.2) !important;
    color: var(--text-secondary) !important;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background: rgba(107, 70, 193, 0.2) !important;
    border-color: rgba(107, 70, 193, 0.4) !important;
    color: var(--star-bright) !important;
    transform: translateX(5px);
}

.list-group-item-action {
    cursor: pointer;
}

.list-group-item.active {
    background: rgba(107, 70, 193, 0.3) !important;
    border-color: var(--nebula-purple) !important;
    color: var(--star-white) !important;
    box-shadow: 0 0 15px rgba(107, 70, 193, 0.4);
    font-weight: 600;
}

.list-group-item:first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.list-group-item:last-child {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.list-group-flush .list-group-item {
    border-left: none;
    border-right: none;
}

/* Card Headers - Force Cosmic Styling */
.card-header.bg-white,
.card-header {
    background: rgba(107, 70, 193, 0.15) !important;
    border-bottom: 1px solid rgba(107, 70, 193, 0.3) !important;
    color: var(--star-bright) !important;
}

.card-header h5,
.card-header h6 {
    color: var(--star-bright) !important;
    font-weight: 700;
    margin: 0;
}

.card-footer {
    background: rgba(15, 22, 41, 0.5) !important;
    border-top: 1px solid rgba(107, 70, 193, 0.2) !important;
    color: var(--text-secondary);
}

.card-footer.bg-white {
    background: rgba(15, 22, 41, 0.5) !important;
}

/* Background Overrides - All White/Light Backgrounds */
.bg-white,
.bg-light {
    background: rgba(15, 22, 41, 0.8) !important;
    color: var(--text-primary) !important;
}

.bg-white *,
.bg-light * {
    color: inherit;
}

.bg-dark {
    background: rgba(10, 14, 39, 0.95) !important;
}

.bg-primary {
    background: var(--gradient-nebula) !important;
}

.bg-secondary {
    background: rgba(15, 22, 41, 0.6) !important;
}

.bg-success {
    background: linear-gradient(135deg, var(--comet-green) 0%, #059669 100%) !important;
}

.bg-danger {
    background: linear-gradient(135deg, var(--mars-red) 0%, #dc2626 100%) !important;
}

.bg-warning {
    background: linear-gradient(135deg, var(--sun-orange) 0%, #d97706 100%) !important;
}

.bg-info {
    background: linear-gradient(135deg, var(--nebula-blue) 0%, #2563eb 100%) !important;
}

/* Text Color Overrides */
.text-dark,
.text-dark * {
    color: var(--star-bright) !important;
}

.text-light,
.text-light * {
    color: var(--star-bright) !important;
}

.text-white,
.text-white * {
    color: var(--star-white) !important;
}

/* Modals - Cosmic Popups */
.modal-content {
    background: rgba(15, 22, 41, 0.98) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(107, 70, 193, 0.4);
    border-radius: 16px;
    box-shadow: var(--shadow-deep), var(--glow-nebula);
    color: var(--text-primary);
}

.modal-header {
    background: rgba(107, 70, 193, 0.15) !important;
    border-bottom: 1px solid rgba(107, 70, 193, 0.3);
    color: var(--star-bright);
}

.modal-title {
    color: var(--star-bright) !important;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

.modal-body {
    color: var(--text-secondary);
}

.modal-footer {
    background: rgba(15, 22, 41, 0.5);
    border-top: 1px solid rgba(107, 70, 193, 0.2);
}

.modal-backdrop {
    background: rgba(10, 14, 39, 0.9) !important;
    backdrop-filter: blur(5px);
}

/* Input Groups */
.input-group-text {
    background: rgba(15, 22, 41, 0.8) !important;
    border: 1px solid rgba(107, 70, 193, 0.3) !important;
    color: var(--text-secondary) !important;
}

.input-group .form-control {
    border-left: none;
    border-right: none;
}

.input-group .input-group-text:first-child {
    border-right: none;
    border-radius: 10px 0 0 10px;
}

.input-group .form-control:last-child {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

/* Select Elements */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

/* Article/Post Content */
.post-article,
.article-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.post-article h1,
.post-article h2,
.post-article h3,
.post-article h4 {
    color: var(--star-bright);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-article p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.post-article a {
    color: var(--nebula-blue);
    text-decoration: underline;
}

.post-article a:hover {
    color: var(--comet-cyan);
    text-shadow: 0 0 10px rgba(6, 182, 193, 0.5);
}

.post-article img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: var(--shadow-cosmic);
}

.post-article blockquote {
    border-left: 4px solid var(--nebula-purple);
    padding-left: 1.5rem;
    margin: 2rem 0;
    color: var(--text-secondary);
    font-style: italic;
    background: rgba(107, 70, 193, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
}

.post-article code {
    background: rgba(15, 22, 41, 0.8);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--comet-cyan);
    font-family: 'Courier New', monospace;
}

.post-article pre {
    background: rgba(15, 22, 41, 0.9);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid rgba(107, 70, 193, 0.3);
}

.post-article pre code {
    background: transparent;
    padding: 0;
    color: var(--text-primary);
}

/* Stats Cards Enhancement */
.stats-card {
    position: relative;
    overflow: hidden;
}

.stats-card::after {
    /* DISABLED FOR PERFORMANCE */
    /* content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(107, 70, 193, 0.3) 0%, transparent 70%);
    animation: statsGlow 4s ease-in-out infinite; */
}

@keyframes statsGlow {
    /* DISABLED */
}

/* News Article Cards */
.news-card {
    position: relative;
    overflow: hidden;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, rgba(107, 70, 193, 0.1) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.news-card:hover::before {
    opacity: 1;
}

/* Category Badges with Colors */
.category-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Featured Image Enhancement */
.featured-image {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-deep);
    position: relative;
}

.featured-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(10, 14, 39, 0.3) 100%);
    pointer-events: none;
}

/* Tags and Meta Info */
.post-tags,
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.post-tags a,
.article-tags a {
    background: rgba(107, 70, 193, 0.2);
    color: var(--text-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid rgba(107, 70, 193, 0.3);
    transition: all 0.3s ease;
}

.post-tags a:hover,
.article-tags a:hover {
    background: rgba(107, 70, 193, 0.4);
    color: var(--star-bright);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(107, 70, 193, 0.4);
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(107, 70, 193, 0.2);
}

.share-btn {
    background: rgba(15, 22, 41, 0.8);
    border: 1px solid rgba(107, 70, 193, 0.3);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: rgba(107, 70, 193, 0.3);
    color: var(--star-bright);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(107, 70, 193, 0.4);
}

/* Author Info Box */
.author-box {
    background: rgba(15, 22, 41, 0.8);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 3rem;
}

.author-box h5 {
    color: var(--star-bright);
    margin-bottom: 1rem;
}

.author-box p {
    color: var(--text-secondary);
}

/* Comments Section */
.comments-section {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(107, 70, 193, 0.2);
}

.comment {
    background: rgba(15, 22, 41, 0.5);
    border: 1px solid rgba(107, 70, 193, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 700;
    color: var(--star-bright);
}

.comment-date {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-left: auto;
}

.comment-body {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Admin Panel Specific */
.admin-card {
    border-left: 4px solid var(--nebula-purple);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-stat-item {
    background: rgba(15, 22, 41, 0.8);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.admin-stat-item:hover {
    transform: translateY(-5px);
    border-color: rgba(107, 70, 193, 0.6);
    box-shadow: var(--shadow-deep);
}

.admin-stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    background: var(--gradient-sun);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.admin-stat-label {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* Action Buttons */
.btn-group {
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-xs {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

/* Progress Bars */
.progress {
    background: rgba(15, 22, 41, 0.5);
    border-radius: 10px;
    height: 1rem;
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-nebula);
    box-shadow: 0 0 10px rgba(107, 70, 193, 0.5);
}

/* Tooltips */
.tooltip-inner {
    background: rgba(15, 22, 41, 0.95);
    border: 1px solid rgba(107, 70, 193, 0.3);
    color: var(--text-primary);
}

.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: rgba(107, 70, 193, 0.3);
}

.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: rgba(107, 70, 193, 0.3);
}

/* Utility Classes */
.text-cosmic {
    background: var(--gradient-nebula);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-effect {
    box-shadow: var(--glow-nebula);
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(107, 70, 193, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(107, 70, 193, 0.8);
    }
}

/* Ensure All Inline Styles Are Overridden */
[style*="background: white"],
[style*="background: #fff"],
[style*="background-color: white"],
[style*="background-color: #fff"] {
    background: rgba(5, 10, 25, 0.98) !important;
}

[style*="color: #000"],
[style*="color: black"],
[style*="color: #212529"] {
    color: #ffffff !important;
}

/* Override ANY color on card links and titles */
.card * {
    color: inherit;
}

.card a,
.card-title,
.card h5,
.card h6 {
    color: #ffffff !important;
}

/* Force Dark Theme Consistency */
* {
    box-sizing: border-box;
}

/* FINAL OVERRIDE - Maximum specificity to ensure visibility */
body .card .card-title,
body .card h5,
body .card h6,
body .card a.text-decoration-none,
body .card-title a,
body .card h5 a,
body .card h6 a,
.card-body .card-title,
.card-body h5,
.card-body h6,
.card-body .card-title a {
    color: #ffffff !important;
    text-shadow: 
        0 0 15px rgba(0, 0, 0, 1),
        0 0 25px rgba(0, 0, 0, 0.9),
        0 3px 10px rgba(0, 0, 0, 1),
        0 0 30px rgba(255, 255, 255, 0.4) !important;
    font-weight: 800 !important;
}

/* Override all Bootstrap link colors in cards */
.card a:link,
.card a:visited,
.card a:active,
.card a:focus {
    color: #ffffff !important;
}

/* Ensure card backgrounds are dark enough */
.card,
.card-body {
    background-color: rgba(5, 10, 25, 0.98) !important;
    background: rgba(5, 10, 25, 0.98) !important;
}

/* Performance Optimization - Disable expensive operations */
.card-3d,
.float-cosmic,
.parallax-cosmic {
    transform: none !important;
    will-change: auto !important;
}

/* Reduce backdrop-filter for performance */
.card {
    backdrop-filter: blur(5px) !important; /* Reduced from 15px */
}

/* Images in Cards */
.card-img-top,
.card-img {
    border-radius: 12px 12px 0 0;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-dim);
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.5;
    margin-bottom: 1rem;
    background: var(--gradient-nebula);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-dim);
}

/* ============================================
   ADVANCED COSMIC EFFECTS
   ============================================ */

/* Glassmorphism Enhancement */
.card-body,
.modal-body {
    position: relative;
    z-index: 2;
}

/* Shimmer Effect for Buttons */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after,
.btn-secondary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-primary:hover::after,
.btn-secondary:hover::after {
    left: 100%;
}

/* Magnetic Hover Effect */
.magnetic-element {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Pulse Glow for Important Elements */
.pulse-cosmic {
    animation: pulseGlowCosmic 3s ease-in-out infinite;
}

@keyframes pulseGlowCosmic {
    0%, 100% {
        box-shadow: 0 0 20px rgba(107, 70, 193, 0.4),
                    0 0 40px rgba(107, 70, 193, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(107, 70, 193, 0.8),
                    0 0 80px rgba(107, 70, 193, 0.4);
    }
}

/* Gradient Text Animation */
.gradient-text-animated {
    background: linear-gradient(
        -45deg,
        #6b46c1,
        #3b82f6,
        #06b6d4,
        #10b981,
        #6b46c1
    );
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Cosmic Loading Spinner */
.cosmic-loader {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(107, 70, 193, 0.3);
    border-top-color: var(--nebula-purple);
    border-radius: 50%;
    animation: cosmicSpin 1s linear infinite;
    box-shadow: 0 0 20px rgba(107, 70, 193, 0.5);
}

@keyframes cosmicSpin {
    to { transform: rotate(360deg); }
}

/* Interactive Card Hover States */
.card {
    cursor: pointer;
}

.card-img-top {
    transition: filter 0.3s ease; /* Only filter transition, no transform */
    filter: brightness(0.95);
}

.card:hover .card-img-top {
    /* transform: scale(1.1); DISABLED FOR PERFORMANCE */
    filter: brightness(1.05);
}

/* Scroll Reveal Animation */
.reveal-cosmic {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-cosmic.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Nebula Background Layers */
.nebula-layer-1 {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at 20% 30%,
        rgba(107, 70, 193, 0.2) 0%,
        transparent 50%
    );
    animation: nebulaDrift1 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.nebula-layer-2 {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at 80% 70%,
        rgba(59, 130, 246, 0.2) 0%,
        transparent 50%
    );
    animation: nebulaDrift2 25s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes nebulaDrift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-5%, -5%) scale(1.1); }
}

@keyframes nebulaDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 5%) scale(1.1); }
}

/* Enhanced Button Styles */
.btn {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.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, height 0.6s;
}

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

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(107, 70, 193, 0.4);
}

/* Text Glow on Hover */
.glow-text {
    text-shadow: 0 0 10px rgba(107, 70, 193, 0.5);
    transition: text-shadow 0.3s ease;
}

.glow-text:hover {
    text-shadow: 0 0 20px rgba(107, 70, 193, 0.8),
                 0 0 30px rgba(59, 130, 246, 0.6);
}

/* Animated Border */
.animated-border {
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.animated-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        var(--nebula-purple),
        var(--nebula-blue),
        var(--comet-cyan),
        var(--nebula-purple)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
