:root {
    --bg-color: #0d0f19;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 23, 42, 0.6);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: #6366f1;
    --shape-1: #8b5cf6;
    --shape-2: #3b82f6;
    --shape-3: #ec4899;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }

body { background-color: var(--bg-color); color: var(--text-main); min-height: 100vh; width: 100vw; display: flex; justify-content: center; align-items: center; position: relative; overflow: hidden; margin: 0; padding: 0; }

.background-content { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; transition: background 0.5s ease; background-size: cover; background-position: center; background-color: var(--bg-color); }

.background-shapes { position: absolute; width: 100%; height: 100%; top: 0; left: 0; overflow: hidden; filter: blur(80px); transition: opacity 0.5s ease; }

.shape { position: absolute; border-radius: 50%; animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1); opacity: 0.6; }
.shape-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: radial-gradient(circle, var(--shape-1) 0%, transparent 60%); animation-delay: 0s; }
.shape-2 { bottom: -20%; right: -10%; width: 45vw; height: 45vw; background: radial-gradient(circle, var(--shape-2) 0%, transparent 60%); animation-delay: -5s; }
.shape-3 { top: 40%; left: 40%; width: 35vw; height: 35vw; background: radial-gradient(circle, var(--shape-3) 0%, transparent 60%); animation-delay: -10s; }

@keyframes float { 0% { transform: translate(0, 0) scale(1); } 33% { transform: translate(10%, -15%) scale(1.1); } 66% { transform: translate(-15%, 10%) scale(0.9); } 100% { transform: translate(0, 0) scale(1); } }

.login-container { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 100%; max-width: 420px; padding: 2.5rem; background: var(--card-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--card-border); border-radius: 24px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); z-index: 10; animation: slideUpCenter 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes slideUpCenter { from { opacity: 0; transform: translate(-50%, calc(-50% + 40px)); } to { opacity: 1; transform: translate(-50%, -50%); } }

.login-header { text-align: center; margin-bottom: 2rem; }
.logo { max-height: 60px; margin-bottom: 1rem; object-fit: contain; border-radius: 8px; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.login-header h2 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; background: linear-gradient(to right, #fff, #cbd5e1); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.login-header p { color: var(--text-muted); font-size: 0.95rem; }

.login-form { display: flex; flex-direction: column; gap: 1.25rem; }
.input-group { display: flex; flex-direction: column; gap: 0.5rem; }
.input-group label { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); margin-left: 0.2rem; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 1rem; color: var(--text-muted); transition: color 0.3s ease; }
.input-wrapper input { width: 100%; padding: 0.875rem 1rem 0.875rem 3rem; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 12px; color: var(--text-main); font-size: 1rem; outline: none; transition: all 0.3s ease; }
.input-wrapper input::placeholder { color: rgba(148, 163, 184, 0.5); }
.input-wrapper input:focus { border-color: var(--input-focus); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15); background: rgba(15, 23, 42, 0.8); }
.input-wrapper input:focus + .input-icon, .input-wrapper input:focus ~ .input-icon, .input-wrapper:focus-within .input-icon { color: var(--input-focus); }

.toggle-password { position: absolute; right: 1rem; background: none; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0.2rem; transition: color 0.3s ease; }
.toggle-password:hover { color: var(--text-main); }
.form-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 0.25rem; font-size: 0.9rem; }
.remember-me { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; color: var(--text-muted); user-select: none; }
.remember-me input { display: none; }
.checkmark { width: 18px; height: 18px; border: 1px solid var(--input-border); border-radius: 4px; background: var(--input-bg); position: relative; transition: all 0.2s ease; }
.remember-me input:checked ~ .checkmark { background: var(--primary); border-color: var(--primary); }
.remember-me input:checked ~ .checkmark::after { content: ''; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.forgot-password { color: var(--primary); text-decoration: none; font-weight: 500; transition: color 0.3s ease; }
.forgot-password:hover { color: var(--primary-hover); text-decoration: underline; }

.btn-login { margin-top: 0.5rem; padding: 0.875rem; border: none; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--shape-1)); color: white; font-size: 1rem; font-weight: 600; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 0.5rem; transition: all 0.3s ease; position: relative; overflow: hidden; }
.btn-login::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: transform 0.5s ease; }
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -10px var(--primary); }
.btn-login:hover::before { transform: translateX(200%); }
.btn-login:active { transform: translateY(0); }
.btn-login svg { transition: transform 0.3s ease; }
.btn-login:hover svg { transform: translateX(4px); }

/* --- Panel & Settings --- */
.settings-toggle { display: none !important; }
.settings-toggle:hover { background: var(--primary); transform: rotate(45deg); }

.customization-panel { position: fixed; bottom: 80px; right: 20px; width: 340px; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--card-border); border-radius: 16px; padding: 1.5rem; z-index: 100; transform: translateX(120%); opacity: 0; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 15px 40px rgba(0,0,0,0.6); }
.customization-panel.active { transform: translateX(0); opacity: 1; }

.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; border-bottom: 1px solid var(--card-border); padding-bottom: 0.75rem; }
.panel-header h3 { font-size: 1.1rem; font-weight: 600; }
.close-panel { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; transition: color 0.2s; }
.close-panel:hover { color: white; }

.setting-group { margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; }
.setting-group label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.setting-group select { width: 100%; padding: 0.75rem; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--card-border); border-radius: 8px; color: var(--text-main); outline: none; cursor: pointer; font-family: inherit; font-size: 0.9rem; }
.setting-group select option { background: #0f172a; color: white; }

.file-input { display: none; }
.file-label, .btn-secondary { display: block; text-align: center; padding: 0.75rem; background: rgba(255, 255, 255, 0.05); border: 1px dashed rgba(255, 255, 255, 0.2); border-radius: 8px; cursor: pointer; font-size: 0.9rem; transition: all 0.3s; color: var(--text-main); font-weight: 500; }
.btn-secondary { border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.02); margin-top: 0.5rem; }
.file-label:hover, .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.4); }

.setting-group input[type="color"] { width: 100%; height: 40px; border: none; border-radius: 8px; cursor: pointer; background: none; padding: 0; }
.setting-group input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.setting-group input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; }

@media (max-width: 480px) { .login-container { padding: 2rem 1.5rem; border-radius: 20px; width: 90%; } .customization-panel { width: calc(100% - 40px); right: 20px; } }
