/* ===================================
   DIGITAL GEORGE - TERMINAL LOGIN
   =================================== */

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

body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    min-height: 100vh;
    overflow: hidden;
    background: #05050a;
}

/* === PAGE / VIDEO BACKGROUND === */
.page {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #05050a;
}

.bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(5, 5, 10, 0.55) 0%, rgba(5, 5, 10, 0.75) 100%),
        radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1), transparent 70%);
    z-index: 1;
}

/* subtle CRT scanlines for terminal feel */
.scanlines {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.35;
}

/* === BACK BUTTON === */
.back-btn {
    position: absolute;
    top: 18px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: rgba(180, 255, 200, 0.6);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    z-index: 10;
    font-family: 'JetBrains Mono', monospace;
    text-transform: lowercase;
}

.back-btn:hover {
    color: #86efac;
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateX(-2px);
}

.back-btn i {
    font-size: 0.65rem;
}

/* === LANGUAGE SWITCHER === */
.login-lang-switcher {
    position: absolute;
    top: 18px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
}

.login-lang-switcher a {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: all 0.2s ease;
    color: rgba(180, 255, 200, 0.5);
    border: 1px solid transparent;
    font-family: 'JetBrains Mono', monospace;
}

.login-lang-switcher a:hover {
    color: #86efac;
    background: rgba(34, 197, 94, 0.1);
}

.login-lang-switcher a.active {
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.1);
}

.login-lang-divider {
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.65rem;
}

/* === TERMINAL WRAPPER === */
.terminal-wrapper {
    position: relative;
    z-index: 10;
    width: 92%;
    max-width: 520px;
    animation: appear 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes appear {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(24px);
    }
}

/* === TERMINAL WINDOW === */
.terminal {
    background: rgba(8, 10, 14, 0.72);
    backdrop-filter: blur(22px) saturate(140%);
    border: 1px solid rgba(74, 222, 128, 0.25);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.4),
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(34, 197, 94, 0.08);
}

.terminal.shake {
    animation: terminalShake 0.4s ease;
}

@keyframes terminalShake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

.terminal-titlebar {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(74, 222, 128, 0.15);
}

.terminal-dots {
    display: flex;
    gap: 7px;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: block;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
}

.terminal-title i {
    margin-right: 5px;
    font-size: 10px;
}

.terminal-titlebar-spacer {
    width: 46px; /* balances the dots so the title stays centered */
}

/* === TERMINAL BODY === */
.terminal-body {
    padding: 26px 28px 28px;
    color: rgba(226, 255, 234, 0.85);
}

.term-banner {
    margin-bottom: 20px;
}

.term-ascii {
    font-family: 'Orbitron', monospace;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #4ade80, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.term-comment {
    font-size: 12px;
    color: rgba(74, 222, 128, 0.55);
}

/* === ALERTS / TERM LINES === */
.term-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    margin-bottom: 14px;
    line-height: 1.5;
}

.term-comment-line {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
    font-weight: 500;
}

.term-cursor-inline {
    display: inline-block;
    width: 7px;
    height: 13px;
    background: #4ade80;
    margin-left: 4px;
    vertical-align: -2px;
    animation: cursorBlink 1s step-end infinite;
}

.prompt-tag {
    color: #4ade80;
    font-weight: 700;
    flex-shrink: 0;
}

.term-alert {
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.term-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.term-alert-error .prompt-tag { color: #f87171; }

.term-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.term-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.term-alert-warning .prompt-tag { color: #fbbf24; }

/* === INPUT LINES === */
.term-input-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.term-input-line > .prompt-tag {
    width: 42px;
    flex-shrink: 0;
    font-size: 12px;
    text-align: right;
    color: rgba(74, 222, 128, 0.7);
}

.term-input-field {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    border-bottom: 1px solid rgba(74, 222, 128, 0.25);
    transition: all 0.25s;
    padding-bottom: 2px;
}

.term-input-field i:first-child {
    color: rgba(74, 222, 128, 0.5);
    font-size: 13px;
    margin-right: 10px;
    width: 14px;
    text-align: center;
}

.term-input-field input {
    flex: 1;
    background: transparent;
    border: none;
    color: #d1fae5;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13.5px;
    padding: 8px 4px;
    letter-spacing: 0.3px;
}

.term-input-field input::placeholder {
    color: rgba(74, 222, 128, 0.3);
}

.term-input-field input:-webkit-autofill,
.term-input-field input:-webkit-autofill:hover,
.term-input-field input:-webkit-autofill:focus,
.term-input-field input:-webkit-autofill:active {
    -webkit-text-fill-color: #d1fae5 !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(8, 10, 14, 0.9) inset !important;
    box-shadow: 0 0 0 1000px rgba(8, 10, 14, 0.9) inset !important;
    caret-color: #4ade80 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.term-input-field input:focus {
    outline: none;
}

.term-input-line:focus-within .term-input-field {
    border-bottom-color: #4ade80;
    box-shadow: 0 1px 0 0 rgba(74, 222, 128, 0.4);
}

.toggle {
    cursor: pointer;
    padding: 6px 8px;
    color: rgba(74, 222, 128, 0.4);
    transition: all 0.2s;
}

.toggle:hover {
    color: #4ade80;
}

.trap {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

/* === CHECKBOX (terminal [x] style) === */
.term-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    cursor: pointer;
    user-select: none;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.55);
}

.term-check input {
    display: none;
}

.term-checkbox-checked {
    display: none;
    color: #4ade80;
    font-weight: 700;
}

.term-checkbox {
    color: rgba(74, 222, 128, 0.5);
    font-weight: 700;
}

.term-check input:checked ~ .term-checkbox {
    display: none;
}

.term-check input:checked ~ .term-checkbox-checked {
    display: inline;
}

/* === SUBMIT BUTTON === */
.term-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.35);
    border-radius: 8px;
    padding: 13px 18px;
    color: #86efac;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
}

.term-btn-prompt {
    color: #4ade80;
    font-weight: 700;
}

.term-btn:hover:not(:disabled) {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.6);
    box-shadow: 0 0 24px rgba(74, 222, 128, 0.15);
}

.term-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.term-cursor {
    width: 8px;
    height: 15px;
    background: #4ade80;
    margin-left: 2px;
    animation: cursorBlink 1s step-end infinite;
}

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

.btn-loader {
    display: none;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(74, 222, 128, 0.3);
    border-top-color: #4ade80;
    border-radius: 50%;
    margin-left: auto;
}

.term-btn.loading .btn-loader {
    display: block;
    animation: spin 0.6s linear infinite;
}

.term-btn.loading .btn-text,
.term-btn.loading .term-cursor {
    opacity: 0.3;
}

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

.term-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* === FOOTER === */
.terminal-footer {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed rgba(74, 222, 128, 0.15);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-footer a {
    color: rgba(74, 222, 128, 0.65);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.terminal-footer a .fa-whatsapp {
    color: #25d366;
    font-size: 14px;
}

.terminal-footer a:hover {
    color: #4ade80;
    text-decoration: underline;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
    .terminal-body {
        padding: 20px 18px 22px;
    }

    .term-ascii {
        font-size: 14px;
    }

    .term-input-line > .prompt-tag {
        width: 34px;
        font-size: 11px;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}