/* Reset and Base */
:root {
    --window-bg: rgba(255, 255, 255, 0.92);
    --text-color: #333333;
    --accent-color: #0099cc;
    --accent-hover: #0077a3;
    --border-color: #a0b0b9;
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-window: 0 10px 30px rgba(0, 20, 40, 0.15);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    overflow-x: hidden;
    position: relative;
    background: #111; /* Fallback */
}

/* Dynamic Background Container */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* Video Background */
.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.3;
    filter: brightness(80%) saturate(110%);
}

/* Modern Gradient Overlay */
.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(20, 30, 50, 0.9) 0%, rgba(0, 0, 0, 0.95) 100%);
    mix-blend-mode: normal;
}

/* Vector Elements */
.vector-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.2;
    mix-blend-mode: screen;
    animation: float 10s infinite ease-in-out;
}

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

/* Dithering Overlay (existing, tweaked) */
.dither-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAIklEQVQIW2NkQAKrVq36zwjjgzjwqhgYQAwcjEABZAwTBAAlGw/0j+QkVQAAAABJRU5ErkJggg==');
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

/* Layout */
.main-container {
    width: 100%;
    max-width: 800px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Header */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.5rem;
    margin-bottom: 1rem;
}

.logo-img {
    height: 40px;
    width: auto;
    filter: invert(1) drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

/* Language Toggle */
.lang-toggle {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 3px;
    display: flex;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.lang-toggle button {
    background: transparent;
    border: none;
    padding: 5px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    color: #555;
    transition: all 0.2s ease;
}

.lang-toggle button.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 153, 204, 0.4);
}

.lang-toggle button:hover:not(.active) {
    color: var(--accent-color);
}

/* Window / Content Card */
.content-window {
    background: var(--window-bg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    box-shadow: var(--shadow-window);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(10px);
}

.window-bar {
    background: linear-gradient(to bottom, #f7f7f7, #e6e6e6);
    padding: 8px 12px;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.window-controls {
    display: flex;
    gap: 6px;
}

.control {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
}

.control.red { background: #ff5f56; }
.control.yellow { background: #ffbd2e; }
.control.green { background: #27c93f; }

.window-title {
    font-size: 0.8rem;
    color: #666;
    margin-left: auto;
    margin-right: auto;
    font-family: monospace;
}

.text-content {
    padding: 2.5rem 3rem;
    font-size: 1.05rem;
    color: #2c3e50;
    transition: opacity 0.3s ease;
}

.text-content.hidden {
    display: none;
    opacity: 0;
}

.text-content.active {
    display: block;
    opacity: 1;
}

/* Typography in article */
h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #000;
    letter-spacing: -0.5px;
}

.quote {
    font-style: italic;
    color: #555;
    margin-bottom: 2rem;
    border-left: 3px solid var(--accent-color);
    padding-left: 1rem;
    font-size: 0.95rem;
    background: rgba(0, 153, 204, 0.05);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

p {
    margin-bottom: 1.5rem;
    text-align: left;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border 0.2s;
}

a:hover {
    border-bottom: 1px solid var(--accent-color);
}

.references {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #555;
}

.reference-item {
    margin-bottom: 1rem;
}

/* Footer */
.site-footer {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
    .text-content {
        padding: 1.5rem;
    }
    
    .main-container {
        width: 95%;
    }
    
    .logo-img {
        height: 30px;
    }
}
