/* Shared Auth Theme (Shadcn Dark) */
:root {
    --background: #09090b;
    --foreground: #fafafa;
    --card: #09090b;
    --card-foreground: #fafafa;
    --popover: #09090b;
    --popover-foreground: #fafafa;
    --primary: #fafafa;
    --primary-foreground: #18181b;
    --primary-blue: #00d4ff;
    --secondary: #27272a;
    --secondary-foreground: #fafafa;
    --muted: #27272a;
    --muted-foreground: #a1a1aa;
    --accent: #27272a;
    --accent-foreground: #fafafa;
    --destructive: #7f1d1d;
    --destructive-foreground: #fafafa;
    --border: #27272a;
    --input: #27272a;
    --ring: #d4d4d8;
    --radius: 0.5rem;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Background Media (shared with landing) */
.media-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: var(--background);
    overflow: hidden;
}

.background-image,
.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.background-image {
    opacity: 1;
    z-index: 1;
}

.background-video {
    opacity: 1;
    z-index: 2;
}

.background-image.hidden {
    display: none;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 9, 11, 0.88);
    z-index: 3;
}

/* Login Page Styles */
.login-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    padding: 2rem 1.75rem;
    position: relative;
    z-index: 4;
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem 1.25rem;
        border-radius: 6px;
    }
}

.header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.title {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.description {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.8rem;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

label {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1;
}

input {
    height: 2.75rem;
    width: 100%;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 0.875rem;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.875rem;
    color: #fff;
    box-sizing: border-box;
    transition: all 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background-color: rgba(0, 212, 255, 0.05);
}

button,
.login-card form button,
a.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    height: 2.75rem;
    width: 100%;
    padding: 0.5rem 1.5rem;
    background-color: var(--primary-blue);
    color: #000;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.01em;
    box-sizing: border-box;
    text-decoration: none;
}

button:hover {
    opacity: 0.9;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Google Sign-In button - subtle, integrated with dark theme */
.btn-google {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--foreground);
    border: 1px solid rgba(255, 255, 255, 0.12);
    gap: 10px;
    font-weight: 500;
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

/* Email link button - primary action with refined style */
.btn-email-link {
    background-color: rgba(0, 212, 255, 0.12);
    color: var(--primary-blue);
    border: 1px solid rgba(0, 212, 255, 0.25);
}

.btn-email-link:hover {
    background: rgba(0, 212, 255, 0.18);
    border-color: rgba(0, 212, 255, 0.35);
}

/* Hint text above email button */
.auth-hint {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin: 0;
    line-height: 1.4;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0.25rem 0;
}

.auth-divider-line {
    height: 1px;
    background: var(--border);
    flex: 1;
}

.auth-divider-text {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* Legal text */
.auth-legal {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.5rem;
    line-height: 1.4;
}

.auth-legal a {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* Info box */
.auth-info-box {
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-info-box p {
    color: var(--foreground);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}

.auth-info-box strong.highlight {
    color: var(--primary-blue);
}

.auth-info-box .muted {
    color: var(--muted-foreground);
    font-size: 0.8rem;
}

/* Back link */
.auth-back {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-back a {
    color: var(--muted-foreground);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.15s;
}

.auth-back a:hover {
    color: var(--foreground);
}

.error-msg {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.8rem;
    color: #ff0055;
    background-color: rgba(255, 0, 85, 0.1);
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 0, 85, 0.2);
    text-align: center;
    display: none;
}

.success-msg {
    color: #22c55e;
    background-color: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 8, 12, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 2px solid rgba(0, 212, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-blue);
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    color: var(--primary-blue);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Access Denied Styles */
.card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3.5rem 2.5rem;
    text-align: center;
    max-width: 480px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 4;
}

h1 {
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}

p {
    font-family: 'Inter', -apple-system, sans-serif;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.6;
    font-size: 0.9rem;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-blue);
    color: #000;
    text-decoration: none;
    border-radius: 4px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn:hover {
    opacity: 0.9;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: #3f3f46;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    justify-content: flex-end;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.lang-btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 1.75rem;
    padding: 0 0.5rem;
    border-radius: 4px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.4);
    background: transparent;
    border: 1px solid transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    box-sizing: border-box;
}

.lang-btn:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    transform: none;
    box-shadow: none;
}

.lang-btn.lang-active {
    color: #fff;
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.3);
    cursor: default;
}

.lang-btn.lang-active:hover {
    transform: none;
    box-shadow: none;
}

.icon-lock {
    width: 64px;
    height: 64px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--primary-blue);
}