@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --white: #FFFFFF;
    --black: #1F2937;
    --gray-light: #E5E7EB;
    --gray-medium: #9CA3AF;
    --gray-dark: #4B5563;
    --green: #10B981;
    --yellow: #F59E0B;
    --red: #EF4444;
    --blue: #3B82F6;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* Light theme */
body.light-theme {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%) !important;
}

body.light-theme #plasma-background {
    display: none;
}

body.light-theme .login-card {
    background: var(--white);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-light);
}

body.light-theme .login-card:hover {
    box-shadow: var(--shadow-hover);
}

body.light-theme .logo-section h1 {
    color: var(--black);
    background: var(--black);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: none;
    animation: none;
}

body.light-theme .subtitle {
    color: var(--gray-medium);
    text-shadow: none;
}

body.light-theme .form-group label {
    color: var(--black);
}

body.light-theme .form-group input {
    border-color: var(--gray-light);
    color: var(--black);
    background: var(--white);
}

body.light-theme .form-group input:focus {
    border-color: var(--blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

body.light-theme .form-group input::placeholder {
    color: var(--gray-medium);
}

body.light-theme .checkbox-label span {
    color: var(--gray-dark);
}

body.light-theme .divider {
    background: var(--gray-light);
}

body.light-theme .info-text {
    color: var(--gray-medium);
}

body.light-theme .logo-section::before {
    display: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--black);
    overflow: hidden;
}

/* RippleGrid Background Container */
#plasma-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
}

#plasma-background canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.login-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    z-index: 10;
}

.login-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.login-card:hover {
    box-shadow: 0 8px 48px 0 rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.logo-section::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    z-index: -1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.1);
    }
}

.logo-section h1 {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 8px;
    display: inline-block;
    position: relative;
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.15),
                 0 2px 10px rgba(0, 0, 0, 0.4);
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.1));
}

.logo-seven {
    font-size: 58px;
    font-weight: 900;
    background: linear-gradient(180deg, #FF8C00 0%, #FF7F00 15%, #FF6B35 35%, #FF4500 60%, #DC143C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 2px;
    filter: drop-shadow(0 2px 4px rgba(255, 69, 0, 0.2));
}

body.light-theme .logo-seven {
    background: linear-gradient(180deg, #FF8C00 0%, #FF7F00 15%, #FF6B35 35%, #FF4500 60%, #DC143C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 3px rgba(220, 20, 60, 0.2));
}

body.light-theme .logo-section h1 {
    color: var(--black);
    text-shadow: none;
    filter: none;
}

.subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.error-message {
    background: #FEE2E2;
    border: 1px solid #FCA5A5;
    color: var(--red);
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

.error-message::before {
    content: '⚠';
    font-size: 18px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: inherit;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-options {
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--green);
}

.checkbox-label span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.btn-login {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--green) 0%, #059669 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.3px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.info-section {
    margin-top: 32px;
}

.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

.info-text {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.login-footer {
    text-align: center;
    padding: 20px;
}

.login-footer p {
    font-size: 13px;
    color: var(--gray-medium);
}

/* Responsive */
@media (max-width: 640px) {
    .login-card {
        padding: 36px 28px;
    }

    .logo-section h1 {
        font-size: 32px;
    }

    .form-group input {
        padding: 12px 14px;
    }

    .btn-login {
        padding: 14px;
        font-size: 15px;
    }
}

/* Success animation */
@keyframes successPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.btn-login.success {
    animation: successPulse 0.6s;
}


/* Theme Toggle Button on Login Page */
.theme-toggle-login {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

.theme-toggle-login:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 48px 0 rgba(0, 0, 0, 0.3),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
}

.theme-toggle-login:active {
    transform: scale(0.98);
}

.theme-icon {
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.4s ease;
}

.theme-icon.hidden {
    display: none;
}

.theme-toggle-login:hover .theme-icon {
    transform: rotate(20deg);
    color: rgba(255, 255, 255, 1);
}

/* Light theme button styling */
body.light-theme .theme-toggle-login {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 0 rgba(255, 255, 255, 1);
}

body.light-theme .theme-toggle-login:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12),
                inset 0 1px 0 0 rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

body.light-theme .theme-icon {
    color: rgba(0, 0, 0, 0.7);
}

body.light-theme .theme-toggle-login:hover .theme-icon {
    color: rgba(0, 0, 0, 0.9);
}

/* Hide ripple background container when not needed */
.ripple-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
}

.ripple-background canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ColorBends Background for Light Theme */
.color-bends-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
}

.color-bends-background canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.color-bends-background.hidden {
    display: none;
}

/* Hide RippleGrid in light theme */
body.light-theme .ripple-background {
    display: none;
}

/* Dark Theme Improvements */
body.dark-theme {
    background: #0a0a0a;
}

body.dark-theme .login-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.dark-theme .login-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

body.dark-theme .form-group label {
    color: rgba(255, 255, 255, 0.95) !important;
}

body.dark-theme .form-group input {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

body.dark-theme .form-group input:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

body.dark-theme .checkbox-label span {
    color: rgba(255, 255, 255, 0.85);
}

body.dark-theme .subtitle {
    color: rgba(255, 255, 255, 0.85);
}

body.dark-theme .divider {
    background: rgba(255, 255, 255, 0.15);
}

body.dark-theme .info-text {
    color: rgba(255, 255, 255, 0.65);
}

body.dark-theme .error-message {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
}

body.dark-theme .theme-toggle-login {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-theme .theme-toggle-login:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

body.dark-theme .theme-icon {
    color: rgba(255, 255, 255, 0.9);
}
