/* Auth page styles — Refined Terminal Brutalism */

@font-face {
    font-family: 'NimbusMono';
    src: url('/static/fonts/NimbusMono-Bold.otf') format('opentype');
    font-weight: bold;
}

@font-face {
    font-family: 'OCR-A';
    src: url('/static/fonts/OCR-A.ttf') format('truetype');
}

.auth-page {
    background: #000000;
    color: #00ff00;
    font-family: 'NimbusMono', 'Courier New', monospace;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-page #matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.12;
}

/* Card — the main container */
.auth-card {
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(0, 255, 0, 0.2);
    padding: 2.5rem 2.2rem 2rem;
    width: 400px;
    max-width: 92vw;
    position: relative;
    z-index: 10;
    box-shadow: 0 0 60px rgba(0, 255, 0, 0.04), inset 0 0 40px rgba(0, 255, 0, 0.01);
    animation: card-enter 0.4s ease-out;
}

@keyframes card-enter {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Corner accent lines */
.auth-card::before,
.auth-card::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(0, 255, 0, 0.3);
    border-style: solid;
}

.auth-card::before {
    top: -1px;
    left: -1px;
    border-width: 1px 0 0 1px;
}

.auth-card::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 1px 1px 0;
}

/* Prompt symbol — visual centerpiece */
.auth-prompt {
    text-align: center;
    margin-bottom: 0.5rem;
    animation: prompt-fade 0.6s ease-out 0.2s both;
}

.auth-prompt-symbol {
    font-family: 'NimbusMono', monospace;
    font-size: 2.5rem;
    color: #00ff00;
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.5), 0 0 40px rgba(0, 255, 0, 0.2);
    letter-spacing: -0.05em;
}

.auth-prompt-cursor {
    display: inline-block;
    width: 1.2rem;
    height: 0.2rem;
    background: #00ff00;
    vertical-align: middle;
    margin-left: 0.15rem;
    animation: cursor-blink 1s step-end infinite;
    box-shadow: 0 0 6px #00ff00;
}

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

@keyframes prompt-fade {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Title */
.auth-title {
    font-family: 'OCR-A', monospace;
    font-size: 1.3rem;
    color: #00ff00;
    text-align: center;
    margin: 0 0 0.2rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.4);
    animation: text-reveal 0.5s ease-out 0.3s both;
}

.auth-title::after {
    display: none;
}

.auth-tagline {
    text-align: center;
    font-family: 'NimbusMono', monospace;
    font-size: 0.55rem;
    color: rgba(0, 255, 0, 0.3);
    letter-spacing: 0.12em;
    margin-bottom: 1.8rem;
    animation: text-reveal 0.5s ease-out 0.4s both;
}

@keyframes text-reveal {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.3rem;
    border-bottom: 1px solid rgba(0, 255, 0, 0.08);
    animation: text-reveal 0.5s ease-out 0.5s both;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(0, 255, 0, 0.25);
    font-family: 'OCR-A', monospace;
    font-size: 0.75rem;
    padding: 0.6rem 0;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: color 0.2s, border-color 0.2s;
}

.auth-tab:hover {
    color: rgba(0, 255, 0, 0.6);
}

.auth-tab.active {
    color: #00ff00;
    border-bottom-color: #00ff00;
}

/* Forms */
.auth-form {
    display: none;
    flex-direction: column;
    gap: 0.9rem;
    animation: text-reveal 0.3s ease-out;
}

.auth-form.active {
    display: flex;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.auth-field label {
    font-family: 'OCR-A', monospace;
    font-size: 0.55rem;
    color: rgba(0, 255, 0, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.auth-field input {
    background: rgba(0, 255, 0, 0.02);
    border: 1px solid rgba(0, 255, 0, 0.12);
    color: #00ff00;
    font-family: 'NimbusMono', monospace;
    font-size: 0.85rem;
    padding: 0.65rem 0.75rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-field input:focus {
    border-color: rgba(0, 255, 0, 0.5);
    background: rgba(0, 255, 0, 0.04);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.08), inset 0 0 8px rgba(0, 255, 0, 0.02);
}

.auth-field input::placeholder {
    color: rgba(0, 255, 0, 0.15);
}

/* Primary button */
.auth-btn {
    background: transparent;
    border: 1px solid #00ff00;
    color: #00ff00;
    font-family: 'OCR-A', monospace;
    font-size: 0.8rem;
    padding: 0.75rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    width: 100%;
    margin-top: 0.3rem;
}

.auth-btn:hover {
    background: #00ff00;
    color: #000000;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.25);
}

.auth-btn:active {
    background: #00cc00;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
}

.auth-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Google button */
.auth-btn-google {
    background: transparent;
    border: 1px solid rgba(0, 255, 0, 0.12);
    color: rgba(0, 255, 0, 0.45);
    font-family: 'OCR-A', monospace;
    font-size: 0.7rem;
    padding: 0.6rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: border-color 0.2s, color 0.2s;
    width: 100%;
}

.auth-btn-google:hover {
    border-color: rgba(0, 255, 0, 0.4);
    color: #00ff00;
}

/* Divider */
.auth-divider {
    text-align: center;
    color: rgba(0, 255, 0, 0.15);
    font-size: 0.6rem;
    margin: 0.8rem 0;
    position: relative;
    letter-spacing: 0.2em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 38%;
    height: 1px;
    background: rgba(0, 255, 0, 0.08);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

/* Forgot password */
.auth-forgot {
    background: none;
    border: none;
    color: rgba(0, 255, 0, 0.25);
    font-family: 'NimbusMono', monospace;
    font-size: 0.6rem;
    cursor: pointer;
    text-align: right;
    padding: 0;
    margin-top: -0.3rem;
    transition: color 0.2s;
    letter-spacing: 0.03em;
}

.auth-forgot:hover {
    color: rgba(0, 255, 0, 0.7);
}

/* Messages */
.auth-message {
    font-size: 0.7rem;
    padding: 0.5rem 0.6rem;
    display: none;
    border: 1px solid transparent;
    letter-spacing: 0.02em;
}

.auth-message.error {
    display: block;
    color: #ff3333;
    border-color: rgba(255, 0, 0, 0.15);
    background: rgba(255, 0, 0, 0.03);
}

.auth-message.success {
    display: block;
    color: #00ff00;
    border-color: rgba(0, 255, 0, 0.15);
    background: rgba(0, 255, 0, 0.03);
}

/* Reset form */
.auth-reset-form {
    display: none;
    flex-direction: column;
    gap: 0.9rem;
    animation: text-reveal 0.3s ease-out;
}

.auth-reset-form.active {
    display: flex;
}

.auth-back {
    background: none;
    border: none;
    color: rgba(0, 255, 0, 0.3);
    font-family: 'NimbusMono', monospace;
    font-size: 0.6rem;
    cursor: pointer;
    padding: 0;
    text-align: left;
    transition: color 0.2s;
}

.auth-back:hover {
    color: #00ff00;
}

/* Loading state */
.auth-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.auth-btn.loading::after {
    content: '...';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #00ff00;
    animation: auth-pulse 0.8s infinite;
}

@keyframes auth-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Version label */
.auth-version {
    position: fixed;
    bottom: 1rem;
    right: 1.5rem;
    font-family: 'OCR-A', monospace;
    font-size: 0.4rem;
    color: rgba(0, 255, 0, 0.12);
    letter-spacing: 0.15em;
    z-index: 10;
}

/* Logout button in main app — kept minimal */
.btn-logout {
    background: transparent;
    border: 1px solid rgba(0, 255, 0, 0.08);
    color: rgba(0, 255, 0, 0.25);
    font-family: 'OCR-A', monospace;
    font-size: 0.45rem;
    padding: 0.15rem 0.3rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: border-color 0.2s, color 0.2s;
    margin-left: 0.3rem;
}

.btn-logout:hover {
    border-color: rgba(255, 50, 50, 0.3);
    color: rgba(255, 50, 50, 0.6);
}

/* Discrete open-source mention under the Google sign-in button.
   Same color family as .auth-tagline (rgba(0,255,0,0.3)) for visual consistency. */
.auth-os-note {
    margin-top: 10px;
    text-align: center;
    font-family: 'NimbusMono', monospace;
    font-size: 0.5rem;
    letter-spacing: 0.08em;
    transition: filter 0.2s;
}
.auth-os-note:hover {
    filter: drop-shadow(0 0 3px rgba(0, 255, 0, 0.35));
}
.auth-os-note a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(0, 255, 0, 0.3);
    text-decoration: none;
    transition: color 0.2s;
}
.auth-os-note a:hover {
    color: rgba(0, 255, 0, 0.7);
}
.auth-os-note .gh-icon {
    vertical-align: middle;
}
