:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --accent-cyan: #06d6a0;
    --accent-blue: #118ab2;
    --accent-purple: #7b2ff7;
    --accent-neon: #39ff14;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --border-color: rgba(6, 214, 160, 0.2);
}

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

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

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(123, 47, 247, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(6, 214, 160, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(17, 138, 178, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

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

.code-editor {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    background: rgba(10, 14, 26, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-primary);
    resize: vertical;
    width: 100%;
    min-height: 200px;
    outline: none;
    transition: border-color 0.3s ease;
}

.code-editor:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(6, 214, 160, 0.1);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(6, 214, 160, 0.4);
    box-shadow: 0 8px 32px rgba(6, 214, 160, 0.05);
}

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

.scanning-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    animation: scanline 1.5s ease-in-out infinite;
    opacity: 0.8;
}

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

.card-animate {
    animation: fadeSlideUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(6, 214, 160, 0.3); }
    50% { box-shadow: 0 0 40px rgba(6, 214, 160, 0.6); }
}

.analyze-btn {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    color: #0a0e1a;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.analyze-btn:hover {
    transform: translateY(-2px);
    animation: pulse-glow 1.5s infinite;
}

.analyze-btn:active {
    transform: translateY(0);
}

.analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}

.complexity-gauge {
    height: 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
}

.complexity-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease;
    background: linear-gradient(90deg, var(--accent-neon), var(--accent-cyan), var(--accent-purple), #ff006e);
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.2);
    border-color: var(--accent-cyan);
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.drop-zone.drag-over {
    border-color: var(--accent-cyan);
    background: rgba(6, 214, 160, 0.05);
}

.sample-btn {
    background: rgba(123, 47, 247, 0.15);
    border: 1px solid rgba(123, 47, 247, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.sample-btn:hover {
    background: rgba(123, 47, 247, 0.3);
    border-color: var(--accent-purple);
}

.check-pass {
    color: var(--accent-cyan);
}

.check-fail {
    color: #ff6b6b;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(6, 214, 160, 0.1);
    border: 1px solid rgba(6, 214, 160, 0.2);
    color: var(--accent-cyan);
}

.bar-chart-bar {
    height: 24px;
    border-radius: 4px;
    transition: width 0.8s ease;
    display: flex;
    align-items: center;
    padding-left: 8px;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: #0a0e1a;
    font-weight: 600;
    min-width: 30px;
}

.header-scan {
    position: relative;
    overflow: hidden;
}

.header-scan::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(6, 214, 160, 0.1), transparent);
    animation: headerScan 3s ease-in-out infinite;
}

@keyframes headerScan {
    0% { left: -100%; }
    100% { left: 100%; }
}

.preview-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
}

.tooltip {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    pointer-events: none;
    z-index: 100;
    white-space: nowrap;
}

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

.spinner {
    animation: spin 1s linear infinite;
}