* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

html {
    overflow-x: hidden;
    background: #000;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 14px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0a0a0c;
    width: 100%;
    color: #ccc;
    position: relative;
}

/* Login Card Container */
.login-container {
    position: relative;
    z-index: 10;
}

.login-box {
    background: rgba(22, 22, 24, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 32px 36px;
    width: 320px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease;
}

.login-header {
    margin-bottom: 24px;
}

.login-header h1 {
    font-size: 16px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.login-header p {
    font-size: 12px;
    color: #666;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.form-group input,
.submit-btn {
    font-size: 13px;
    font-family: inherit;
    width: 100%;
}

.form-group input {
    padding: 10px 12px;
    background: rgba(14, 14, 16, 0.9);
    border: 1px solid #333;
    border-radius: 4px;
    color: #e0e0e0;
    outline: 0;
    user-select: text;
    -webkit-user-select: text;
    transition: border-color 0.2s;
}

.form-group input::placeholder {
    color: #444;
}

.form-group input:focus {
    border-color: #555;
}

.submit-btn {
    padding: 10px 16px;
    margin-top: 8px;
    background: #242424;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    color: #d0d0d0;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn:hover {
    background: #2e2e2e;
    border-color: #444;
    color: #fff;
}

.message {
    font-size: 12px;
    margin-bottom: 14px;
    padding: 8px 10px;
    border-radius: 4px;
    display: none;
}

.message.error {
    display: block;
    background: rgba(180, 50, 50, 0.15);
    border: 1px solid #5a2222;
    color: #e07070;
}

.message.success {
    display: block;
    background: rgba(40, 120, 70, 0.15);
    border: 1px solid #1e5c38;
    color: #6abf8a;
}

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

.shake {
    animation: 0.35s shake;
}

/* Authentic TTY Terminal Overlay */
.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0c0c0c;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.05s;
    box-sizing: border-box;
}

.terminal-overlay.active {
    display: block;
    opacity: 1;
}

.terminal {
    width: 100%;
    height: 100%;
    padding: 24px 32px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Ubuntu Mono', Consolas, monospace;
    font-size: 13.5px;
    line-height: 1.45;
    background: #000;
    color: #c5c5c5;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    box-sizing: border-box;
}

/* Custom terminal scrollbar */
.terminal::-webkit-scrollbar {
    width: 6px;
}

.terminal::-webkit-scrollbar-track {
    background: #000;
}

.terminal::-webkit-scrollbar-thumb {
    background: #222;
}

.terminal-line {
    color: #c5c5c5;
    font-size: 13.5px;
    line-height: 1.45;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-all;
    margin-bottom: 1px;
}

/* Standard Linux colors (no glowing text shadows) */
.terminal-line.prompt {
    color: #ffffff;
}

.terminal-line.highlight {
    color: #d3d7cf;
}

.terminal-line.system {
    color: #729fcf;
}

.terminal-line.success {
    color: #4e9a06;
}

.terminal-line.error {
    color: #cc0000;
    font-weight: bold;
}

.terminal-line.warning {
    color: #c4a000;
}

.ip-highlight {
    color: #fce94f;
    font-weight: bold;
}

/* Classic Solid Block Terminal Cursor */
.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #aaaaaa;
    animation: 0.8s step-end infinite blink;
    margin-left: 1px;
    vertical-align: text-bottom;
}

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

/* Flash Overlay */
.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 99999;
    display: none;
    opacity: 1;
    pointer-events: none;
}

.flash-active {
    display: block;
    animation: 0.1s ease-out forwards flashAnim;
}

@keyframes flashAnim {
    to { opacity: 0; }
}

/* Cat Container */
.cat-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.4s;
}

.cat-container.active {
    display: block;
    opacity: 1;
}

.cat-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .login-box {
        width: 92vw;
        padding: 24px 20px;
    }

    .terminal {
        padding: 12px 10px;
        font-size: 12px;
    }

    .terminal-line {
        font-size: 12px;
    }

    .cursor {
        width: 6px;
        height: 13px;
    }
}
