/**
 * Copyright 2026 oh826
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     https://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* ===================================
   AUTHENTICATION STYLES - EYECERITY
   Design System: Dark Mode + Glassmorphism
   =================================== */

:root {
    --color-primary: #06B6D4;
    --color-primary-dark: #0891B2;
    --color-accent: #10B981;
    --color-bg-dark: #0F172A;
    --color-surface-dark: #1E293B;
    --color-text-inverse: #F8FAFC;
    --color-text-muted: #94A3B8;
    --color-border: #334155;
    --color-border-light: #475569;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--color-bg-dark);
    color: var(--color-text-inverse);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===================================
   BACKGROUND ORBS
   =================================== */

.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.4) 0%, rgba(6, 182, 212, 0) 70%);
    top: -10%;
    right: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, rgba(16, 185, 129, 0) 70%);
    bottom: -10%;
    left: -5%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ===================================
   AUTH CONTAINER
   =================================== */

.auth-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* ===================================
   GLASSMORPHISM CARD
   =================================== */

.glass-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.auth-card {
    width: 100%;
    max-width: 460px;
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   LOGO
   =================================== */

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-inverse);
    letter-spacing: -0.025em;
}

/* ===================================
   SEGMENTED CONTROL
   =================================== */

.segmented-control {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 0.25rem;
    margin-bottom: 2rem;
}

.segment {
    position: relative;
    z-index: 2;
    background: none;
    border: none;
    color: var(--color-text-muted);
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.segment.active {
    color: var(--color-text-inverse);
}

.segment-indicator {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    width: calc(50% - 0.25rem);
    height: calc(100% - 0.5rem);
    background: var(--color-surface-dark);
    border-radius: 0.625rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.segment-indicator.slide-right {
    transform: translateX(calc(100% + 0.25rem));
}

/* ===================================
   HEADER
   =================================== */

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

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-inverse);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.auth-subtitle {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    transition: all 0.3s ease;
}

/* ===================================
   SOCIAL AUTH BUTTON
   =================================== */

.btn-social {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(248, 250, 252, 0.95);
    color: #1E293B;
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.btn-social:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===================================
   DIVIDER
   =================================== */

.divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 4rem);
    height: 1px;
    background: var(--color-border);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: rgba(30, 41, 59, 0.6);
    padding: 0 1rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* ===================================
   FORM
   =================================== */

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.form-group.hidden {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-inverse);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}

.form-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--color-border);
    color: var(--color-text-inverse);
    padding: 0.875rem 1rem 0.875rem 3rem;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--color-primary);
}

.toggle-password .eye-closed {
    display: none;
}

.form-actions {
    text-align: right;
    margin-bottom: 1.5rem;
}

/* ===================================
   BUTTONS
   =================================== */

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ===================================
   LINKS
   =================================== */

.link-secondary {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.link-secondary:hover {
    color: var(--color-primary-dark);
}

.link-muted {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.link-muted:hover {
    color: var(--color-primary);
}

/* ===================================
   FOOTER
   =================================== */

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

/* ===================================
   TRUST INDICATORS
   =================================== */

.trust-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.8125rem;
}

.trust-item svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

/* ===================================
   UTILITY
   =================================== */

.hidden {
    display: none !important;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 640px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .trust-indicators {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .orb-1,
    .orb-2 {
        display: none;
    }
}