*{box-sizing:border-box;margin:0;padding:0;}
::selection{background:#00ff00;color:#000;}
::-moz-selection{background:#00ff00;color:#000;}

body, html {
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #00ff00;
    font-family: 'Share Tech Mono', monospace;
    overflow-x: hidden;
}

.monitor {
    width: 100vw;
    height: 100vh;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
}

.screen {
    width: 100%;
    max-width: 1000px;
    height: 90vh;
    border-radius: 20px;
    border: 2px solid #222;
    background-color: #0a110a;
    box-shadow: 0 0 10px rgba(0,255,0,0.2), inset 0 0 50px rgba(0,0,0,1);
    position: relative;
    overflow: hidden;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

/* CRT EFFECTS */
.crt-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, rgba(0,255,0,0.03) 0%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
    z-index: 10;
}
.scanlines {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%;
    z-index: 11;
    pointer-events: none;
}

@keyframes flicker {
    0% { opacity: 0.95; }
    5% { opacity: 0.8; }
    10% { opacity: 0.95; }
    100% { opacity: 1; }
}
.screen {
    animation: flicker 4s infinite alternate;
}

/* TERMINAL COMPONENTS */
.term-nav {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    border-bottom: 2px solid #00ff00;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-shadow: 0 0 5px #00ff00;
}

.nav-back {
    color: #00ff00;
    text-decoration: none;
    cursor: pointer;
}
.nav-back:hover {
    background: #00ff00;
    color: #000;
}

.term-header {
    text-align: center;
    margin-bottom: 30px;
}
.term-header pre {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.2;
    text-shadow: 0 0 2px #00ff00;
    margin-bottom: 10px;
    white-space: pre-wrap;
}
.term-header h1 {
    font-family: 'VT323', monospace;
    font-size: 2.5rem;
    letter-spacing: 2px;
    text-shadow: 0 0 8px #00ff00;
    margin-bottom: 5px;
}
.divider {
    color: #00ff00;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0.7;
    margin: 10px 0;
}

/* MAIN CONTENT */
.term-main {
    flex: 1;
    overflow-y: auto;
    padding-right: 15px;
    z-index: 12;
    position: relative;
    /* Custom Scrollbar for Terminal */
    scrollbar-width: thin;
    scrollbar-color: #00ff00 #0a110a;
}
.term-main::-webkit-scrollbar { width: 8px; }
.term-main::-webkit-scrollbar-track { background: #0a110a; border-left: 1px solid #1a331a; }
.term-main::-webkit-scrollbar-thumb { background: #00ff00; }

h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    text-shadow: 0 0 5px #00ff00;
    border-bottom: 1px dashed rgba(0,255,0,0.3);
    padding-bottom: 5px;
}

.help-text {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

/* GRIDS AND STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}
.stat-box {
    border: 1px solid #00ff00;
    padding: 10px;
    background: rgba(0,255,0,0.05);
}
.stat-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 5px;
}
.stat-val {
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 0 0 5px #00ff00;
}
.text-alert {
    color: #ffff00;
    text-shadow: 0 0 5px #ffff00;
}

/* INPUTS */
.presets {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.preset-btn {
    background: transparent;
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 5px 10px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
}
.preset-btn:hover, .preset-btn.active {
    background: #00ff00;
    color: #000;
}

.term-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}
@media (max-width: 600px) {
    .term-form { grid-template-columns: 1fr; }
}

.input-group {
    display: flex;
    flex-direction: column;
}
.input-group label {
    font-size: 0.9rem;
    margin-bottom: 5px;
}
.input-row {
    display: flex;
    gap: 10px;
}
input[type="number"], select {
    background: transparent;
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 8px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    width: 100%;
}
input[type="number"]:focus, select:focus {
    background: rgba(0,255,0,0.1);
    box-shadow: 0 0 8px rgba(0,255,0,0.5);
}
.input-row input { flex: 2; }
.input-row select { flex: 1; min-width: 80px; }

/* TABLE */
.term-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    text-align: right;
}
.term-table th {
    text-align: right;
    border-bottom: 1px solid #00ff00;
    padding: 10px 5px;
    font-weight: normal;
    opacity: 0.7;
}
.term-table th:first-child, .term-table td:first-child { text-align: left; }
.term-table td {
    padding: 10px 5px;
    border-bottom: 1px dotted rgba(0,255,0,0.2);
}
.term-table tr:hover {
    background: rgba(0,255,0,0.1);
}

.term-note {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 20px;
}
.blink {
    animation: blinker 1s step-end infinite;
}
@keyframes blinker {
    50% { opacity: 0; }
}
