/* Global Styles */
html, body {
    height: 100%;
}

body {
    background-color: #1a202c;
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
}

.container {
    flex-grow: 1;
}

/* Header */
.navbar {
    background-color: #2d3748;
    border-bottom: 1px solid #4a5568;
    padding: 0.5rem 1rem;
}

.navbar-brand, .nav-link {
    color: #e2e8f0 !important;
    font-size: 0.9rem;
}

.navbar-brand:hover, .nav-link:hover {
    color: #63b3ed !important;
}

/* GCHQ Branding */
.gchq-header {
    text-align: center;
    font-size: 24px;
    color: #63b3ed;
    border-bottom: 1px solid #4a5568;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Secure Comms Panel */
.secure-comms-panel {
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.secure-comms-panel h2 {
    color: #63b3ed;
    border-bottom: 1px solid #4a5568;
    padding-bottom: 10px;
}

/* Terminal Window */
.terminal-window {
    background-color: #000;
    border: 1px solid #4a5568;
    border-radius: 8px;
    padding: 20px;
    font-family: 'Roboto Mono', monospace;
    height: 300px;
    overflow-y: scroll;
    color: #00ff00;
}

/* Dark Syndicate Takeover */
.darksyndicate-takeover {
    background-color: #000;
    color: #ff0000;
    height: 100%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    animation: glitch-shake 1s infinite;
}

.glitch {
    font-size: 5rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0.05em 0 0 #00ff00, -0.025em -0.05em 0 #ff00ff, 0.025em 0.05em 0 #00ffff;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    clip: rect(0, 900px, 0, 0);
}

.glitch::before {
    left: -2px;
    text-shadow: -2px 0 #ff00ff;
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: 2px;
    text-shadow: -2px 0 #00ffff;
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(42px, 9999px, 44px, 0); }
    5% { clip: rect(17px, 9999px, 94px, 0); }
    10% { clip: rect(89px, 9999px, 98px, 0); }
    15% { clip: rect(84px, 9999px, 1px, 0); }
    20% { clip: rect(43px, 9999px, 9px, 0); }
    25% { clip: rect(5px, 9999px, 83px, 0); }
    30% { clip: rect(4px, 9999px, 54px, 0); }
    35% { clip: rect(73px, 9999px, 5px, 0); }
    40% { clip: rect(26px, 9999px, 85px, 0); }
    45% { clip: rect(3px, 9999px, 62px, 0); }
    50% { clip: rect(67px, 9999px, 7px, 0); }
    55% { clip: rect(2px, 9999px, 75px, 0); }
    60% { clip: rect(98px, 9999px, 4px, 0); }
    65% { clip: rect(23px, 9999px, 99px, 0); }
    70% { clip: rect(35px, 9999px, 23px, 0); }
    75% { clip: rect(23px, 9999px, 8px, 0); }
    80% { clip: rect(9px, 9999px, 32px, 0); }
    85% { clip: rect(4px, 9999px, 7px, 0); }
    90% { clip: rect(32px, 9999px, 98px, 0); }
    95% { clip: rect(43px, 9999px, 12px, 0); }
    100% { clip: rect(4px, 9999px, 9px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(82px, 9999px, 95px, 0); }
    5% { clip: rect(42px, 9999px, 100px, 0); }
    10% { clip: rect(2px, 9999px, 85px, 0); }
    15% { clip: rect(92px, 9999px, 3px, 0); }
    20% { clip: rect(32px, 9999px, 92px, 0); }
    25% { clip: rect(23px, 9999px, 1px, 0); }
    30% { clip: rect(12px, 9999px, 54px, 0); }
    35% { clip: rect(83px, 9999px, 5px, 0); }
    40% { clip: rect(32px, 9999px, 8px, 0); }
    45% { clip: rect(13px, 9999px, 6px, 0); }
    50% { clip: rect(7px, 9999px, 7px, 0); }
    55% { clip: rect(22px, 9999px, 7px, 0); }
    60% { clip: rect(8px, 9999px, 44px, 0); }
    65% { clip: rect(3px, 9999px, 9px, 0); }
    70% { clip: rect(5px, 9999px, 2px, 0); }
    75% { clip: rect(3px, 9999px, 8px, 0); }
    80% { clip: rect(9px, 9999px, 3px, 0); }
    85% { clip: rect(4px, 9999px, 7px, 0); }
    90% { clip: rect(2px, 9999px, 9px, 0); }
    95% { clip: rect(3px, 9999px, 1px, 0); }
    100% { clip: rect(4px, 9999px, 9px, 0); }
}

@keyframes glitch-shake {
    0% { transform: translate(0); }
    25% { transform: translate(4px, 4px); }
    50% { transform: translate(-4px, -4px); }
    75% { transform: translate(4px, -4px); }
    100% { transform: translate(-4px, 4px); }
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0px,
        rgba(255, 255, 255, 0.05) 1px,
        rgba(0, 0, 0, 0) 2px
    );
    animation: scanlines-anim 2s infinite;
}

@keyframes scanlines-anim {
    0% { top: 0; }
    100% { top: 100%; }
}

/* Forms */
.form-control {
    background-color: #1a202c;
    color: #e2e8f0;
    border: 1px solid #4a5568;
    border-radius: 4px;
}

.btn-primary {
    background-color: #63b3ed;
    color: #1a202c;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
}

.btn-primary:hover {
    background-color: #4299e1;
}

.btn-hint {
    background-color: #4a5568;
    color: #e2e8f0;
    border: 1px solid #63b3ed;
}

.btn-hint:hover {
    background-color: #2d3748;
}

/* Links */
a {
    color: #63b3ed;
}

a:hover {
    color: #4299e1;
}

/* Tables */
table, th, td {
    color: #e2e8f0 !important;
}

/* Footer */
.footer {
    background-color: #2d3748;
    border-top: 1px solid #4a5568;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    height: 20px;
}