:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --accent-red: #ff0040;
    --accent-green: #00ff40;
    --text-primary: #ffffff;
    --text-secondary: #8a8a8a;
    --border-color: #333;
    --glow-color: rgba(255, 0, 64, 0.5);
}

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

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    z-index: 1;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.03) 0px,
            transparent 1px,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 3px
        );
    animation: noise 0.2s infinite;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 2px,
        rgba(255, 255, 255, 0.03) 4px
    );
    z-index: 2;
    pointer-events: none;
    animation: scanlines 8s linear infinite;
}

@keyframes noise {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-1px, -1px); }
    20% { transform: translate(1px, 1px); }
    30% { transform: translate(-1px, 1px); }
    40% { transform: translate(1px, -1px); }
    50% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    70% { transform: translate(-1px, 1px); }
    80% { transform: translate(1px, -1px); }
    90% { transform: translate(-1px, -1px); }
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 5;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.title:hover {
    opacity: 0.8;
}

.glitch {
    position: relative;
    color: var(--text-primary);
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

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

.glitch::before {
    animation: glitch-1 0.5s infinite linear alternate-reverse;
    color: var(--accent-red);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite linear alternate-reverse;
    color: var(--accent-green);
    z-index: -2;
}

@keyframes glitch-1 {
    0% { clip-path: inset(40% 0 61% 0); transform: translate(-2px, 2px); }
    20% { clip-path: inset(92% 0 1% 0); transform: translate(2px, -2px); }
    40% { clip-path: inset(43% 0 1% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(25% 0 58% 0); transform: translate(2px, -2px); }
    80% { clip-path: inset(54% 0 7% 0); transform: translate(-2px, 2px); }
    100% { clip-path: inset(58% 0 43% 0); transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(65% 0 8% 0); transform: translate(2px, -2px); }
    20% { clip-path: inset(13% 0 48% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(1% 0 16% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(75% 0 16% 0); transform: translate(-2px, 2px); }
    80% { clip-path: inset(45% 0 30% 0); transform: translate(2px, -2px); }
    100% { clip-path: inset(30% 0 8% 0); transform: translate(-2px, 2px); }
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    10% { transform: skew(-2deg); }
    20% { transform: skew(0deg); }
    30% { transform: skew(1deg); }
    40% { transform: skew(0deg); }
    50% { transform: skew(-1deg); }
    60% { transform: skew(0deg); }
    70% { transform: skew(2deg); }
    80% { transform: skew(0deg); }
    90% { transform: skew(-1deg); }
    100% { transform: skew(0deg); }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
}

.stream-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 40px var(--glow-color);
    margin-bottom: 2rem;
}

.video-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
}

#stream-frame {
    width: 100%;
    height: 100%;
    pointer-events: all;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    background: linear-gradient(
        135deg,
        rgba(255, 0, 64, 0.1) 0%,
        transparent 50%,
        rgba(0, 255, 64, 0.1) 100%
    );
    pointer-events: none;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background: var(--accent-red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
    100% { opacity: 1; transform: scale(1); }
}

.frequency-display {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-green);
    text-shadow: 0 0 10px var(--accent-green);
}

.broadcast-badge {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 0, 64, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    animation: pulse 2s infinite;
}

.info-panel {
    margin: 3rem 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: var(--accent-red);
    box-shadow: 0 0 30px rgba(255, 0, 64, 0.2);
    transform: translateY(-2px);
}

.info-card h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent-red);
}

.info-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

#activity-log {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.log-entry {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.log-entry:last-child {
    border-bottom: none;
}

.footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-red);
}

.chat-button {
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent-red);
    color: var(--text-primary);
    border: none;
    border-radius: 25px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.5);
}

.chat-button:hover {
    background: #ff1a5c;
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 0, 64, 0.7);
}

.chat-icon {
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}