:root {
    --bg-primary: #080510;
    --bg-secondary: #0d0a1a;
    --bg-card: rgba(15, 12, 30, 0.7);
    --accent-blue: #00d4ff;
    --accent-magenta: #ff00aa;
    --accent-green: #00ff88;
    --accent-orange: #ff6a00;
    --text-primary: #e8e4f0;
    --text-secondary: #8a84a0;
    --border-glow: rgba(0, 212, 255, 0.15);
}

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

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'IBM Plex Sans', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 255, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 0, 170, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 255, 136, 0.02) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

#root {
    position: relative;
    z-index: 1;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.05);
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

.btn-glow {
    position: relative;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-magenta));
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-magenta), var(--accent-green));
    border-radius: inherit;
    z-index: -1;
    filter: blur(8px);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.btn-glow:hover::before {
    opacity: 0.8;
}

.btn-glow:hover {
    transform: translateY(-1px);
}

.btn-glow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

@keyframes pulse-border {
    0%, 100% { border-color: rgba(0, 212, 255, 0.2); }
    50% { border-color: rgba(0, 212, 255, 0.5); }
}

.pulse-border {
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

.pixel-grid-overlay {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.log-container {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    overflow-y: auto;
    max-height: 200px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.3) transparent;
}

.log-container::-webkit-scrollbar {
    width: 6px;
}

.log-container::-webkit-scrollbar-track {
    background: transparent;
}

.log-container::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

.drop-zone {
    border: 2px dashed rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--accent-blue);
    background: rgba(0, 212, 255, 0.05);
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.2);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 6px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    outline: none;
}

select:focus {
    border-color: var(--accent-blue);
}

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

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.filmstrip-thumb {
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 4px;
    image-rendering: pixelated;
}

@keyframes trainPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 255, 136, 0.2); }
    50% { box-shadow: 0 0 25px rgba(0, 255, 136, 0.5); }
}

.training-active {
    animation: trainPulse 1.5s ease-in-out infinite;
}