:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --dark-bg: #0a0e27;
    --light-bg: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --accent-1: #3498db;
    --accent-2: #e74c3c;
    --accent-3: #f39c12;
    --accent-4: #2ecc71;
    --glow-color: rgba(102, 126, 234, 0.5);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

body.light-theme {
    --dark-bg: #f7fafc;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --glow-color: rgba(102, 126, 234, 0.2);
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

.quantum-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s var(--transition-smooth);
}

.nav-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 119, 198, 0.3) 0%, transparent 50%);
    animation: navGlow 8s ease-in-out infinite;
}

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

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.nav-controls {
    display: flex;
    gap: 1rem;
}

.nav-controls button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.nav-controls button::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.5s, height 0.5s;
}

.nav-controls button:hover::before {
    width: 100px;
    height: 100px;
}

.nav-controls button:hover {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--accent-1);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
}

.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: 80px;
    overflow: hidden;
}

.hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at top, rgba(102, 126, 234, 0.2) 0%, transparent 70%),
        radial-gradient(ellipse at bottom, rgba(245, 87, 108, 0.2) 0%, transparent 70%),
        var(--dark-bg);
    animation: backdropShift 20s ease-in-out infinite;
}

@keyframes backdropShift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(1deg); }
    50% { transform: scale(1.05) rotate(-1deg); }
    75% { transform: scale(1.08) rotate(0.5deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.hero-title {
    margin-bottom: 3rem;
}

.glitch-text {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    animation: glitchAnim 2s infinite;
}

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

.glitch-text::before {
    animation: glitch1 0.5s infinite;
    color: var(--accent-1);
    z-index: -1;
}

.glitch-text::after {
    animation: glitch2 0.5s infinite;
    color: var(--accent-2);
    z-index: -2;
}

@keyframes glitch1 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(30% 0 40% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(10% 0 60% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(80% 0 10% 0); transform: translate(-2px, 1px); }
    80% { clip-path: inset(50% 0 30% 0); transform: translate(1px, -1px); }
}

@keyframes glitch2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(60% 0 20% 0); transform: translate(2px, -2px); }
    40% { clip-path: inset(20% 0 50% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(40% 0 40% 0); transform: translate(2px, 1px); }
    80% { clip-path: inset(70% 0 10% 0); transform: translate(-1px, -2px); }
}

.subtitle {
    display: block;
    font-size: 1.5rem;
    font-weight: 300;
    margin-top: 1rem;
    opacity: 0.8;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s var(--transition-smooth);
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10px;
}

.scroll-wheel {
    width: 4px;
    height: 10px;
    background: var(--text-primary);
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(20px); opacity: 0; }
}

.gallery-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    z-index: 2;
}

.filter-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-header h3 {
    font-size: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filter-reset {
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
}

.filter-reset:hover {
    background: var(--accent-2);
    transform: scale(1.05);
}

.filter-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 50px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary-gradient);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: width 0.5s, height 0.5s;
}

.filter-btn:hover::before {
    width: 200px;
    height: 200px;
}

.filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.filter-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
}

.search-container {
    position: relative;
    margin-bottom: 3rem;
}

.search-input {
    width: 100%;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: all 0.3s var(--transition-smooth);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 30px rgba(52, 152, 219, 0.3);
    transform: scale(1.02);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    animation: fadeIn 1s ease-out;
}

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

.windmill-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s var(--transition-smooth);
    cursor: pointer;
    position: relative;
    animation: cardFloat 0.6s ease-out;
}

@keyframes cardFloat {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.windmill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

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

.windmill-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-1);
}

.windmill-svg-container {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
}

.windmill-info {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

.windmill-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.windmill-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.windmill-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.loading-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.loading-indicator.active {
    display: flex;
}

.loader-windmill {
    width: 100px;
    height: 100px;
    animation: spin 2s linear infinite;
}

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

.loader-text {
    margin-top: 1rem;
    color: var(--text-secondary);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    animation: modalFade 0.3s ease-out;
}

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

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--dark-bg);
    border-radius: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.modal-close:hover {
    background: var(--accent-2);
    transform: rotate(90deg);
}

.modal-windmill {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
}

.modal-info {
    padding: 2rem;
}

.modal-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

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

.action-btn {
    padding: 1rem 2rem;
    background: var(--primary-gradient);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.footer {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

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

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary-gradient);
    transform: translateY(-5px) rotate(10deg);
}

.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .glitch-text {
        font-size: clamp(2rem, 10vw, 4rem);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-card {
        width: 100%;
        max-width: 300px;
    }
    
    .modal-content {
        width: 95%;
        border-radius: 20px;
    }
    
    .filter-options {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

@media (prefers-color-scheme: light) {
    body.auto-theme {
        --dark-bg: #f7fafc;
        --text-primary: #1a202c;
        --text-secondary: #4a5568;
        --glow-color: rgba(102, 126, 234, 0.2);
    }
}