/* ===================================================================
   LOGIN PAGE STYLES
   Terminal HUD Aesthetic — mirrors landing page system
   =================================================================== */

body {
    background-color: #050505;
    color: #e5e2e1;
    overflow-x: hidden;
    cursor: none;
}

a, button, input, select, textarea, label, [role="button"] {
    cursor: none;
}

#dot-grid {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: -1;
}

.bg-scanlines {
    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% 2px, 3px 100%;
}

.bloom-text { text-shadow: 0 0 12px rgba(0, 255, 65, 0.5); }

/* HUD Brackets */
.hud-bracket-tl { border-top: 2px solid #00FF41; border-left: 2px solid #00FF41; width: 16px; height: 16px; position: absolute; top: -1px; left: -1px; }
.hud-bracket-tr { border-top: 2px solid #00FF41; border-right: 2px solid #00FF41; width: 16px; height: 16px; position: absolute; top: -1px; right: -1px; }
.hud-bracket-bl { border-bottom: 2px solid #00FF41; border-left: 2px solid #00FF41; width: 16px; height: 16px; position: absolute; bottom: -1px; left: -1px; }
.hud-bracket-br { border-bottom: 2px solid #00FF41; border-right: 2px solid #00FF41; width: 16px; height: 16px; position: absolute; bottom: -1px; right: -1px; }

/* Custom Cursor */
#custom-cursor {
    width: 40px; height: 40px;
    pointer-events: none; position: fixed;
    z-index: 9999; mix-blend-mode: screen;
    transition: transform 0.15s ease-out, filter 0.15s ease-out;
}
#custom-cursor.cursor-active {
    transform: scale(1.5) rotate(45deg);
    filter: drop-shadow(0 0 8px #00FF41) drop-shadow(0 0 16px rgba(0,255,65,0.4));
}
#custom-cursor.cursor-active svg circle:last-of-type {
    stroke-dasharray: none;
    stroke-width: 1;
    opacity: 1;
}

/* Glass Panel */
.glass-panel {
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 255, 65, 0.15);
    position: relative;
}

/* Typewriter title */
.typewriter-title {
    display: inline-block;
    overflow: hidden;
    border-right: 0.15em solid #00FF41;
    white-space: nowrap;
    animation:
        typing-title 1.5s steps(8, end) forwards,
        blink-caret 0.75s step-end infinite;
}
@keyframes typing-title {
    from { width: 0; }
    to   { width: 100%; }
}
@keyframes blink-caret {
    from, to { border-color: transparent; }
    50%      { border-color: #00FF41; }
}

/* Status dot blink */
.status-blink {
    animation: status-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.1; }
}

/* Input base overrides */
input[type="text"],
input[type="password"] {
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none !important;
    font-family: 'IBM Plex Mono', monospace;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px #0d0d0d inset !important;
    -webkit-text-fill-color: #00FF41 !important;
    caret-color: #00FF41;
    font-family: 'IBM Plex Mono', monospace !important;
    font-size: 0.75rem !important;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #00FF41; }

body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #00ff00;
    min-height: 100vh;
}

.back-to-landing-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #00ff00;
    color: #00ff00;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-landing-btn:hover {
    background: #00ff00;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 0, 0.3);
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-box {
    background: #0d0d0d;
    border: 2px solid #00ff00;
    border-radius: 15px;
    padding: 3rem;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #00ff00;
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.login-header .slogan {
    color: #00ff00;
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.public-notice {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    color: #00ff00;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: #00ff00;
    font-weight: 500;
}

.form-group input {
    background: #1a1a1a;
    border: 1px solid #00ff00;
    border-radius: 8px;
    padding: 0.75rem;
    color: #00ff00;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Roboto Mono', monospace;
}

.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1a1a1a inset !important;
    -webkit-text-fill-color: #00ff00 !important;
    border: 1px solid #00ff00 !important;
}

.form-group input:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.login-button {
    background: #00ff00;
    color: #0a0a0a;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    font-family: 'Roboto Mono', monospace;
}

.login-button:hover {
    background: #00cc00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    transform: translateY(-2px);
}

.error-message {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff0000;
    border-radius: 8px;
    padding: 1rem;
    color: #ff0000;
    text-align: center;
    margin-bottom: 1rem;
}

/* Touch devices: disable custom cursor, restore native pointer */
@media (hover: none) and (pointer: coarse) {
    body, a, button, input, select, textarea, label, [role="button"] {
        cursor: auto !important;
    }
    #custom-cursor {
        display: none !important;
    }
}
