/* Login Screen Modern Glass UI */

:root {
    /* Dark Glass Theme Colors */
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --bg-glass: rgba(255, 255, 255, 0.08);
    --bg-glass-hover: rgba(255, 255, 255, 0.12);
    
    /* Text Colors - More Readable */
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --text-accent: #667eea;
    
    /* Accent Colors */
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --accent-success: #10b981;
    --accent-danger: #ef4444;
    
    /* Glass Effects */
    --glass-border: 1px solid rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --glass-blur: blur(20px);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    
    /* Animations */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
}

/* Login Page Layout */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    padding: 2rem;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(-5px) rotate(-1deg); }
}

/* Login Container */
.login-container {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 2rem;
    padding: 1.75rem 2rem 2rem 2rem;
    box-shadow: var(--glass-shadow);
    width: 100%;
    max-width: 450px;
    min-height: 480px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* Logo Section */
.logo {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding: 0;
}

.login-logo {
    /* Display the full logo without cropping */
    width: 100%;                /* take full available width of parent */
    max-width: 300px;           /* slightly larger for better prominence */
    height: auto;               /* auto height to preserve aspect ratio */
    object-fit: contain;        /* ensure entire logo is visible */
    object-position: center;
    padding: 0;
    filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.3));
    transition: var(--transition-smooth);
}

.login-logo:hover {
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.5));
    transform: scale(1.05);
}

.logo h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
    margin: 0;
}

.logo p {
    font-size: 1.1rem;          /* increase to stand out relative to form labels */
    color: var(--text-secondary);
    font-weight: 400;
    opacity: 0.9;
    margin-top: 0;
    margin-bottom: 1.25rem;     /* push tagline away from login form */
}

/* Form Styles */
#loginForm,
#twofaForm {
    width: 100%;
}

#loginForm {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.025em;
}

.form-group input {
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

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

.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(102, 126, 234, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

/* Login Button */
.btn {
    background: var(--gradient-primary);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.25rem 2rem;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

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

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

.btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6b4fa3 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(102, 126, 234, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(102, 126, 234, 0.3);
}

.btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn i {
    font-size: 1.2rem;
}

/* Message Styles */
#loginMessage {
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

#loginMessage.message.success {
    background: rgba(16, 185, 129, 0.15);
    color: #86efac;
    border-color: rgba(16, 185, 129, 0.3);
}

#loginMessage.message.error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.mt-4 {
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-page {
        padding: 1rem;
        padding-bottom: 80px; /* Footer badge için alan bırak */
    }
    
    .login-container {
        padding: 2rem;
        border-radius: 1.5rem;
        max-width: 400px;
    }
    
    .logo-section {
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .login-logo {
        width: 100%;
        max-width: 200px;
        height: auto;
        object-fit: contain;
    }

    .logo h1 {
        font-size: 1.75rem;
    }
    
    .form-group input {
        padding: 0.875rem 1rem;
    }
    
    .btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .twofa-code-input {
        font-size: 1.3rem;
        letter-spacing: 0.4rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1.5rem;
        border-radius: 1.25rem;
    }
    
    .logo-section {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .login-logo {
        width: 100%;
        max-width: 180px;
        height: auto;
        object-fit: contain;
    }

    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .form-group input {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }

    .twofa-code-input {
        font-size: 1.2rem;
        letter-spacing: 0.3rem;
    }

    .twofa-icon {
        width: 3rem;
        height: 3rem;
    }

    .twofa-icon i {
        font-size: 1.3rem;
    }

    .twofa-header h3 {
        font-size: 1rem;
    }

    .btn-back {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* 2FA Form Styles */
.twofa-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.twofa-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.twofa-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.35);
}

.twofa-icon i {
    font-size: 1.6rem;
    color: #fff;
}

.twofa-header h3 {
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
}

.twofa-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

.twofa-code-input {
    text-align: center;
    font-size: 1.6rem;
    letter-spacing: 0.5rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.btn-verify {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3), 0 0 20px rgba(16, 185, 129, 0.15);
    margin-top: 0.25rem;
}

.btn-verify:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4), 0 0 30px rgba(16, 185, 129, 0.25);
}

.btn-back {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    box-shadow: none;
    margin-top: 0;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.btn-back::before {
    display: none;
}

/* 2FA message styles */
#twofaMessage {
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

#twofaMessage.message.success {
    background: rgba(16, 185, 129, 0.15);
    color: #86efac;
    border-color: rgba(16, 185, 129, 0.3);
}

#twofaMessage.message.error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Loading Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Focus Styles for Accessibility */
.btn:focus-visible,
.form-group input:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #ffffff;
        --glass-border: 2px solid rgba(255, 255, 255, 0.3);
    }
    
    .login-container {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .form-group input {
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.2);
    }
}

/* Footer Badge - Apple Style */
.footer-badge {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
}

.footer-badge-content {
    background: linear-gradient(145deg, 
        rgba(30, 41, 59, 0.9), 
        rgba(51, 65, 85, 0.85)
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 25px;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(226, 232, 240, 0.9);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(102, 126, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    white-space: nowrap;
}

.footer-badge-content i {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.85rem;
    animation: codeIconPulse 3s ease-in-out infinite;
}

@keyframes codeIconPulse {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.15);
        filter: brightness(1.2);
    }
}

.footer-badge:hover .footer-badge-content {
    background: linear-gradient(145deg, 
        rgba(30, 41, 59, 0.95), 
        rgba(51, 65, 85, 0.9)
    );
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 6px 20px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(102, 126, 234, 0.5);
}

.footer-badge:hover .footer-badge-content i {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 🔧 FIX: Mobile Responsive Footer Badge for Loginscreen */
@media (max-width: 768px) {
    .footer-badge {
        bottom: 15px;
        left: 10px;
        right: 10px;
        transform: none;
        width: calc(100% - 20px);
    }
    
    .footer-badge-content {
        padding: 8px 16px;
        font-size: 0.7rem;
        border-radius: 20px;
        justify-content: center;
        text-align: center;
    }
    
    .footer-badge-content span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding-bottom: 70px; /* Footer badge için alan bırak */
    }
    
    .footer-badge {
        bottom: 10px;
        left: 5px;
        right: 5px;
        width: calc(100% - 10px);
    }
    
    .footer-badge-content {
        padding: 6px 12px;
        font-size: 0.65rem;
        gap: 6px;
    }
    
    .footer-badge-content span {
        font-size: 0.6rem;
    }
    
    .footer-badge-content i {
        font-size: 0.7rem;
    }
} 