/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00ff41;
    --primary-dim: #00aa2a;
    --background: #0a0e0f;
    --panel: #0d1117;
    --text: #00ff41;
    --text-dim: #006618;
    --error: #ff3333;
    --warning: #ffaa00;
    --glow: rgba(0, 255, 65, 0.4);
}

body {
    background: var(--background);
    color: var(--primary);
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scanline Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}

/* Terminal Container */
.terminal {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    position: relative;
}

/* Boot Sequence */
.boot-sequence {
    padding: 40px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#boot-text {
    white-space: pre-wrap;
    line-height: 1.6;
}

.boot-line {
    opacity: 0;
    animation: fadeIn 0.1s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Main Content */
.main-content {
    animation: fadeIn 0.5s ease-in;
}

.hidden {
    display: none !important;
}

/* Header */
.terminal-header {
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.header-line {
    color: var(--primary);
}

.header-title {
    color: var(--primary);
    text-shadow: 0 0 10px var(--glow);
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 15px;
    background: var(--panel);
    border: 1px solid var(--primary-dim);
    margin-bottom: 25px;
    font-size: 12px;
}

.status-item {
    color: var(--text-dim);
}

.status-online {
    color: var(--primary);
    text-shadow: 0 0 5px var(--glow);
}

/* Section Headers */
.section-header {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--primary-dim);
    text-shadow: 0 0 10px var(--glow);
}

/* Form Styles */
.form-section {
    background: var(--panel);
    border: 1px solid var(--primary-dim);
    padding: 25px;
    margin-bottom: 20px;
}

.form-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.terminal-label {
    color: var(--primary);
    font-size: 14px;
}

.terminal-input {
    background: var(--background);
    border: 1px solid var(--primary-dim);
    color: var(--primary);
    padding: 12px 15px;
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.terminal-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--glow);
}

.terminal-input::placeholder {
    color: var(--text-dim);
}

/* Select Styling */
.terminal-input option {
    background: var(--background);
    color: var(--primary);
}

/* Button */
.terminal-button {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 15px 40px;
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 10px;
    align-self: center;
}

.terminal-button:hover {
    background: var(--primary);
    color: var(--background);
    box-shadow: 0 0 20px var(--glow);
}

.terminal-button:active {
    transform: scale(0.98);
}

.terminal-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status Section */
.status-section {
    background: var(--panel);
    border: 1px solid var(--primary-dim);
    padding: 25px;
    margin-bottom: 20px;
}

.console-output {
    background: var(--background);
    border: 1px solid var(--primary-dim);
    padding: 15px;
    min-height: 150px;
    font-size: 14px;
    line-height: 1.8;
}

.console-output .line {
    opacity: 0;
    animation: fadeIn 0.1s forwards;
}

.console-output .success {
    color: var(--primary);
}

.console-output .error {
    color: var(--error);
}

.console-output .warning {
    color: var(--warning);
}

/* Confirmed Section */
.confirmed-section {
    text-align: center;
}

.confirmed-box {
    margin-bottom: 30px;
    font-size: 14px;
}

.confirmed-message {
    background: var(--panel);
    border: 1px solid var(--primary-dim);
    padding: 30px;
    margin-bottom: 25px;
    text-align: left;
}

.confirmed-message p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Blink Animation */
.blink {
    animation: blink 1s infinite;
}

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

/* Footer */
.terminal-footer {
    margin-top: 40px;
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
}

.footer-line {
    margin-bottom: 10px;
    color: var(--primary-dim);
}

/* Typing Cursor */
.cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: var(--primary);
    animation: blink 0.7s infinite;
    vertical-align: middle;
    margin-left: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .terminal {
        padding: 10px;
    }

    .terminal-header {
        font-size: 10px;
    }

    .status-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-section,
    .status-section,
    .confirmed-message {
        padding: 15px;
    }

    .terminal-button {
        padding: 12px 25px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .terminal-header {
        font-size: 8px;
    }

    .header-line,
    .header-title {
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Glow effect on entire terminal */
.terminal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(0, 255, 65, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Input validation styles */
.terminal-input.invalid {
    border-color: var(--error);
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.4);
}

.terminal-input.valid {
    border-color: var(--primary);
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--primary-dim);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
