/* Modern Dark Professional Login Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --success: #10b981;
    --error: #ef4444;
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-surface-light: #334155;
    --dark-border: #475569;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --glass-dark: rgba(30, 41, 59, 0.8);
    --glass-dark-strong: rgba(30, 41, 59, 0.95);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.4);
    --shadow-glow-accent: 0 0 40px rgba(139, 92, 246, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    background-size: 200% 200%;
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animated Background Elements */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
    z-index: 0;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

body::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 12s ease-in-out infinite;
    z-index: 0;
    filter: blur(80px);
}

@keyframes pulse {
    0%, 100% { transform: scale(1) translateY(0); opacity: 0.5; }
    50% { transform: scale(1.4) translateY(-40px); opacity: 0.8; }
}

/* Grid Pattern Overlay */
body {
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Main Container */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    display: flex;
    gap: 60px;
    align-items: center;
    justify-content: center;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left Side - Branding */
.login-branding {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 60px;
    max-width: 500px;
}

.branding-logo {
    margin-bottom: 40px;
    position: relative;
    animation: logoEntrance 1.2s ease-out;
}

@keyframes logoEntrance {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.logo-image {
    width: 280px;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(59, 130, 246, 0.4));
    animation: logoFloat 4s ease-in-out infinite;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-image:hover {
    transform: scale(1.08) translateY(-5px);
    filter: drop-shadow(0 12px 32px rgba(59, 130, 246, 0.6));
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.branding-title {
    font-size: 3.75em;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.branding-subtitle {
    font-size: 1.3em;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 50px;
    line-height: 1.6;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--glass-dark);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 18px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.feature-item:hover {
    transform: translateX(10px) translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(30, 41, 59, 0.9);
}

.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 16px;
    font-size: 26px;
    color: var(--text-primary);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(59, 130, 246, 0.4);
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover .feature-icon {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(59, 130, 246, 0.6);
}

.feature-text {
    flex: 1;
    font-size: 1.05em;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.5;
}

.feature-item:hover .feature-text {
    color: var(--text-primary);
}

/* Right Side - Login Form */
.login-form-container {
    flex: 1;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.login-box {
    background: var(--glass-dark-strong);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 28px;
    padding: 56px 48px;
    box-shadow: 
        var(--shadow-2xl),
        0 0 0 1px rgba(59, 130, 246, 0.1) inset,
        0 0 60px rgba(59, 130, 246, 0.2);
    position: relative;
    overflow: hidden;
    animation: boxEntrance 1s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes boxEntrance {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%);
    background-size: 200% 100%;
    border-radius: 28px 28px 0 0;
    animation: gradientFlow 3s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-box::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.login-title {
    font-size: 2.25em;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 1em;
    color: var(--text-secondary);
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 18px 56px 18px 20px;
    background: var(--dark-surface);
    border: 2px solid var(--dark-border);
    border-radius: 14px;
    font-size: 15px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: var(--shadow-sm);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    background: var(--dark-surface-light);
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.2),
        var(--shadow-md),
        0 0 20px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.input-wrapper input:focus + .input-icon {
    color: var(--primary);
    transform: scale(1.1);
}

.input-icon {
    position: absolute;
    right: 20px;
    color: var(--text-muted);
    font-size: 20px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-password {
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.toggle-password:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.2);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.forgot-password-link {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    user-select: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

.remember-me:hover {
    color: var(--text-primary);
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.login-btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        var(--shadow-md),
        0 0 0 0 rgba(59, 130, 246, 0.4);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:hover::before {
    width: 400px;
    height: 400px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        var(--shadow-lg),
        0 0 0 8px rgba(59, 130, 246, 0.2),
        var(--shadow-glow);
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.error-message {
    padding: 16px 20px;
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid rgba(239, 68, 68, 0.4);
    border-radius: 14px;
    color: #fca5a5;
    font-size: 14px;
    text-align: center;
    display: none;
    animation: shake 0.5s ease;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Developer Credit */
.developer-credit {
    margin-top: 24px;
    text-align: center;
    width: 100%;
    z-index: 20;
    pointer-events: none;
}

.developer-credit p {
    font-size: 13px;
    color: var(--primary-light);
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
}

.developer-credit strong {
    color: var(--primary);
    font-weight: 600;
}

/* Loading State */
.login-btn.loading {
    pointer-events: none;
}

.login-btn.loading .btn-content::after {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .login-branding {
        padding: 40px;
        align-items: center;
        text-align: center;
        max-width: 100%;
    }
    
    .branding-title {
        font-size: 3em;
    }
    
    .login-form-container {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .login-box {
        padding: 40px 32px;
        border-radius: 24px;
    }
    
    .logo-image {
        width: 220px;
    }
    
    .branding-title {
        font-size: 2.5em;
    }
    
    .login-title {
        font-size: 1.875em;
    }
    
    .login-branding {
        padding: 30px;
    }
    
    .feature-item {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 32px 24px;
        border-radius: 20px;
    }
    
    .logo-image {
        width: 180px;
    }
    
    .branding-title {
        font-size: 2em;
    }
    
    .feature-item {
        padding: 18px;
        gap: 16px;
    }
    
    .feature-icon {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }
    
    .input-wrapper input {
        padding: 16px 48px 16px 18px;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
}

.modal-content {
    position: relative;
    z-index: 1001;
    background: var(--glass-dark-strong);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 28px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-2xl);
    animation: modalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.modal-close:hover {
    background: rgba(59, 130, 246, 0.2);
    color: var(--text-primary);
}

.modal-body {
    margin-bottom: 24px;
}

.modal-body p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.email-contact {
    margin: 20px 0;
    padding: 20px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 14px;
    text-align: center;
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.email-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.modal-note {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 16px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--dark-surface);
    border: 2px solid var(--dark-border);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-secondary:hover {
    background: var(--dark-surface-light);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

/* Mobile Modal Adjustments */
@media (max-width: 480px) {
    .modal-content {
        padding: 24px;
        width: 95%;
        border-radius: 24px;
    }
    
    .modal-header h2 {
        font-size: 1.25em;
    }
}
