/* Custom Overrides for Tactical Display and Challenge Components */

/* Override theme container for specific layouts if needed */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* GLOBAL FULL SCREEN OVERRIDES */
.themed-container {
    max-width: 98% !important;
    width: 98% !important;
    margin: 10px auto !important;
    padding: 10px !important;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.panel {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
}

/* Ensure content area takes available space */
.content-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.viewport {
    padding: 1rem;
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
}


/* CARDS & PANELS */
.card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    color: var(--primary-blue);
    font-family: var(--font-head);
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

/* STATUS PAGE */
.status-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
}

.map-card {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
}

.tactical-map {
    flex-grow: 1;
    background:
        radial-gradient(circle, transparent 20%, #000 120%),
        repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(0, 240, 255, 0.1) 20px),
        repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(0, 240, 255, 0.1) 20px);
    border: 1px solid #222;
    position: relative;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.active-sector {
    border: 2px solid var(--primary-red);
    padding: 2rem;
    background: rgba(255, 42, 42, 0.1);
    color: var(--primary-red);
    font-weight: bold;
    box-shadow: 0 0 20px rgba(255, 42, 42, 0.4);
    animation: pulse 2s infinite;
}

.breach-point {
    position: absolute;
    top: 20%;
    right: 20%;
    background: var(--primary-red);
    color: #000;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: bold;
}

.sys-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dotted #333;
}

.sys-item.ok span:last-child {
    color: #00ff88;
}

.sys-item.warn span:last-child {
    color: orange;
}

.sys-item.critical span:last-child {
    color: var(--primary-red);
}

.alert-card {
    border-color: var(--primary-red);
}

.alert-display {
    font-family: var(--font-head);
    font-size: 2rem;
    color: var(--primary-red);
    text-align: center;
    margin: 1rem 0;
}

.highlight {
    color: var(--primary-blue);
    font-weight: bold;
}

/* COMMS PAGE */
.comms-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
}

.waveform-display {
    height: 100px;
    background: #000;
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.bar {
    width: 10px;
    background: var(--primary-blue);
    animation: wave 1s infinite;
}

.bar:nth-child(2n) {
    animation-duration: 1.2s;
    height: 40%;
}

.bar:nth-child(3n) {
    animation-duration: 0.8s;
    height: 60%;
}

@keyframes wave {

    0%,
    100% {
        height: 20%;
        opacity: 0.5;
    }

    50% {
        height: 80%;
        opacity: 1;
    }
}

.btn-action {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    background: rgba(0, 240, 255, 0.05);
}

.btn-action:hover {
    background: var(--primary-blue);
    color: #000;
    box-shadow: 0 0 20px var(--border-color);
}

.big-btn {
    font-size: 1.2rem;
    min-width: 300px;
}

/* DATABASE PAGE */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.login-card {
    background: #000;
    border: 2px solid var(--primary-red);
    padding: 3rem;
    width: 400px;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.2);
}

.login-header h2 {
    color: var(--primary-red);
    font-family: var(--font-head);
}

.login-header p {
    font-size: 0.8rem;
    color: #666;
    letter-spacing: 2px;
}

.lock-icon {
    font-size: 3rem;
    margin: 2rem 0;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    font-family: var(--font-mono);
    text-align: center;
    margin-top: 0.5rem;
    font-size: 1.2rem;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: var(--primary-red);
    border: none;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    font-family: var(--font-head);
}

.btn-submit:hover {
    background: #ff5555;
}

.access-denied {
    color: var(--primary-red);
    margin-top: 1rem;
    font-weight: bold;
    border: 1px solid var(--primary-red);
    padding: 0.5rem;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.blink {
    animation: blink 1s infinite;
}

@keyframes pulse {
    50% {
        border-color: transparent;
        box-shadow: none;
    }
}