/* Hacker Typer Master Stylesheet */

:root {
    --bg-color: #050505;
    --text-color: #00ff66;
    --text-glow: rgba(0, 255, 102, 0.6);
    --border-color: #00aa44;
    --modal-bg: rgba(5, 20, 10, 0.95);
    --font-family: 'Fira Code', 'Share Tech Mono', monospace;
    --font-size: 16px;
}

/* Color Themes */
body.theme-green {
    --text-color: #00ff66;
    --text-glow: rgba(0, 255, 102, 0.6);
    --border-color: #00aa44;
    --modal-bg: rgba(5, 20, 10, 0.95);
}

body.theme-amber {
    --text-color: #ffb000;
    --text-glow: rgba(255, 176, 0, 0.6);
    --border-color: #cc8800;
    --modal-bg: rgba(25, 18, 5, 0.95);
}

body.theme-cyan {
    --text-color: #00e5ff;
    --text-glow: rgba(0, 229, 255, 0.6);
    --border-color: #0099bb;
    --modal-bg: rgba(5, 20, 25, 0.95);
}

body.theme-red {
    --text-color: #ff3333;
    --text-glow: rgba(255, 51, 51, 0.6);
    --border-color: #cc1111;
    --modal-bg: rgba(25, 5, 5, 0.95);
}

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

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: var(--font-size);
    overflow: hidden;
    user-select: none;
}

/* CRT Screen Effects */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    ), linear-gradient(
        90deg,
        rgba(255, 0, 0, 0.03),
        rgba(0, 255, 0, 0.01),
        rgba(0, 0, 255, 0.03)
    );
    background-size: 100% 4px, 6px 100%;
    z-index: 99;
    opacity: 1;
    transition: opacity 0.3s ease;
}

body.no-crt .scanlines {
    opacity: 0;
}

/* Main Terminal Window */
#terminal {
    width: 100%;
    height: calc(100vh - 45px);
    padding: 20px;
    overflow-y: auto;
    outline: none;
    word-break: break-all;
    white-space: pre-wrap;
    text-shadow: 0 0 5px var(--text-glow);
}

/* Scrollbar Customization */
#terminal::-webkit-scrollbar {
    width: 8px;
}
#terminal::-webkit-scrollbar-track {
    background: #0a0a0a;
}
#terminal::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

#console {
    font-family: inherit;
    font-size: inherit;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

#cursor {
    display: inline-block;
    width: 10px;
    background-color: var(--text-color);
    color: var(--bg-color);
    animation: blink 0.8s infinite;
    box-shadow: 0 0 8px var(--text-glow);
    margin-left: 2px;
}

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

/* Bottom Navigation Bar */
#nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 45px;
    background-color: rgba(10, 10, 10, 0.95);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 100;
    font-size: 13px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    letter-spacing: 1px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-color);
    box-shadow: 0 0 8px var(--text-glow);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.nav-actions {
    display: flex;
    gap: 8px;
}

.btn {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.btn:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    box-shadow: 0 0 10px var(--text-glow);
}

.btn-grant {
    border-color: #00ff66;
    color: #00ff66;
}
.btn-grant:hover {
    background-color: #00ff66;
    color: #000;
    box-shadow: 0 0 12px rgba(0,255,102,0.8);
}

.btn-deny {
    border-color: #ff3333;
    color: #ff3333;
}
.btn-deny:hover {
    background-color: #ff3333;
    color: #fff;
    box-shadow: 0 0 12px rgba(255,51,51,0.8);
}

/* Modals Overlay */
.overlay-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

.modal-box {
    padding: 35px 50px;
    border-radius: 8px;
    text-align: center;
    font-family: var(--font-family);
    animation: popIn 0.2s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.granted-box {
    background: rgba(0, 40, 10, 0.9);
    border: 3px solid #00ff66;
    color: #00ff66;
    box-shadow: 0 0 40px rgba(0, 255, 102, 0.6);
}

.granted-box h1 {
    font-size: 42px;
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-shadow: 0 0 15px #00ff66;
}

.denied-box {
    background: rgba(50, 0, 0, 0.9);
    border: 3px solid #ff2a2a;
    color: #ff2a2a;
    box-shadow: 0 0 40px rgba(255, 42, 42, 0.7);
    animation: popIn 0.2s ease-out, shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

.denied-box h1 {
    font-size: 42px;
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-shadow: 0 0 15px #ff2a2a;
}

/* Settings and Help Modals */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 150;
}

.settings-card {
    background-color: var(--modal-bg);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    width: 480px;
    max-width: 90%;
    box-shadow: 0 0 25px var(--text-glow);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.settings-header h2 {
    font-size: 18px;
    letter-spacing: 1px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
}

.settings-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.setting-item.checkbox-item {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.setting-item select, .setting-item input[type="range"] {
    background: #000;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px;
    font-family: inherit;
    border-radius: 4px;
    outline: none;
}

.help-body ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-body li {
    font-size: 14px;
    line-height: 1.4;
}

.help-body code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--border-color);
}

.hidden {
    display: none !important;
}
