:root {
            --primary: #2C3E50;
            --secondary: #34495E;
            --accent: #3498DB;
            --success: #27AE60;
            --warning: #F39C12;
            --danger: #E74C3C;
            --light: #ECF0F1;
            --dark: #2C3E50;
            --text-primary: #2C3E50;
            --text-secondary: #7F8C8D;
            --border: #BDC3C7;
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            --gradient: linear-gradient(135deg, #3498DB, #2C3E50);
            --investment-gradient: linear-gradient(135deg, #27AE60, #3498DB);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: var(--light);
            color: var(--text-primary);
            line-height: 1.6;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
            
        }

        /* Header Styles */
        header {
            background: var(--gradient);
            color: white;
            padding: 15px 0;
            box-shadow: var(--shadow);
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
        }

        .logo {
            display: flex;
            align-items: center;
            font-size: 1.8rem;
            font-weight: 700;
        }

        .logo i {
            margin-right: 10px;
            font-size: 2rem;
            color: var(--success);
        }

        nav ul {
            display: flex;
            list-style: none;
        }

        nav ul li {
            margin-left: 25px;
        }

        nav ul li a {
            color: white;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s;
            font-size: 1rem;
        }

        nav ul li a:hover {
            color: var(--light);
        }

        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            z-index: 101;
        }

        /* Main Content Styles */
        .main-content {
            display: flex;
            flex: 1;
            padding: 40px 0;
            align-items: center;
            
        }

        .right-section {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-top: 30px;
        }

        .welcome-text h1 {
            font-size: 2.5rem;
            margin-bottom: 20px;
            color: var(--primary);
            background: var(--investment-gradient);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .welcome-text p {
            color: var(--text-secondary);
            margin-bottom: 30px;
            font-size: 1.1rem;
        }

        .features {
            margin-top: 30px;
        }

        .feature {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
            padding: 15px;
            background: white;
            border-radius: 8px;
            box-shadow: var(--shadow);
            transition: transform 0.3s;
        }

        .feature:hover {
            transform: translateY(-5px);
        }

        .feature i {
            color: var(--success);
            margin-right: 15px;
            font-size: 1.5rem;
        }

        .stats {
            display: flex;
            margin-top: 30px;
            gap: 20px;
        }

        .stat-item {
            flex: 1;
            text-align: center;
            padding: 15px;
            background: white;
            border-radius: 8px;
            box-shadow: var(--shadow);
        }

        .stat-value {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--success);
        }

        .stat-label {
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        /* Registration Form Styles */
        .register-container {
            background: white;
            border-radius: 10px;
            box-shadow: var(--shadow);
            padding: 40px;
            width: 100%;
            max-width: 500px;
            border-top: 5px solid var(--success);
            
        }

        .register-container h2 {
            text-align: center;
            margin-bottom: 30px;
            color: var(--primary);
            font-size: 1.8rem;
        }

        .form-row {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
        }

        .form-group {
            flex: 1;
            margin-bottom: 20px;
        }

        .form-group.full-width {
            width: 100%;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .form-group input {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid var(--border);
            border-radius: 5px;
            font-size: 1rem;
            transition: border-color 0.3s;
        }

        .form-group input:focus {
            outline: none;
            border-color: var(--accent);
        }

        .password-strength {
            height: 5px;
            background: var(--border);
            border-radius: 5px;
            margin-top: 5px;
            overflow: hidden;
        }

        .password-strength-bar {
            height: 100%;
            width: 0;
            transition: width 0.3s, background-color 0.3s;
        }

        .password-strength.weak .password-strength-bar {
            width: 33%;
            background-color: var(--danger);
        }

        .password-strength.medium .password-strength-bar {
            width: 66%;
            background-color: var(--warning);
        }

        .password-strength.strong .password-strength-bar {
            width: 100%;
            background-color: var(--success);
        }

        .terms-agreement {
            display: flex;
            align-items: flex-start;
            margin: 20px 0;
        }

        .terms-agreement input {
            margin-right: 10px;
            margin-top: 3px;
        }

        .terms-agreement label {
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        .terms-agreement a {
            color: var(--accent);
            text-decoration: none;
        }

        .terms-agreement a:hover {
            text-decoration: underline;
        }

        .register-btn {
            width: 100%;
            padding: 12px;
            background: var(--investment-gradient);
            color: white;
            border: none;
            border-radius: 5px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .register-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        }

        .login-link {
            text-align: center;
            margin-top: 25px;
            color: var(--text-secondary);
        }

        .login-link a {
            color: var(--accent);
            text-decoration: none;
            font-weight: 600;
        }

        .login-link a:hover {
            text-decoration: underline;
        }

        /* Form Messages */
        // Also add this CSS for the original form message to handle HTML
        /* Remove this line: */
// Also add this CSS for the original form message to handle HTML

/* Keep only: */
.form-message.success {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
    text-align: left;
    line-height: 1.5;
}

.form-message.success b {
    color: var(--primary);
    font-weight: 700;
}
        

        .form-message {
            padding: 10px;
            border-radius: 5px;
            margin-bottom: 15px;
            text-align: center;
            display: none;
        }


        .form-message.error {
            background-color: rgba(231, 76, 60, 0.1);
            color: var(--danger);
            border: 1px solid var(--danger);
        }

        .form-message.warning {
            background-color: rgba(243, 156, 18, 0.1);
            color: var(--warning);
            border: 1px solid var(--warning);
        }

        .loading {
            position: relative;
            pointer-events: none;
            opacity: 0.7;
        }

        .loading::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            width: 20px;
            height: 20px;
            margin: -10px 0 0 -10px;
            border: 2px solid #f3f3f3;
            border-top: 2px solid var(--accent);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Footer Styles */
        footer {
            background: var(--primary);
            color: white;
            padding: 40px 0 20px;
            margin-top: auto;
        }

        .footer-content {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
        }

        .footer-section {
            flex: 1;
            min-width: 200px;
            margin-bottom: 30px;
        }

        .footer-section h3 {
            font-size: 1.2rem;
            margin-bottom: 20px;
            position: relative;
            padding-bottom: 10px;
        }

        .footer-section h3::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 40px;
            height: 2px;
            background: var(--accent);
        }

        .footer-section p {
            color: #BDC3C7;
            margin-bottom: 15px;
        }

        .footer-section ul {
            list-style: none;
        }

        .footer-section ul li {
            margin-bottom: 10px;
        }

        .footer-section ul li a {
            color: #BDC3C7;
            text-decoration: none;
            transition: color 0.3s;
        }

        .footer-section ul li a:hover {
            color: white;
        }

        .social-links {
            display: flex;
            gap: 15px;
            margin-top: 20px;
        }

        .social-links a {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--secondary);
            color: white;
            text-decoration: none;
            transition: background 0.3s;
        }

        .social-links a:hover {
            background: var(--accent);
        }

        .footer-bottom {
            text-align: center;
            padding-top: 20px;
            border-top: 1px solid var(--secondary);
            color: #BDC3C7;
            font-size: 0.9rem;
        }

        /* Responsive Styles */
        @media (max-width: 992px) {
            .main-content {
                flex-direction: column;
            }

            .left-section, .right-section {
                padding: 20px;
            }

            .welcome-text h1 {
                font-size: 2rem;
            }
        }

        @media (max-width: 768px) {
            nav ul {
                display: none;
                flex-direction: column;
                position: absolute;
                top: 70px;
                left: 0;
                width: 100%;
                background: var(--primary);
                padding: 20px;
                box-shadow: var(--shadow);
                z-index: 99;
            }

            nav ul.show {
                display: flex;
            }

            nav ul li {
                margin: 10px 0;
            }

            .mobile-menu-btn {
                display: block;
            }

            .footer-section {
                flex: 100%;
            }

            .stats {
                flex-direction: column;
            }

            .form-row {
                flex-direction: column;
                gap: 0;
            }
        }
        /* ========== POPUP MODAL STYLES ========== */

.popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.98);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 15px;
    box-sizing: border-box;
}

.popup-modal.show {
    display: flex !important;
    animation: fadeIn 0.3s ease;
}


.popup-content {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    margin: auto; /* Ensures centering */
    position: relative;
    -webkit-overflow-scrolling: touch; 
}
.popup-header {
    background: linear-gradient(135deg, #27AE60, #3498DB);
    color: white;
    padding: 25px 20px;
    text-align: center;
    position: relative;
}

.popup-header i {
    font-size: 50px;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

.popup-header h3 {
    font-size: clamp(20px, 5vw, 24px);
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
}

.popup-body {
    padding: 25px 20px;
}

.credentials-box {
    background: #F8F9FA;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid #E9ECEF;
}

.credential-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid #E9ECEF;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.credential-item:last-child {
    margin-bottom: 0;
}

.credential-label {
    font-weight: 600;
    color: #64748B;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credential-label i {
    color: #27AE60;
    font-size: 14px;
}



.credential-value {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: var(--primary);
    font-weight: 600;
    padding: 8px 12px;
    background: #F8F9FA;
    border-radius: 6px;
    border: 1px solid #DEE2E6;
    word-break: break-all;
}
.warning-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: 12px;
    color: #92400E;
    font-size: 14px;
    line-height: 1.5;
}

.warning-note i {
    color: #F59E0B;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.warning-note span {
    flex: 1;
}

.popup-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: #F8FAFC;
    border-top: 1px solid #E9ECEF;
    position: sticky;
    bottom: 0;
    background: white;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.03);
}

.copy-btn, .confirm-btn {
    flex: 1;
    padding: 16px 12px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    min-height: 52px; /* Good touch target */
}

.copy-btn {
    background: #34495E;
    color: white;
}

.copy-btn:active {
    background: #2C3E50;
    transform: scale(0.98);
}

.confirm-btn {
    background: #27AE60;
    color: white;
}

.confirm-btn:active {
    background: #219653;
    transform: scale(0.98);
}

.copy-btn i, .confirm-btn i {
    font-size: 18px;
}

/* Copy feedback toast */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2C3E50;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
    white-space: nowrap;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===== MOBILE OPTIMIZATIONS ===== */

/* Small phones (up to 380px) */
@media (max-width: 380px) {
    .popup-modal {
        padding: 10px;
    }
    
    .popup-header {
        padding: 20px 15px;
    }
    
    .popup-header i {
        font-size: 40px;
    }
    
    .popup-body {
        padding: 20px 15px;
    }
    
    .credentials-box {
        padding: 12px;
    }
    
    .credential-item {
        padding: 12px;
    }
    
    .credential-value {
        padding: 10px;
        font-size: 13px;
    }
    
    .popup-footer {
        padding: 15px;
        gap: 8px;
    }
    
    .copy-btn, .confirm-btn {
        padding: 14px 10px;
        font-size: 14px;
        min-height: 48px;
    }
    
    .warning-note {
        padding: 14px;
        font-size: 13px;
    }
}

/* Standard phones (381px - 480px) */
@media (min-width: 381px) and (max-width: 480px) {
    .popup-content {
        border-radius: 18px;
    }
    
    .popup-header {
        padding: 22px 18px;
    }
    
    .popup-body {
        padding: 22px 18px;
    }
}

/* Landscape mode */
@media (max-height: 600px) and (orientation: landscape) {
    .popup-content {
        max-height: 95vh;
    }
    
    .popup-header {
        padding: 15px;
    }
    
    .popup-header i {
        font-size: 30px;
        margin-bottom: 5px;
    }
    
    .popup-header h3 {
        font-size: 18px;
    }
    
    .credentials-box {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .credential-item {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .popup-body {
        padding: 15px;
    }
    
    .popup-footer {
        padding: 12px 15px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .copy-btn:hover, .confirm-btn:hover {
        transform: none;
    }
    
    .credential-value {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Better scrolling */
    .popup-content {
        -webkit-overflow-scrolling: touch;
    }
}

/* Fix for notches and dynamic islands */
@supports (padding: max(0px)) {
    .popup-modal {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
        padding-top: max(15px, env(safe-area-inset-top));
        padding-bottom: max(15px, env(safe-area-inset-bottom));
    }
}

 .form-message {
    
    font-size: 16px;
    display: flex;
    align-items: center;
    
}

.form-message.error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.form-message.success {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.form-message i {
    font-size: 16px;
}

  /* ===== MOBILE RECONSTRUCTION ===== */

@media (max-width:900px){

.main-content{
flex-direction:column;
padding:10px 0;
}

.left-section{
order:2;
padding:20px 15px;
text-align:center;
}

.right-section{
order:1;
padding:20px 15px;
}

.login-container{

max-width:420px;

margin:auto;

padding:30px 22px;

}

.welcome-text{

margin-top:15px;

}

.welcome-text h1{

font-size:1.8rem;

line-height:1.3;

}

.features{

margin-top:20px;

}

.feature{

padding:14px;

border-radius:10px;

}

.stats{

flex-direction:column;

gap:15px;

margin-top:20px;

}

.stat-item{

padding:15px;

}

}

/* ===== PHONE OPTIMIZATION ===== */

@media (max-width:600px){

.container{

padding:0 12px;

}

header{

padding:10px 0;

}

.logo{

font-size:1.3rem;

}

.main-content{

padding:5px 0;

}

.login-container{

width:100%;

padding:25px 18px;

border-radius:14px;

}

.login-container h2{

font-size:1.4rem;

margin-bottom:18px;

}

.form-group{

margin-bottom:15px;

}

.form-group input{

padding:12px;

font-size:16px;

}

.login-btn{

padding:13px;

font-size:1rem;

}

.remember-forgot{

flex-direction:column;

gap:10px;

align-items:flex-start;

}

.social-login{

gap:10px;

margin-top:15px;

}

.social-btn{

width:42px;

height:42px;

}

.feature{

flex-direction:column;

text-align:center;

gap:6px;

}

.feature i{

margin:0;

font-size:1.4rem;

}

.footer-content{

flex-direction:column;

}

.footer-section{

width:100%;

}

}

/* ===== SMALL PHONE FIX ===== */

@media (max-width:420px){

.welcome-text h1{

font-size:1.5rem;

}

.login-container{

padding:22px 15px;

}

.stat-value{

font-size:1.4rem;

}

}

/* ===== FIX OVERFLOW ===== */

body{

overflow-x:hidden;

}

.login-container{

box-sizing:border-box;

}

*{

max-width:100%;

}