/* ==========================================================================
   IONIC TERMINAL THEME & INTERFACE STYLING
   ========================================================================== */

/* Zero out defaults and set up the foundation */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
}

body {
    background-color: #030708;
    color: #00ff66;
    overflow-x: hidden;
    padding: 20px;
}

/* 🛰️ Cryptographic Morse & Satellite Background Wrapper */
.terminal-bg-container {
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    border: 1px solid #005522;
    border-radius: 8px;
    
/* Version 1: */
    /* Layer 1: Subtle dark overlay gradient for high readability */
    /* Layer 2: Your upcoming satellite grid & electric line image asset */
    background: 
        linear-gradient(rgba(3, 7, 8, 0.85), rgba(3, 7, 8, 0.93)), 
        url('../images/satellite.jpg') no-repeat center center fixed;
    background-size: cover;
    box-shadow: inset 0 0 50px rgba(0, 255, 102, 0.1);

/* Version 2: */
   /* Generates a dark matrix-green grid pattern using mathematical gradients */
    background-color: #020604;
    background-image: 
        linear-gradient(rgba(0, 255, 102, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 102, 0.03) 1px, transparent 1px),
        /* Intersecting horizontal electrical cable lines */
        linear-gradient(transparent 45%, rgba(0, 85, 34, 0.2) 46%, rgba(0, 85, 34, 0.2) 48%, transparent 49%);
    background-size: 40px 40px, 40px 40px, 100% 200px;
    
    box-shadow: inset 0 0 50px rgba(0, 255, 102, 0.08);
}

/* Header UI Layout */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px double #00ff66;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

h1 {
    font-size: 1.6rem;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(0, 255, 102, 0.6);
}

.subtitle {
    color: #00aa44;
    font-size: 0.9rem;
    margin-top: 5px;
    text-transform: uppercase;
}

/* 🕹️ Audio Control Panel & Custom Corners Feature */
/* ==========================================================================
   SOUND SPECTRUM WAVEFORM VISUALIZER STYLING
   ========================================================================== */
.audio-control-panel {
    display: flex;
    align-items: center;
    gap: 12px; /* Adds clean spacing between button and wave container */
}

.audio-wave-container {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    width: 35px;
    height: 20px;
}

/* Base style for individual graphic spectrum bars */
.wave-bar {
    width: 4px;
    height: 4px; /* Default static height when paused or muted */
    background-color: #00ff66;
    box-shadow: 0 0 5px rgba(0, 255, 102, 0.5);
    border-radius: 1px;
    transition: height 0.2s ease;
}

/* 🟢 When the '.playing' class is active, trigger independent looping animations */
.audio-wave-container.playing .bar-1 { animation: spectrumJump 0.6s infinite ease-in-out alternate; }
.audio-wave-container.playing .bar-2 { animation: spectrumJump 0.4s infinite ease-in-out alternate 0.1s; }
.audio-wave-container.playing .bar-3 { animation: spectrumJump 0.7s infinite ease-in-out alternate 0.2s; }
.audio-wave-container.playing .bar-4 { animation: spectrumJump 0.5s infinite ease-in-out alternate 0.15s; }
.audio-wave-container.playing .bar-5 { animation: spectrumJump 0.8s infinite ease-in-out alternate 0.05s; }

/* Mathematical keyframes to fluctuate bar height values */
@keyframes spectrumJump {
    0% { height: 4px; }
    100% { height: 20px; }
}


/* Sharp, tactical corner styling utilizing the modern CSS clip-path feature */
.css-corner-btn {
    background: #00220a;
    color: #00ff66;
    border: 1px solid #00ff66;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s ease-in-out;
    
    /* This cuts the top-right and bottom-left corners geometrically */
    clip-path: polygon(0% 0%, 85% 0%, 100% 25%, 100% 100%, 15% 100%, 0% 75%);
}

.css-corner-btn:hover {
    background: #00ff66;
    color: #030708;
    box-shadow: 0 0 12px rgba(0, 255, 102, 0.5);
}

/* Dashboard Grid Layout (3 Column Framework) */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1.4fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Tactical Panel Shells */
.panel {
    background: rgba(4, 12, 8, 0.75);
    border: 1px solid #005522;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.panel h2 {
    font-size: 1rem;
    border-bottom: 1px solid #005522;
    padding-bottom: 8px;
    margin-bottom: 15px;
    letter-spacing: 1px;
    color: #88ffaa;
}

/* Input Forms & Containers */
.input-scroll-container {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom Scrollbar for Terminal Viewport */
.input-scroll-container::-webkit-scrollbar {
    width: 6px;
}
.input-scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 34, 10, 0.2);
}
.input-scroll-container::-webkit-scrollbar-thumb {
    background: #005522;
    border-radius: 3px;
}

.form-group-row {
    background: rgba(0, 34, 10, 0.2);
    border: 1px dashed #003311;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.form-group-row h3 {
    font-size: 0.85rem;
    color: #00ff66;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    background: #020b05;
    border: 1px solid #00441a;
    color: #ffffff;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 0.8rem;
    border-radius: 2px;
}

.form-input:focus {
    outline: none;
    border-color: #00ff66;
    background: #04170a;
}

.form-input::placeholder {
    color: #00441a;
}

/* Execute Radar Button Placement */
.run-btn {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    font-size: 1rem;
    /* Altered polygon cut for the primary execution asset */
    clip-path: polygon(0% 0%, 92% 0%, 100% 35%, 100% 100%, 8% 100%, 0% 65%);
}

/* Radar Plot Canvas Display Viewport */
.plot-panel {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
}

#radar-plot-container {
    flex-grow: 1;
    background: #010502;
    border: 1px solid #003311;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    position: relative;
}

.radar-placeholder {
    color: #00441a;
    font-size: 1.1rem;
    letter-spacing: 3px;
    animation: pulse 2s infinite ease-in-out;
}

/* Layout panel for the canvas image exporter and loading system */
.canvas-control-bar {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
}

.util-btn {
    flex: 1;
    padding: 10px;
    font-size: 0.8rem;
    background: #011105;
    /* Altered geometric angle cut for utility buttons */
    clip-path: polygon(0% 0%, 90% 0%, 100% 30%, 100% 100%, 10% 100%, 0% 70%);
}

/* Pulse animation for data-stream placeholder text */
@keyframes pulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.8; }
    100% { opacity: 0.3; }
}
