/**
 * Login Page Styles
 * WardaPanel - Apple Liquid Glass Theme
 * Version: 1.0.0
 */

/* ========================================
   CSS Variables (Login-specific overrides)
   ======================================== */
:root {
    /* Dark Slate Colors (Panel ile uyumlu) */
    --sidebar-bg: #3d4f5f;
    --sidebar-hover: #4a5d6e;
    --text-white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);

    /* Glass Effects */
    --glass-bg: rgba(61, 79, 95, 0.85);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --backdrop-blur: blur(20px) saturate(180%);

    /* Accent Colors */
    --accent-primary: #4A90E2;
    --accent-success: #22c55e;
    --accent-danger: #ef4444;
    --accent-warning: #f59e0b;

    /* Neutral */
    --neutral-50: #f5f5f7;
    --neutral-100: #e8e8ed;
    --neutral-200: #d2d2d7;
    --neutral-900: #1d1d1f;

    /* Dimensions */
    --border-radius: var(--radius-20);
    --border-radius-sm: 12px;
}

/* ========================================
   Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

/* ========================================
   Animated Background Orbs
   ======================================== */
.bg-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

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

.orb-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    bottom: -150px;
    right: -150px;
    animation-delay: -5s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(-30px, 30px) scale(0.95); }
    75% { transform: translate(40px, 20px) scale(1.05); }
}

/* ========================================
   Floating Particles
   ======================================== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat 20s infinite linear;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; }
.particle:nth-child(7) { left: 70%; animation-delay: 2s; }
.particle:nth-child(8) { left: 80%; animation-delay: 4s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1s; }

@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* ========================================
   Login Container
   ======================================== */
.login-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    z-index: 10;
    position: relative;
}

/* ========================================
   Liquid Glass Card
   ======================================== */
.login-card {
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s ease;
}

.login-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ========================================
   Header
   ======================================== */
.login-header {
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--sidebar-hover) 100%);
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.login-header .logo {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.login-header .logo:hover {
    transform: scale(1.05) rotate(2deg);
}

.login-header .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-header h1 {
    color: var(--text-white);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 400;
}

/* ========================================
   Form
   ======================================== */
.login-form {
    padding: 35px 30px;
}

.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-group label {
    display: block;
    color: var(--text-white);
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i:first-child {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    transition: color 0.3s ease;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
}

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

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.15);
}

.input-wrapper input:focus + i,
.input-wrapper input:focus ~ i:first-of-type {
    color: var(--accent-primary);
}

.input-wrapper .toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    font-size: 1rem;
    padding: 4px;
}

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

/* ========================================
   Remember Me
   ======================================== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-primary);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.remember-me span {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.remember-me:hover span {
    color: var(--text-white);
}

/* ========================================
   Submit Button - Liquid Glass Style
   ======================================== */
.btn-login {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--sidebar-hover) 100%);
    color: var(--text-white);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(61, 79, 95, 0.4);
    background: linear-gradient(135deg, var(--sidebar-hover) 0%, #5a6f7f 100%);
}

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

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-login .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-login.loading .spinner {
    display: inline-block;
}

.btn-login.loading .btn-text {
    opacity: 0.7;
}

/* ========================================
   Error Message
   ======================================== */
.error-message {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 14px 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 12px;
    animation: shake 0.5s ease;
}

.error-message.show {
    display: flex;
}

.error-message i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* ========================================
   Locked Message
   ======================================== */
.locked-message {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
    padding: 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    display: none;
    text-align: center;
}

.locked-message.show {
    display: block;
}

.locked-message i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
    opacity: 0.9;
}

.locked-message p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.locked-message .countdown {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f87171;
    font-variant-numeric: tabular-nums;
}

/* ========================================
   Footer
   ======================================== */
.login-footer {
    text-align: center;
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--glass-border);
}

.login-footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }

    .login-header {
        padding: 30px 24px;
    }

    .login-header .logo {
        width: 80px;
        height: 80px;
        border-radius: var(--radius-20);
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .login-form {
        padding: 28px 24px;
    }

}

/* ========================================
   Accessibility
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
.input-wrapper input:focus-visible,
.btn-login:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}
