* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2f0041, #1a0026, #0d0014);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow: hidden;
}

.container {
    background: linear-gradient(135deg, #2f0041, #1a0026, #0d0014);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    box-shadow: none;
    border-radius: 0;
    max-width: none;
}

.header {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    padding: 10px 20px 25px 20px;
    text-align: center;
    position: relative;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 12px 24px rgba(139, 92, 246, 0.18), 0 6px 12px rgba(0, 0, 0, 0.10);
}

.header::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -16px;
    width: 86%;
    height: 24px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.20) 0%, rgba(0, 0, 0, 0.10) 45%, rgba(0, 0, 0, 0) 70%);
    filter: blur(6px);
    border-radius: 50%;
    pointer-events: none;
}

.logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    border-radius: 15px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.3);
    animation: floatLogo 3.5s ease-in-out infinite;
}

.logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.1);
}

@keyframes floatLogo {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

.title {
    color: white;
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 3px;
    line-height: 1.0;
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.0;
}

#loginForm {
    padding: 20px 16px; /* reduce left/right space */
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 3px;
    font-size: 14px;
    line-height: 1.1;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    line-height: 1.2;
}

.form-input:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.7);
    background: rgba(255, 255, 255, 0.2);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-input.error {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.form-input.success {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .form-input {
    padding-right: 45px; /* keep space for password eye on the right */
    padding-left: 48px;  /* add space for left-side icon */
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #a855f7;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 10px;
    padding: 5px 7px;
    line-height: 1;
    pointer-events: none;
}

.password-toggle {
    pointer-events: auto;
    cursor: pointer;
    transition: color 0.3s ease;
}

.password-toggle {
    left: auto;
    right: 15px;
    background: transparent;
    color: #a855f7;
    padding: 0;
}

.password-toggle:hover {
    color: #8b5cf6;
}

.forgot-password {
    text-align: right;
    margin-bottom: 0px;
}

.forgot-password a {
    color: #a855f7;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #8b5cf6;
}

.checkbox-label {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.2;
    flex: 1;
}

.checkbox-label a {
    color: #a855f7;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    line-height: 1.2;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 2px solid rgba(139, 92, 246, 0.4);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(139, 92, 246, 0.7);
}

.icon {
    width: 20px;
    height: 20px;
}

.check-icon {
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #8b5cf6;
}

.info-icon {
    background: #495057;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.register-link {
    text-align: center;
    padding: 0;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.register-link a {
    color: #a855f7;
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #2f0041, #1a0026, #0d0014);
    margin: 25% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
    border: 2px solid rgba(139, 92, 246, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    padding: 15px 20px;
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
}

.modal-header h2 {
    color: white;
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 15px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 12px;
}

.step-number {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.step-text {
    color: #ffffff;
    font-size: 13px;
    line-height: 1.3;
    flex: 1;
}

.modal-footer {
    padding: 15px 25px 20px;
    text-align: center;
    border-top: 2px solid rgba(139, 92, 246, 0.2);
}

.btn-modal {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* Popup Overlay Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: linear-gradient(135deg, #2d1b69 0%, #1e0b4b 100%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: all 0.3s ease;
    position: relative;
}

.popup-overlay.show .popup-content {
    transform: scale(1);
}

.popup-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1.5rem 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.popup-header h3 {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.popup-body {
    padding: 1.2rem;
    text-align: center;
}
.popup-body p { color: #ffffff; }

/* Success popup enhancements (reuse with login) */
.popup-success { overflow: hidden; }
.success-hero { position: relative; height: 120px; background: radial-gradient(80% 100% at 50% 0%, rgba(168, 85, 247, 0.25), rgba(45, 27, 105, 0) 55%); }
.success-circle { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -40%); width: 78px; height: 78px; border-radius: 50%; background: linear-gradient(135deg, #22c55e, #16a34a); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 36px; box-shadow: 0 10px 30px rgba(34, 197, 94, 0.45); }
.success-glow { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -40%); width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(50% 50% at 50% 50%, rgba(34, 197, 94, 0.35) 0%, rgba(34, 197, 94, 0.08) 60%, rgba(0,0,0,0) 70%); filter: blur(2px); }

.popup-footer {
    padding: 1rem 1.5rem 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    border: none;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 15px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* Terms and Conditions Popup Styles */
.terms-content {
    max-height: 60vh;
    overflow-y: auto;
}

.terms-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.last-updated {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0;
}

.terms-section {
    margin-bottom: 1.5rem;
}

.terms-section h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    font-size: 1.2rem;
    display: inline-block;
    width: 24px;
    text-align: center;
}

.terms-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    text-align: justify;
}

/* Privacy Policy Popup Styles */
.privacy-content {
    max-height: 60vh;
    overflow-y: auto;
}

.privacy-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.privacy-section {
    margin-bottom: 1.5rem;
}

.privacy-section h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.privacy-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    text-align: justify;
}

/* Responsive Popup */
@media (max-width: 480px) {
    .popup-content {
        width: 95%;
        margin: 1rem;
    }
    
    .popup-header {
        padding: 1rem 1.2rem 0.6rem;
    }
    
    .popup-header h3 {
        font-size: 1.1rem;
    }
    
    .popup-body {
        padding: 1rem;
    }
    
    .popup-footer {
        padding: 0.8rem 1.2rem 1.2rem;
    }
    
    .btn-primary {
        padding: 0.7rem 1.8rem;
        font-size: 0.9rem;
    }
    
    .terms-content,
    .privacy-content {
        max-height: 50vh;
    }
    
    .terms-section,
    .privacy-section {
        margin-bottom: 1.2rem;
    }
    
    .terms-section h4,
    .privacy-section h4 {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }
    
    .terms-section p,
    .privacy-section p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .section-icon {
        font-size: 1.1rem;
        width: 22px;
    }
}
