:root {
    --bg-color: #000000;
    --matrix-green: #00FF41;
    --axiom-cyan: #00F3FF;
    --breach-red: #FF0033;
    --font-mono: 'Courier New', Courier, monospace;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--matrix-green);
    font-family: var(--font-mono);
    overflow-x: hidden;
}

#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
    background: linear-gradient(rgba(0, 255, 65, 0.1) 1px, transparent 1px) 0 0 / 20px 20px;
}

header {
    padding: 1rem;
    border-bottom: 1px solid var(--matrix-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
}

.logo {
    font-weight: bold;
    letter-spacing: 2px;
}

.controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

button {
    background: transparent;
    border: 1px solid var(--matrix-green);
    color: var(--matrix-green);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: var(--font-mono);
    transition: all 0.3s;
}

button:hover {
    background: var(--matrix-green);
    color: #000;
}

#dna-status {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.status-ok {
    color: var(--axiom-cyan);
    border: 1px solid var(--axiom-cyan);
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

#welcome-screen {
    text-align: center;
    padding-top: 5vh;
}

h1 {
    font-size: 2.5rem;
    text-transform: uppercase;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px var(--matrix-green);
}

p {
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

.hidden { display: none !important; }

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.mobile-tabs {
    display: none;
    margin-bottom: 1rem;
}

.victim-app, .terminal, .causal-log {
    border: 1px solid var(--matrix-green);
    padding: 1rem 1rem 1.5rem 1rem;
    height: 400px;
    background: rgba(0, 20, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow-wrap: break-word;
    word-break: break-all;
}

#causal-oscilloscope {
    width: 100%;
    height: 60px;
    background: #000;
    border-bottom: 1px solid var(--matrix-green);
    margin-bottom: 0.5rem;
}

.demo-controls {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
}

.special-btn {
    border-color: var(--axiom-cyan);
    color: var(--axiom-cyan);
    font-weight: bold;
    box-shadow: 0 0 5px var(--axiom-cyan);
}

.special-btn:hover {
    background: var(--axiom-cyan);
    color: #000;
    box-shadow: 0 0 15px var(--axiom-cyan);
}

#log-stream {
    flex-grow: 1;
    overflow-y: auto;
    font-size: 0.8rem;
}

textarea, input {
    outline: none;
}

textarea {
    width: 100%;
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-mono);
    resize: none;
    padding: 1rem;
}

#terminal-output {
    flex-grow: 1;
    overflow-y: auto;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.input-line {
    display: flex;
    gap: 0.5rem;
}

#hacker-input {
    background: transparent;
    border: none;
    color: var(--axiom-cyan);
    font-family: var(--font-mono);
    width: 100%;
    outline: none;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 0.5rem;
        text-align: center;
    }

    .logo {
        font-size: 0.9rem;
    }

    .controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .controls button {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    #dna-status {
        display: none; /* Hide DNA status on small screens to save space */
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .mobile-tabs {
        display: flex;
        width: 100%;
    }

    .mobile-tabs button {
        flex: 1;
        font-size: 0.7rem;
    }

    .tab-content {
        display: none;
    }

    .tab-content.active {
        display: flex;
    }

    h1 { font-size: 1.5rem; }
}

#apoptosis-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #001400;
    border: 1px solid var(--matrix-green);
    padding: 2rem;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 20px var(--matrix-green);
}

.close {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    color: var(--matrix-green);
    font-size: 2rem;
    cursor: pointer;
}

.guide-section {
    margin-bottom: 2rem;
}

.guide-section h2 {
    color: var(--axiom-cyan);
    font-size: 1.2rem;
    border-bottom: 1px solid var(--axiom-cyan);
    padding-bottom: 0.5rem;
}

.guide-section ul {
    list-style-type: square;
}

/* Drone Simulation Styles */
.drone-simulation {
    margin-top: 1rem;
    border-top: 1px solid var(--matrix-green);
    padding-top: 0.5rem;
}

#drone-map {
    height: 150px;
    background: #000;
    border: 1px dashed var(--matrix-green);
    position: relative;
    overflow: hidden;
    margin: 0.5rem 0;
}

#drone-icon {
    position: absolute;
    left: 10%;
    top: 10%;
    font-size: 1.5rem;
    transition: all 1s ease-in-out;
}

#target-base {
    position: absolute;
    right: 10%;
    bottom: 10%;
    font-size: 1.5rem;
    opacity: 0.5;
}

#telemetry-data {
    font-size: 0.7rem;
    color: var(--axiom-cyan);
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.breach {
    color: var(--breach-red);
    font-weight: bold;
    animation: blink 0.5s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #333;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--matrix-green);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--matrix-green);
}

input:checked + .slider:before {
  -webkit-transform: translateX(20px);
  -ms-transform: translateX(20px);
  transform: translateX(20px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Footer Styles */
#main-footer {
    padding: 1rem;
    border-top: 1px solid var(--matrix-green);
    background: rgba(0, 0, 0, 0.9);
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.footer-content a {
    color: var(--axiom-cyan);
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

#contact-message {
    width: 100%;
    height: 150px;
    background: #000;
    border: 1px solid var(--matrix-green);
    color: var(--matrix-green);
    font-family: var(--font-mono);
    padding: 0.5rem;
    margin-bottom: 1rem;
    resize: none;
}

@keyframes glitch {
    0% { transform: translate(2px, 2px); }
    50% { transform: translate(-2px, -2px); }
    100% { transform: translate(2px, 2px); }
}
