:root {
    --color-primary: #a855f7;
    --color-secondary: #22d3ee;
    --color-bg: #0a0a0f;
    --color-surface: #12121a;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--color-bg);
    background-image: 
        radial-gradient(ellipse at top, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(34, 211, 238, 0.05) 0%, transparent 50%);
    min-height: 100vh;
}

/* Scanline Effect */
.scanline-overlay {
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    animation: scanlines 0.1s linear infinite;
    opacity: 0.3;
}

@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 4px; }
}

/* Glitch Text Effect */
.glitch-text {
    position: relative;
    animation: glitch 3s infinite;
}

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

.glitch-text::before {
    animation: glitch-1 0.3s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
    color: #ff00ff;
}

.glitch-text::after {
    animation: glitch-2 0.3s infinite linear alternate-reverse;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
    color: #00ffff;
}

@keyframes glitch {
    0%, 90%, 100% { transform: translate(0); }
    91% { transform: translate(-2px, 1px); }
    92% { transform: translate(2px, -1px); }
    93% { transform: translate(-1px, 2px); }
}

@keyframes glitch-1 {
    0% { transform: translate(0); }
    100% { transform: translate(-2px, 1px); }
}

@keyframes glitch-2 {
    0% { transform: translate(0); }
    100% { transform: translate(2px, -1px); }
}

/* Classified Panel */
.classified-panel {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(34, 211, 238, 0.05) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.classified-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 10px,
        rgba(139, 92, 246, 0.03) 10px,
        rgba(139, 92, 246, 0.03) 20px
    );
}

.classified-stamp {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
    color: #ef4444;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    transform: rotate(5deg);
    letter-spacing: 2px;
}

.classified-input {
    width: 100%;
    max-width: 400px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s;
}

.classified-input:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
}

.classified-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Scan Button */
.scan-button {
    display: block;
    margin: 1.5rem auto 0;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    animation: pulse-glow 2s ease-in-out infinite;
}

.scan-button:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
}

.scan-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    animation: none;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(168, 85, 247, 0.4); }
    50% { box-shadow: 0 0 25px rgba(168, 85, 247, 0.6); }
}

/* Radar Animation */
.radar-container {
    width: 200px;
    height: 200px;
    margin: 2rem auto;
    position: relative;
}

.radar-circle {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(34, 211, 238, 0.3);
    border-radius: 50%;
    animation: radar-expand 2s ease-out infinite;
}

.radar-circle.delay-1 { animation-delay: 0.5s; }
.radar-circle.delay-2 { animation-delay: 1s; }

@keyframes radar-expand {
    0% { transform: scale(0.3); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

.radar-sweep {
    position: absolute;
    inset: 0;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(34, 211, 238, 0.4) 30deg, transparent 60deg);
    border-radius: 50%;
    animation: radar-spin 2s linear infinite;
}

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

.scan-animation-container {
    padding: 2rem 0;
}

/* Results Panel */
.results-panel {
    background: linear-gradient(135deg, rgba(15, 15, 25, 0.9) 0%, rgba(25, 15, 35, 0.9) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 2rem;
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out;
}

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

/* Threat Meter */
.threat-meter-container {
    max-width: 400px;
    margin: 0 auto;
}

.threat-meter-track {
    height: 20px;
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.threat-meter-fill {
    height: 100%;
    transition: width 1s ease-out;
    box-shadow: 0 0 20px currentColor;
}

/* Evidence Card */
.evidence-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s;
}

.evidence-card:hover {
    border-color: rgba(34, 211, 238, 0.5);
    transform: translateY(-2px);
}

/* Test Tweet Panel */
.test-tweet-panel {
    background: rgba(15, 15, 25, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
}

/* Stats Panel */
.stats-panel {
    background: rgba(15, 15, 25, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

/* Conspiracy Board */
.conspiracy-board-section {
    margin-top: 2rem;
}

.conspiracy-board {
    background: 
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h40v40H0V0zm1 1h38v38H1V1z' fill='%23333' fill-opacity='0.1'/%3E%3C/svg%3E"),
        linear-gradient(135deg, #1a1510 0%, #151520 100%);
    border: 3px solid #3d2817;
    border-radius: 8px;
    min-height: 300px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.sticky-note {
    position: absolute;
    width: 120px;
    min-height: 60px;
    background: linear-gradient(135deg, #fef08a 0%, #fde047 100%);
    color: #1a1a1a;
    padding: 8px;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    cursor: grab;
    transform: rotate(-2deg);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 10;
    user-select: none;
}

.sticky-note:nth-child(even) {
    transform: rotate(2deg);
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
}

.sticky-note:nth-child(3n) {
    transform: rotate(-1deg);
    background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%);
}

.sticky-note:hover {
    transform: scale(1.05) rotate(0deg);
    box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 20;
}

.sticky-note.dragging {
    cursor: grabbing;
    z-index: 30;
}

.sticky-note.connecting {
    box-shadow: 0 0 20px #ef4444;
}

.string-connection {
    filter: drop-shadow(0 0 2px rgba(239, 68, 68, 0.5));
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .classified-panel {
        padding: 1.5rem 1rem;
    }
    
    .classified-input {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
    
    .scan-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .radar-container {
        width: 150px;
        height: 150px;
    }
    
    .results-panel {
        padding: 1.5rem 1rem;
    }
    
    .conspiracy-board {
        min-height: 250px;
    }
    
    .sticky-note {
        width: 100px;
        font-size: 10px;
    }
}

/* CRT Flicker Effect */
@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.98; }
    51% { opacity: 1; }
    52% { opacity: 0.97; }
}

body {
    animation: flicker 0.15s infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}