/* Reset & Futuristic Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Futuristic Color Palette */
    --neon-blue: #00f3ff;
    --neon-purple: #b026ff;
    --neon-pink: #ff006e;
    --neon-green: #39ff14;
    --neon-orange: #ff6b35;
    
    --dark-bg: #0a0a0f;
    --dark-surface: #151520;
    --dark-elevated: #1a1a2e;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b8a;
    
    /* Gradients */
    --gradient-neon: linear-gradient(135deg, #00f3ff 0%, #b026ff 50%, #ff006e 100%);
    --gradient-holographic: linear-gradient(135deg, 
        #00f3ff 0%, 
        #b026ff 25%, 
        #ff006e 50%, 
        #ff6b35 75%, 
        #39ff14 100%);
    --gradient-dark: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    
    /* Typography */
    --font-futuristic: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Effects */
    --glow-blue: 0 0 20px rgba(0, 243, 255, 0.5), 0 0 40px rgba(0, 243, 255, 0.3);
    --glow-purple: 0 0 20px rgba(176, 38, 255, 0.5), 0 0 40px rgba(176, 38, 255, 0.3);
    --glow-pink: 0 0 20px rgba(255, 0, 110, 0.5), 0 0 40px rgba(255, 0, 110, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(0, 243, 255, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(176, 38, 255, 0.3), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 0, 110, 0.2), transparent);
    background-size: 200% 200%;
    animation: particleMove 20s ease infinite;
    opacity: 0.6;
}

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

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: blobMove 20s ease-in-out infinite;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--neon-blue);
    top: -200px;
    left: -200px;
    animation-duration: 25s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: var(--neon-purple);
    bottom: -150px;
    right: -150px;
    animation-duration: 30s;
    animation-delay: -10s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: var(--neon-pink);
    top: 50%;
    left: 50%;
    animation-duration: 35s;
    animation-delay: -15s;
}

@keyframes blobMove {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(100px, -100px) scale(1.1);
    }
    66% {
        transform: translate(-100px, 100px) scale(0.9);
    }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    position: relative;
    font-family: var(--font-futuristic);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-neon);
    filter: blur(20px);
    opacity: 0.5;
    z-index: -1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-neon);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 8rem 2rem 4rem;
}

.hero-content {
    text-align: center;
    max-width: 1200px;
}

.hero-title-wrapper {
    margin-bottom: 2rem;
}

.hero-title {
    font-family: var(--font-futuristic);
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1rem;
}

.title-line {
    display: block;
    background: var(--gradient-holographic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holographic 3s ease infinite;
    background-size: 200% 200%;
}

.title-glow {
    text-shadow: var(--glow-blue);
    filter: drop-shadow(0 0 30px rgba(0, 243, 255, 0.5));
}

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

.title-underline {
    width: 200px;
    height: 4px;
    background: var(--gradient-neon);
    margin: 1rem auto;
    border-radius: 2px;
    box-shadow: var(--glow-blue);
    animation: underlineExpand 1s ease;
}

@keyframes underlineExpand {
    from { width: 0; }
    to { width: 200px; }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-futuristic);
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Search Section */
.search-section {
    position: relative;
    z-index: 1;
    padding: 2rem 0;
    background: rgba(21, 21, 32, 0.5);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 243, 255, 0.1);
    border-bottom: 1px solid rgba(0, 243, 255, 0.1);
}

.search-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-blue);
    z-index: 2;
}

#search-input {
    width: 100%;
    padding: 1.2rem 1.2rem 1.2rem 3.5rem;
    background: rgba(26, 26, 46, 0.8);
    border: 2px solid rgba(0, 243, 255, 0.3);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    outline: none;
}

#search-input:focus {
    border-color: var(--neon-blue);
    box-shadow: var(--glow-blue);
    background: rgba(26, 26, 46, 0.95);
}

#search-input::placeholder {
    color: var(--text-muted);
}

.search-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-neon);
    border-radius: 16px;
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.3s ease;
    z-index: -1;
}

#search-input:focus ~ .search-glow {
    opacity: 0.3;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-btn:hover {
    border-color: var(--neon-blue);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--gradient-neon);
    border-color: transparent;
    color: var(--dark-bg);
    box-shadow: var(--glow-blue);
    font-weight: 600;
}

/* Sections */
.section {
    position: relative;
    z-index: 1;
    padding: 6rem 0;
}

.section-dark {
    background: rgba(10, 10, 15, 0.5);
    border-top: 1px solid rgba(176, 38, 255, 0.2);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-futuristic);
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 700;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title-icon {
    font-size: 0.8em;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
}

.title-line-animated {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--gradient-neon);
    border-radius: 2px;
    box-shadow: var(--glow-blue);
    animation: linePulse 2s ease-in-out infinite;
}

@keyframes linePulse {
    0%, 100% { width: 100px; opacity: 1; }
    50% { width: 150px; opacity: 0.7; }
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Futuristic Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.card {
    position: relative;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 24px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    transform-style: preserve-3d;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-holographic);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    background-size: 200% 200%;
    animation: holographic 3s ease infinite;
}

.card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-neon);
    border-radius: 24px;
    opacity: 0;
    z-index: -1;
    filter: blur(20px);
    transition: opacity 0.4s ease;
}

.card:hover::before {
    opacity: 0.1;
}

.card:hover::after {
    opacity: 0.5;
}

.card:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg) scale(1.02);
    border-color: var(--neon-blue);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.5),
        var(--glow-blue),
        inset 0 0 20px rgba(0, 243, 255, 0.1);
}

.card > * {
    position: relative;
    z-index: 1;
}

.card-year {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--neon-blue);
    background: rgba(0, 243, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 243, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--gradient-neon);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--glow-blue);
    transition: all 0.4s ease;
}

.card-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
    color: var(--dark-bg);
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 
        var(--glow-blue),
        0 0 30px rgba(0, 243, 255, 0.6);
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--font-mono);
    border: 1px solid;
    transition: all 0.3s ease;
}

.badge-real {
    background: rgba(0, 243, 255, 0.1);
    color: var(--neon-blue);
    border-color: rgba(0, 243, 255, 0.3);
}

.badge-ai {
    background: rgba(176, 38, 255, 0.1);
    color: var(--neon-purple);
    border-color: rgba(176, 38, 255, 0.3);
}

.card:hover .card-badge {
    transform: scale(1.05);
    box-shadow: 0 0 15px currentColor;
}

.card-title {
    font-family: var(--font-futuristic);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--neon-blue);
    margin-bottom: 1rem;
    font-weight: 500;
    font-family: var(--font-mono);
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Modal - Futuristic Full-Screen */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

.modal.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease;
}

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

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #1a1a2e;
    z-index: 2001;
    overflow: hidden;
    animation: modalSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2003;
    transition: all 0.3s ease;
    color: var(--neon-blue);
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--neon-blue);
    transform: rotate(90deg) scale(1.1);
    box-shadow: var(--glow-blue);
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    background: rgba(30, 30, 50, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    z-index: 2002;
}

.modal-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--font-mono);
    border: 1px solid;
    flex-shrink: 0;
}

.modal-title {
    font-family: var(--font-futuristic);
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-left: auto;
    flex-shrink: 0;
}

.modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    position: relative;
}

.flourish-container {
    width: 100%;
    height: 100%;
    flex: 1;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flourish-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.logo-overlay {
    position: absolute;
    bottom: 4.5rem;
    right: 1rem;
    z-index: 2010;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.logo-overlay:hover {
    opacity: 1;
}

.logo-overlay-img {
    width: 180px;
    height: auto;
    filter: drop-shadow(0 2px 12px rgba(0, 243, 255, 0.4));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-overlay:hover .logo-overlay-img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 16px rgba(0, 243, 255, 0.6));
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-secondary);
}

        .spinner-ring {
            width: 60px;
            height: 60px;
            border: 4px solid rgba(0, 243, 255, 0.2);
            border-top-color: var(--neon-blue);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 1rem;
            box-shadow: var(--glow-blue);
        }
        
        .flourish-container .loading-spinner {
            color: #1a1a1a;
        }
        
        .flourish-container .loading-spinner p {
            color: #1a1a1a;
        }

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

.modal-info {
    display: none; /* Hidden - focus on visualization only */
}

.modal-description {
    display: none;
}

.modal-source {
    display: none;
}

/* Footer */
.footer {
    position: relative;
    z-index: 1;
    background: rgba(10, 10, 15, 0.8);
    border-top: 1px solid rgba(0, 243, 255, 0.2);
    padding: 3rem 0;
    margin-top: 6rem;
}

.footer-content {
    text-align: center;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-family: var(--font-futuristic);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 243, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    
    .modal-title {
        font-size: 1rem;
        width: 100%;
        order: 3;
        margin-top: 0.5rem;
    }
    
    .modal-subtitle {
        font-size: 0.75rem;
    }
    
    .flourish-container iframe {
        height: 100%;
    }
    
    .logo-overlay {
        bottom: 3.5rem;
        right: 0.5rem;
    }
    
    .logo-overlay-img {
        width: 130px;
    }
}

/* Scroll Animations */
.card {
    opacity: 0;
    transform: translateY(50px) rotateX(10deg);
    animation: cardReveal 0.6s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

@keyframes cardReveal {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

/* Hide cards initially for search/filter */
.card.hidden {
    display: none;
}
