/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000000;
    color: #ffffff;
    line-height: 1.6;
    position: relative;
}

/* WebGL Canvas Background */
#mesh-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: block;
    /* Prevent Dark Reader from interfering */
    filter: none !important;
    -webkit-filter: none !important;
}

/* Main Content */
.content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
}

.container {
    max-width: 800px;
    width: 100%;
}

/* Logo */
.logo {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoGlow 3s ease-in-out infinite;
    font-display: swap;
}

@keyframes logoGlow {
    0%, 100% { 
        filter: brightness(1);
        transform: scale(1);
    }
    50% { 
        filter: brightness(1.1);
        transform: scale(1.02);
    }
}

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

/* Dictionary Entry */
.dictionary-entry {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    max-width: 600px;
    margin: 0 auto;
}

.part-of-speech {
    font-size: clamp(0.7rem, 1.6vw, 0.85rem);
    font-weight: 500;
    font-style: italic;
    color: #999999;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    opacity: 0.9;
    flex-shrink: 0;
}

.pronunciation {
    font-size: clamp(0.6rem, 1.4vw, 0.75rem);
    font-weight: 400;
    font-style: normal;
    color: #888888;
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.01em;
    opacity: 0.8;
    flex-shrink: 0;
}

.definition {
    font-size: clamp(0.8rem, 2.2vw, 1.1rem);
    font-weight: 300;
    font-style: normal;
    color: #e0e0e0;
    letter-spacing: 0.01em;
    line-height: 1.3;
    text-align: left;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }
    
    .logo {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo {
        margin-bottom: 1rem;
    }
}

/* Performance optimizations */
#mesh-canvas {
    will-change: transform;
}

/* Dark Reader protection */
body[data-darkreader-mode="off"] {
    /* Ensure Dark Reader doesn't apply filters */
    filter: none !important;
    -webkit-filter: none !important;
}

/* Additional protection for canvas elements */
canvas {
    filter: none !important;
    -webkit-filter: none !important;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .logo {
        animation: none;
    }
    
}

/* Loading state */
.loading {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.loaded {
    opacity: 1;
}

/* Under Construction Banner */
.under-construction {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 400;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    line-height: 1.4;
    opacity: 0;
    animation: fadeInConstruction 0.3s ease-in forwards;
}

.construction-text {
    display: inline-block;
}

.cursor {
    display: inline-block;
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

@keyframes fadeInConstruction {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Responsive adjustments for construction banner */
@media (max-width: 768px) {
    .under-construction {
        top: 10px;
        left: 10px;
    }
}