:root {
    --bg-color: #05091a;
    --surface: #0b1428;
    --card: #0e1a33;
    --card-hover: #122040;
    --text-primary: #e2e8f0;
    --text-secondary: #7b92b8;
    --accent-primary: #00c4cc;
    --accent-secondary: #818cf8;
    --glass-bg: rgba(14, 26, 51, 0.7);
    --glass-border: #1a2f50;
    --glass-glow: rgba(0, 196, 204, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Animations */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--accent-primary);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: var(--accent-secondary);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: rgba(129, 140, 248, 0.25);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

/* Glassmorphism Utilities */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 15, 0.5);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 100;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 var(--glass-glow);
    border-color: #2a4870;
}

/* Typography & Navigation */
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent-secondary);
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #05091a;
    box-shadow: 0 4px 15px rgba(0, 196, 204, 0.4);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 196, 204, 0.6);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 120px 5% 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(0, 196, 204, 0.1);
    border: 1px solid rgba(0, 196, 204, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

h1 span {
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 1;
    position: relative;
}

.main-render-card {
    padding: 10px;
    position: relative;
    overflow: hidden;
}

.main-render-card img {
    width: 100%;
    border-radius: 16px;
    display: block;
    transition: transform 0.5s ease;
}

.main-render-card:hover img {
    transform: scale(1.02);
}

.render-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.render-stat {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Features Section */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.features-section {
    padding: 100px 5%;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
}

.feature-card code {
    font-family: 'Fira Code', monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: #818cf8;
}

/* Gallery Section */
.gallery-section {
    padding: 100px 5%;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.gallery-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.gallery-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.gallery-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #05091a;
}

.gallery-display {
    position: relative;
    padding: 10px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-display img {
    width: 100%;
    border-radius: 16px;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.gallery-display img.loading {
    opacity: 0.3;
}

.loading-spinner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

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

/* Visualization Section */
.viz-section {
    padding: 100px 5%;
}

.viz-description {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.canvas-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
}

#ray-canvas {
    border-radius: 12px;
    background: #05091a;
    box-shadow: inset 0 0 20px rgba(0, 196, 204, 0.2);
    width: 100%;
    max-width: 800px;
    height: auto;
}

.viz-overlay {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

/* Footer */
footer {
    padding: 60px 5% 40px;
}

.footer-content {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.tech-stack span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 150px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .render-overlay {
        justify-content: center;
        width: 100%;
        left: 0;
    }
    
    h1 {
        font-size: 3rem;
    }
}
