/**
 * ALAX - Styles
 */

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

body {
    background: #0a0a0a;
    color: #0f0;
    font-family: 'Courier New', monospace;
    min-height: 100vh;
}

/* ========== HOME (Guru Meditation) ========== */

body.home {
    background: #000;
}

.guru-box {
    color: #ff0000;
    text-align: center;
    border: 7px solid #ff0000;
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    max-width: 1024px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1em 2em;
    animation: guru-border 1.5s step-start 0s infinite;
    cursor: pointer;
    user-select: none;
}

.guru-box:hover {
    background: #200;
}

.guru-box pre {
    margin: 0;
}

@keyframes guru-border {
    0%, 50% { border-color: #ff0000; }
    51%, 100% { border-color: black; }
}

/* ========== LOGIN ========== */

body.login {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.terminal {
    width: 100%;
    max-width: 500px;
    border: 2px solid #0f0;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.terminal-header {
    text-align: center;
    margin-bottom: 20px;
    white-space: pre;
    font-size: 10px;
    line-height: 1.2;
}

.divider {
    border: none;
    border-top: 1px solid #0f0;
    margin: 15px 0;
}

.prompt {
    margin-bottom: 15px;
}

.prompt label {
    display: block;
    margin-bottom: 5px;
    color: #0a0;
}

.prompt input {
    width: 100%;
    background: #000;
    border: 1px solid #0f0;
    color: #0f0;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
}

.prompt input:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.btn {
    width: 100%;
    background: #0f0;
    color: #000;
    border: none;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

.btn:hover {
    background: #0c0;
}

.error {
    color: #f00;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #f00;
    padding: 10px;
    margin-bottom: 15px;
    text-align: center;
}

.info {
    color: #0a0;
    font-size: 12px;
    text-align: center;
    margin-top: 15px;
}

.cursor {
    animation: blink 1s infinite;
}

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

/* ========== GAME ========== */

body.game {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    display: inline-block;
}

.screen {
    border: 2px solid #0f0;
    background: #000;
    margin-bottom: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.header {
    border-bottom: 1px solid #0f0;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.viewport {
    /* 80 chars × 7.2px = 576px, 45 lines × 12px = 540px */
    width: 576px;
    height: 540px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 12px;
    line-height: 12px;
    letter-spacing: 0;
    white-space: pre;
    overflow: hidden;
    background: #000;
    color: #0f0;
}

.status-bar {
    border-top: 1px solid #0f0;
    padding: 6px 10px;
    font-size: 12px;
    color: #0a0;
    display: flex;
    justify-content: space-between;
}

.controls {
    min-height: 40px;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 700px) {
    .guru-box {
        font-size: 12px;
        padding: 0.8em 1em;
        margin: 0 10px;
        border-width: 5px;
    }

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

    body.game {
        padding: 10px;
        align-items: flex-start;
    }

    .viewport {
        width: 100vw;
        height: calc(100vw * 45 / 80);
        font-size: calc(100vw / 80);
        line-height: calc(100vw / 80);
    }

    .screen {
        border-left: none;
        border-right: none;
    }

    .status-bar {
        flex-wrap: wrap;
        gap: 5px;
    }
}
