/* ============================================
   OpenService VPN - Authentication Pages CSS
   ============================================ */

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

:root {
    --bg-primary: #09090B;
    --bg-secondary: #111114;
    --accent-primary: #8B5CF6;
    --accent-secondary: #EC4899;
    --text-primary: #FAFAFA;
    --text-secondary: #A1A1AA;
    --border-color: rgba(255, 255, 255, 0.08);
    --error-color: #EF4444;
    --success-color: #10B981;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== AUTH CONTAINER ===== */
.auth-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    z-index: 1;
}

.auth-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 3rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 8px;
    position: relative;
}

.logo-icon::after {
    content: '';
    position: absolute;
    inset: 6px;
    background: var(--bg-primary);
    border-radius: 4px;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    border: 1px solid;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6EE7B7;
}

/* ===== FORM ===== */
.auth-form {
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===== FORM OPTIONS ===== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.checkbox-label span {
    user-select: none;
}

.link {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.3s ease;
}

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

/* ===== BUTTONS ===== */
.btn-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
}

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

.btn-google {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.btn-google svg {
    flex-shrink: 0;
}

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

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    position: relative;
    display: inline-block;
    padding: 0 1rem;
    background: rgba(17, 17, 20, 0.9);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ===== FOOTER ===== */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ===== BACKGROUND EFFECTS ===== */
.auth-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    animation: float 8s ease-in-out infinite;
}

.bg-sphere-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    top: -10%;
    left: -10%;
}

.bg-sphere-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(225deg, var(--accent-secondary), var(--accent-primary));
    bottom: -10%;
    right: -10%;
    animation-delay: -4s;
}

.bg-ring {
    position: absolute;
    border: 2px solid;
    border-radius: 50%;
    opacity: 0.1;
    animation: rotate 30s linear infinite;
}

.bg-ring-1 {
    width: 600px;
    height: 600px;
    border-color: var(--accent-primary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.bg-ring-2 {
    width: 800px;
    height: 800px;
    border-color: var(--accent-secondary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 40s;
    animation-direction: reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    body {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== LOADING STATE ===== */
.btn-submit:disabled,
.btn-google:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== VALIDATION STATES ===== */
.form-group input:invalid:not(:placeholder-shown) {
    border-color: var(--error-color);
}

.form-group input:valid:not(:placeholder-shown) {
    border-color: var(--success-color);
}
