/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
}

body {
    background-color: #000;
    color: #0ff0a0;
    overflow: hidden;
    height: 100vh;
}

/* CRT Effect */
.crt-effect {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 20px;
}

.crt-effect::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(0, 255, 170, 0.06) 50%, rgba(0, 0, 0, 0.25) 50%),
                linear-gradient(90deg, rgba(0, 255, 170, 0.03), rgba(0, 0, 0, 0.1), rgba(0, 255, 170, 0.03));
    background-size: 100% 4px, 4px 100%;
    pointer-events: none;
    z-index: 100;
}

/* Particle background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: #000;
}

/* Terminal container */
.terminal-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-shadow: 0 0 5px rgba(0, 255, 170, 0.7);
    max-width: 1400px;
    margin: 0 auto;
}

/* Header styles */
.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #0ff0a0;
    margin-bottom: 15px;
}

.title {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #0ff0a0;
    box-shadow: 0 0 10px #0ff0a0;
}

.status-indicator.active {
    animation: pulse 1.5s infinite;
}

.ip-address {
    color: #0ff0a0;
    font-family: 'Courier New', monospace;
}

.signal-strength {
    display: flex;
    align-items: center;
    gap: 2px;
}

.signal-strength .bar {
    width: 4px;
    background-color: #0ff0a0;
    animation: signalBars 2s infinite ease-in-out;
}

.signal-strength .bar:nth-child(1) { height: 8px; animation-delay: 0.1s; }
.signal-strength .bar:nth-child(2) { height: 12px; animation-delay: 0.2s; }
.signal-strength .bar:nth-child(3) { height: 16px; animation-delay: 0.3s; }
.signal-strength .bar:nth-child(4) { height: 20px; animation-delay: 0.4s; }
.signal-strength .bar:nth-child(5) { height: 24px; animation-delay: 0.5s; }

/* HUD elements */
.hud {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 0 10px;
}

.hud-element {
    width: 30%;
}

.hud-label {
    font-size: 0.8rem;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.hud-bar {
    height: 8px;
    border: 1px solid #0ff0a0;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.hud-progress {
    height: 100%;
    background-color: #0ff0a0;
    box-shadow: 0 0 10px #0ff0a0;
    animation: hudPulse 2s infinite;
}

/* Stream grid layout */
.stream-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    height: 70vh;
    margin: 0 auto;
    width: 95%;
}

.stream-container {
    border: 1px solid #0ff0a0;
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.3);
    display: flex;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.7);
    height: 100%;
}

.stream-label {
    padding: 8px 15px;
    background-color: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid #0ff0a0;
    font-weight: bold;
    letter-spacing: 1px;
}

.stream-wrapper {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Aspect ratio keeper for 16:9 videos */
.aspect-ratio-keeper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.aspect-ratio-keeper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.stream-info {
    display: flex;
    justify-content: space-between;
    padding: 8px 15px;
    background-color: rgba(0, 0, 0, 0.8);
    border-top: 1px solid #0ff0a0;
    font-size: 0.8rem;
}

/* Footer styles */
.terminal-footer {
    margin-top: 20px;
    border-top: 1px solid #0ff0a0;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
}

.system-log {
    width: 70%;
}

.log-title {
    font-weight: bold;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.log-content {
    height: 80px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.4;
    padding-right: 10px;
    font-family: 'Courier New', monospace;
}

.log-content::-webkit-scrollbar {
    width: 5px;
}

.log-content::-webkit-scrollbar-thumb {
    background-color: #0ff0a0;
    border-radius: 3px;
}

.time-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 1.2rem;
}

/* Glowing text effect */
.glow {
    animation: glow 1.5s ease-in-out infinite alternate;
    text-shadow: 0 0 5px #0ff0a0;
}

/* Flicker effect */
.flicker {
    animation: flicker 8s infinite;
}

/* Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

@keyframes flicker {
    0% { opacity: 0.95; box-shadow: 0 0 10px rgba(0, 255, 170, 0.3); }
    2% { opacity: 0.9; box-shadow: 0 0 8px rgba(0, 255, 170, 0.2); }
    4% { opacity: 1; box-shadow: 0 0 15px rgba(0, 255, 170, 0.4); }
    8% { opacity: 0.85; box-shadow: 0 0 5px rgba(0, 255, 170, 0.1); }
    10% { opacity: 1; box-shadow: 0 0 15px rgba(0, 255, 170, 0.5); }
    100% { opacity: 1; box-shadow: 0 0 15px rgba(0, 255, 170, 0.3); }
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px #0ff0a0, 0 0 10px #0ff0a0;
    }
    to {
        text-shadow: 0 0 10px #0ff0a0, 0 0 20px #0ff0a0, 0 0 30px #0ff0a0;
    }
}

@keyframes signalBars {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes hudPulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}