/* ============================================
   LOGIN/SIGNUP/PROFILE PAGE STYLES
   ============================================ */

:root {
    --color-dark-bg: #0f172a;
    --color-card-bg: #1a2639;
    --color-primary: #5f5ff0;
    --color-primary-light: #7c7fef;
    --color-accent: #ff2e7e;
    --color-accent-light: #ff5fa8;
    --color-success: #00d084;
    --color-warning: #ffa500;
    --color-text-light: #f1f5f9;
    --color-text-lighter: #a0afc0;
    --color-border: #3a4657;
    --gradient-border: linear-gradient(90deg, #ff2e7e, #5f5ff0, #00d084, #ffa500);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--color-dark-bg);
    color: var(--color-text-light);
    line-height: 1.6;
    overflow: hidden;
}

/* ============================================
   BACKGROUND GRADIENT
   ============================================ */

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 20%, rgba(95, 95, 240, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 46, 126, 0.15) 0%, transparent 50%),
        var(--color-dark-bg);
    z-index: -2;
    pointer-events: none;
}

/* ============================================
   FLOATING ELEMENTS
   ============================================ */

.floating-element {
    position: fixed;
    border-radius: 50%;
    opacity: 0.08;
    z-index: -1;
    pointer-events: none;
}

.float-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #ec4899, #6366f1);
    top: -150px;
    right: -150px;
    animation: float 15s ease-in-out infinite;
}

.float-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #6366f1, #f59e0b);
    bottom: -100px;
    left: -100px;
    animation: float 20s ease-in-out infinite reverse;
}

.float-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    top: 50%;
    right: 10%;
    animation: float 25s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(30px); }
}

/* ============================================
   LOGIN CONTAINER
   ============================================ */

.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ============================================
   LOGIN CARD
   ============================================ */

.login-card {
    width: 100%;
    max-width: 380px;
    background-color: var(--color-card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(95, 95, 240, 0.12),
        0 0 60px rgba(255, 46, 126, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(95, 95, 240, 0.15);
    position: relative;
    animation: cardAppear 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-border {
    height: 3px;
    background: var(--gradient-border);
    background-size: 300% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text-light);
    margin-bottom: 8px;
    text-align: left;
}

.login-subtitle {
    font-size: 12px;
    color: var(--color-text-lighter);
    margin-bottom: 20px;
    text-align: left;
}

/* ============================================
   LOGIN CONTENT WRAPPER
   ============================================ */

.login-content {
    padding: 28px;
}

/* ============================================
   FORM STYLES
   ============================================ */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.confirm-password-group {
    font-size: 0;
    line-height: 0;
}

.confirm-password-group .form-label {
    font-size: 11px;
    line-height: 1.2;
}

.confirm-password-group .input-wrapper,
.confirm-password-group .form-input,
.confirm-password-group .password-toggle,
.confirm-password-group .password-toggle i {
    font-size: 14px;
    line-height: normal;
}

.form-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--color-text-lighter);
    font-size: 16px;
    pointer-events: none;
}

.form-input {
    width: 100%;
    background-color: #243548;
    border: 2px solid #3a4657;
    border-radius: 10px;
    padding: 12px 12px 12px 40px;
    color: var(--color-text-light);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
    box-shadow: 0 2px 8px rgba(95, 95, 240, 0.04);
}

.form-input::placeholder {
    color: var(--color-text-lighter);
}

.form-input:focus {
    background-color: #243548;
    border-color: #5f5ff0;
    box-shadow: 0 0 0 4px rgba(95, 95, 240, 0.15), 0 2px 8px rgba(95, 95, 240, 0.08);
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #5f5ff0;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.password-toggle i {
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #0db5ff;
    transform: scale(1.15);
}

/* ============================================
   FORM OPTIONS
   ============================================ */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    margin-top: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.checkbox-label:hover {
    color: var(--color-text-light);
}

.forgot-password {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--color-success);
}

.form-hint {
    font-size: 11px;
    color: var(--color-text-lighter);
    margin-top: 3px;
}

.form-hint.success {
    color: #10b981;
}

.form-hint.error {
    color: #ef4444;
}

/* ============================================
   LOGIN BUTTON
   ============================================ */

.btn-login {
    background: linear-gradient(135deg, #5f5ff0, #0db5ff);
    border: none;
    color: white;
    padding: 11px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(95, 95, 240, 0.3);
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(95, 95, 240, 0.4), 0 0 20px rgba(13, 181, 255, 0.2);
}

.btn-login:active {
    transform: translateY(-1px);
}

.btn-login:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   SIGNUP/LOGIN LINKS
   ============================================ */

.signup-link {
    text-align: center;
    font-size: 12px;
    color: var(--color-text-lighter);
    margin-top: 12px;
}

.signup-link a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.signup-link a:hover {
    color: #8b5cf6;
}

/* ============================================
   DIVIDER
   ============================================ */

.divider {
    position: relative;
    text-align: center;
    margin: 10px 0 8px;
    font-size: 11px;
    color: var(--color-text-lighter);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background-color: var(--color-border);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* ============================================
   SOCIAL LOGIN
   ============================================ */

.social-login {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.social-btn {
    aspect-ratio: 1;
    background-color: #243548;
    border: 2px solid #3a4657;
    border-radius: 10px;
    color: var(--color-text-light);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.social-btn:hover {
    background-color: #2a4557;
    border-color: #5f5ff0;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(95, 95, 240, 0.2);
}

.social-btn.google { color: #ea4335; }
.social-btn.facebook { color: #1877f2; }
.social-btn.linkedin { color: #0a66c2; }
.social-btn.github { color: #6f42c1; }

/* ============================================
   PROFILE PAGE SPECIFIC
   ============================================ */

.profile-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.profile-card {
    background: linear-gradient(135deg, #1a2639 0%, #243548 100%);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(95, 95, 240, 0.12), 0 0 40px rgba(255, 46, 126, 0.08);
    border: 1px solid rgba(95, 95, 240, 0.1);
}

.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 4px solid #5f5ff0;
    object-fit: cover;
    background: linear-gradient(135deg, #5f5ff0, #0db5ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(95, 95, 240, 0.3);
}

.profile-header h1 {
    font-size: 28px;
    color: #f1f5f9;
    margin: 10px 0 5px;
}

.profile-header p {
    color: #a0afc0;
    font-size: 14px;
}

.profile-section {
    margin-bottom: 30px;
}

.profile-section h3 {
    font-size: 14px;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 600;
}

.profile-info {
    display: grid;
    gap: 15px;
}

.info-item {
    background: #243548;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #3a4657;
}

.info-label {
    font-size: 12px;
    color: #a0afc0;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.info-value {
    font-size: 16px;
    color: #f1f5f9;
    font-weight: 500;
}

.profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #3a4657;
}

.btn-action {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-edit {
    background: linear-gradient(135deg, #5f5ff0, #0db5ff);
    color: white;
    border: 1px solid rgba(95, 95, 240, 0.3);
}

.btn-edit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(95, 95, 240, 0.3), 0 0 16px rgba(13, 181, 255, 0.2);
}

.btn-back {
    background: #243548;
    color: #f1f5f9;
    border: 1px solid #3a4657;
}

.btn-back:hover {
    background: #2a4557;
    color: #f1f5f9;
}

.btn-logout {
    grid-column: 1 / -1;
    background: rgba(239, 68, 68, 0.15);
    color: #ff7a7a;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #1a2639;
    padding: 30px;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    border: 2px solid #5f5ff0;
    box-shadow: 0 20px 60px rgba(95, 95, 240, 0.2);
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #f1f5f9;
    margin-bottom: 20px;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.btn-modal {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-save {
    background: linear-gradient(135deg, #5f5ff0, #0db5ff);
    color: #ffffff;
    font-weight: 600;

}

.btn-save:hover {
    box-shadow: 0 6px 16px rgba(95, 95, 240, 0.3);
}

.btn-cancel {
    background: #243548;
    color: #f1f5f9;
}

.notification {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    animation: slideIn 0.3s ease;
}

.notification.show {
    display: block;
}

.notification.success {
    background: linear-gradient(135deg, rgba(0, 208, 132, 0.12), rgba(0, 208, 132, 0.05));
    color: #00d084;
    border: 1px solid rgba(0, 208, 132, 0.3);
}

.notification.error {
    background: linear-gradient(135deg, rgba(255, 56, 96, 0.12), rgba(255, 56, 96, 0.05));
    color: #ff3860;
    border: 1px solid rgba(255, 56, 96, 0.3);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   BRAND LOGO
   ============================================ */

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #5f5ff0, #ff2e7e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(95, 95, 240, 0.35), 0 0 10px rgba(255, 46, 126, 0.15);
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-light);
    letter-spacing: 0.3px;
}

/* ============================================
   INPUT VALIDATION STATES
   ============================================ */

.form-input.input-error {
    border-color: #ff7a7a;
    background-color: rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-input.input-valid {
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* ============================================
   INLINE FIELD ERROR MESSAGE
   ============================================ */

.field-error-msg {
    display: block;
    font-size: 11px;
    color: #ef4444;
    margin-top: 4px;
    min-height: 16px;
    padding-left: 2px;
    transition: var(--transition);
}

.field-error-msg:empty {
    margin-top: 0;
    min-height: 0;
}

/* ============================================
   UNLOCK CODE SECTION
   ============================================ */

.unlock-code-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lock-alert {
    background: linear-gradient(135deg, rgba(255, 56, 96, 0.2), rgba(255, 56, 96, 0.1));
    border: 2px solid rgba(255, 56, 96, 0.4);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.lock-alert .lock-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.lock-alert h3 {
    color: #ff7a7a;
    font-size: 18px;
    margin-bottom: 8px;
}

.lock-alert p {
    color: var(--color-text-lighter);
    font-size: 13px;
    margin-bottom: 5px;
}

.lock-alert .email-sent {
    color: #00d084;
    font-weight: 500;
}

.lock-alert .email-sent i {
    margin-right: 5px;
}

.lock-alert .email-not-sent {
    color: #ffa500;
}

.lock-alert .email-not-sent i {
    margin-right: 5px;
}

.unlock-input {
    background: rgba(95, 95, 240, 0.1) !important;
    border-color: rgba(95, 95, 240, 0.3) !important;
}

.unlock-input:focus-within {
    border-color: #5f5ff0 !important;
    box-shadow: 0 0 20px rgba(95, 95, 240, 0.3) !important;
}

.unlock-input input {
    text-align: center;
    font-size: 24px !important;
    font-weight: 700;
    letter-spacing: 8px;
    font-family: monospace;
}

#verifyUnlockBtn {
    background: linear-gradient(135deg, #5f5ff0, #00d084);
    margin-bottom: 10px;
    box-shadow: 0 4px 16px rgba(95, 95, 240, 0.3);
}

#verifyUnlockBtn:hover {
    background: linear-gradient(135deg, #7c7fef, #2fffc2);
    box-shadow: 0 6px 24px rgba(95, 95, 240, 0.35), 0 0 20px rgba(0, 208, 132, 0.2);
}

.btn-back {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-lighter);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back:hover {
    border-color: var(--color-primary);
    color: var(--color-text-light);
}

.btn-back i {
    margin-right: 8px;
}

/* Light mode for unlock section */
.light-mode .lock-alert {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
}

.light-mode .lock-alert h3 {
    color: #ef4444;
}

.light-mode .lock-alert p {
    color: #475569;
}

.light-mode .unlock-input {
    background: rgba(99, 102, 241, 0.08) !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    .login-card {
        max-width: 100%;
        max-height: 100%;
        border-radius: 12px;
    }
    
    .login-content {
        padding: 20px;
        min-height: auto;
    }
    
    .login-title {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .login-subtitle {
        font-size: 11px;
        margin-bottom: 14px;
    }
    
    .login-form {
        gap: 10px;
    }
    
    .login-form > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    
    .form-input {
        padding: 9px 8px 9px 32px;
        font-size: 12px;
    }
    
    .form-options {
        font-size: 10px;
    }
    
    .btn-login {
        padding: 9px 16px;
        font-size: 12px;
        margin-top: 3px;
    }
    
    .divider {
        font-size: 9px;
        margin: 10px 0 8px;
    }
    
    .social-login {
        gap: 10px;
    }
    
    .float-1, .float-2, .float-3 {
        display: none;
    }
    
    .profile-card {
        padding: 25px;
    }
    
    .profile-header h1 {
        font-size: 22px;
    }
    
    .profile-actions {
        grid-template-columns: 1fr;
    }
}
