/* SECTION: TERMINAL_THEME_CORE */
/* AS400/IBM Green Screen Retro Styling */

@font-face {
    font-family: 'IBM Terminal';
    src: url('fonts/Web437_IBM_BIOS.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0a0a0a;
    font-family: 'IBM Terminal', 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.4;
    color: #33ff33;
    text-shadow: 0 0 5px rgba(51, 255, 51, 0.3);
    padding: 20px;
    min-height: 100vh;
}

/* SECTION: SCANLINE_EFFECT */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
    animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 10px; }
}

/* SECTION: TERMINAL_CONTAINER */
.terminal-container {
    max-width: 1200px;
    margin: 0 auto;
    border: 2px solid #33ff33;
    padding: 20px;
    position: relative;
    box-shadow: 0 0 20px rgba(51, 255, 51, 0.2);
}

/* SECTION: SCREEN_HEADER */
.screen-header {
    border-bottom: 1px solid #33ff33;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
}

.system-title {
    font-weight: bold;
    letter-spacing: 2px;
}

.system-date {
    color: #33ff33;
}

/* SECTION: INPUT_FORMS */
.terminal-form {
    margin: 20px 0;
    border: 1px solid #33ff33;
    padding: 20px;
}

.form-row {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.form-label {
    width: 150px;
    text-transform: uppercase;
    font-weight: bold;
}

.form-label::after {
    content: ":";
}

.terminal-input {
    background-color: transparent;
    border: 1px solid #33ff33;
    color: #33ff33;
    font-family: 'IBM Terminal', 'Courier New', monospace;
    font-size: 16px;
    padding: 5px 10px;
    width: 300px;
    outline: none;
}

.terminal-input:focus {
    background-color: #33ff33;
    color: #0a0a0a;
    text-shadow: none;
}

/* SECTION: BUTTONS */
.terminal-button {
    background-color: transparent;
    border: 1px solid #33ff33;
    color: #33ff33;
    font-family: 'IBM Terminal', 'Courier New', monospace;
    font-size: 16px;
    padding: 8px 20px;
    cursor: pointer;
    text-transform: uppercase;
    margin-right: 10px;
}

.terminal-button:hover {
    background-color: #33ff33;
    color: #0a0a0a;
}

.terminal-button:active {
    transform: translateY(1px);
}

/* SECTION: FUNCTION_KEYS */
.function-keys {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #0a0a0a;
    border-top: 2px solid #33ff33;
    padding: 10px 20px;
    display: flex;
    justify-content: space-around;
    font-family: 'IBM Terminal', monospace;
}

.fkey {
    color: #33ff33;
}

.fkey::before {
    content: "[";
}

.fkey::after {
    content: "]";
}

.fkey span {
    font-weight: bold;
    margin: 0 5px;
}

/* SECTION: TABLES */
.terminal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.terminal-table th {
    border-bottom: 2px solid #33ff33;
    border-top: 1px solid #33ff33;
    padding: 10px;
    text-align: left;
    text-transform: uppercase;
}

.terminal-table td {
    border-bottom: 1px dashed #33ff33;
    padding: 8px 10px;
}

.terminal-table tr:hover {
    background-color: rgba(51, 255, 51, 0.1);
}

/* SECTION: STATUS_MESSAGES */
.status-line {
    margin: 20px 0;
    padding: 10px;
    border: 1px solid #33ff33;
    background-color: rgba(51, 255, 51, 0.1);
}

.error-message {
    color: #ff3333;
    border-color: #ff3333;
}

.success-message {
    color: #33ff33;
}

/* SECTION: BLINKING_CURSOR */
.cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background-color: #33ff33;
    animation: blink 1s infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* SECTION: AMBER_ALTERNATIVE */
body.amber-theme {
    color: #ffb000;
    text-shadow: 0 0 5px rgba(255, 176, 0, 0.3);
}

body.amber-theme .terminal-container,
body.amber-theme .terminal-form,
body.amber-theme .terminal-input,
body.amber-theme .terminal-button,
body.amber-theme .function-keys {
    border-color: #ffb000;
}

body.amber-theme .terminal-input:focus {
    background-color: #ffb000;
    color: #0a0a0a;
}

/* SECTION: RESPONSIVE_DESIGN */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        padding: 10px;
    }
    
    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-label {
        width: auto;
        margin-bottom: 5px;
    }
    
    .terminal-input {
        width: 100%;
    }
    
    .function-keys {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .fkey {
        margin: 5px;
    }
}
