/* AgentCache Authentication Theme - "The Gatekeeper" */

:root {
    --auth-bg: #030508;
    --auth-panel-bg: rgba(6, 11, 20, 0.75);
    --auth-border: rgba(0, 243, 255, 0.3);
    --auth-text: #e0f7fa;
    --auth-text-dim: rgba(224, 247, 250, 0.6);
    --auth-accent: #00f3ff;
    --auth-accent-glow: rgba(0, 243, 255, 0.4);
    --auth-danger: #ef4444;
    --auth-success: #10b981;
    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Inter', sans-serif;
}

body.auth-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--auth-bg);
    background-image:
        radial-gradient(circle at 50% 50%, rgba(0, 243, 255, 0.05) 0%, transparent 70%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0%, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    font-family: var(--font-display);
    overflow: hidden;
    position: relative;
}

/* Scanline Effect */
body.auth-page::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.3) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.3;
}

.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: var(--auth-panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 243, 255, 0.1);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.auth-logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    box-shadow: 0 0 15px var(--auth-accent-glow);
}

.auth-logo-text {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 0 10px var(--auth-accent-glow);
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem 0;
}

.auth-subtitle {
    color: var(--auth-text-dim);
    font-size: 0.95rem;
    margin: 0;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.auth-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--auth-accent);
    letter-spacing: 0.05em;
    font-weight: 600;
}

.auth-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    color: #fff;
    font-family: var(--font-display);
    font-size: 1rem;
    transition: all 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Button */
.auth-btn {
    margin-top: 1rem;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--auth-accent);
    color: var(--auth-accent);
    padding: 0.875rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.auth-btn:hover {
    background: var(--auth-accent);
    color: #000;
    box-shadow: 0 0 20px var(--auth-accent-glow);
}

.auth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(100%);
}

.auth-btn-icon {
    width: 18px;
    height: 18px;
}

/* Messages */
.auth-message {
    margin-top: 1.5rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    text-align: center;
    border: 1px solid transparent;
}

.auth-message-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--auth-danger);
    color: #fca5a5;
}

.auth-message-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--auth-success);
    color: #6ee7b7;
}

.auth-hidden {
    display: none;
}

/* Footer */
.auth-footer {
    margin-top: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.auth-footer-text {
    color: var(--auth-text-dim);
    font-size: 0.875rem;
}

.auth-link {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-link:hover {
    text-shadow: 0 0 8px var(--auth-accent);
    text-decoration: underline;
}

/* Spinner */
.auth-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s linear infinite;
}

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