/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
}

:root {
    /* Professional Royal Blue Banking Palette */
    --royal-blue-dark: #0a2540;
    --royal-blue: #1a3a6c;
    --royal-blue-light: #2b4b8f;
    --royal-blue-accent: #3a6b9b;
    --gold: #d4af37;
    --gold-light: #f5e6a3;
    --gold-dark: #b8960c;
    --white: #ffffff;
    --gray-50: #f8f9fc;
    --gray-100: #f1f3f8;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 36px rgba(0, 0, 0, 0.15);
    --shadow-focus: 0 0 0 3px rgba(26, 58, 108, 0.2);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    color: var(--gray-800);
    line-height: 1.5;
    min-height: 100vh;
}

/* Layout */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ========== NAVIGATION BAR ========== */
.navbar {
    background: linear-gradient(135deg, var(--royal-blue-dark) 0%, var(--royal-blue) 100%);
    padding: 12px 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo img {
    max-height: 50px;
    width: auto;
    border-radius: 12px;
    transition: transform 0.2s;
}

.nav-logo img:hover {
    transform: scale(1.02);
}

.nav-menu {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all 0.2s;
    padding: 8px 0;
    position: relative;
}

.nav-link:hover {
    color: var(--gold-light);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.2s;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hamburger Menu (Mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: 0.3s;
    border-radius: 2px;
}

/* Sections */
.section {
    display: none;
    padding: 40px 0;
    min-height: calc(100vh - 74px);
}

.section.active {
    display: block;
}

/* Hero Section (Bank-style welcome) */
.hero {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, var(--royal-blue) 0%, var(--royal-blue-dark) 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 32px;
    opacity: 0.9;
}

/* Forms (Banking style) */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 28px;
    color: var(--royal-blue);
    font-weight: 700;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: all 0.2s;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--royal-blue);
    box-shadow: var(--shadow-focus);
    outline: none;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
}

.form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--royal-blue);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
    color: var(--gold-dark);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--royal-blue) 0%, var(--royal-blue-light) 100%);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--royal-blue-light) 0%, var(--royal-blue) 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--gray-600);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Dashboard Components (Bank-like cards) */
.dashboard-welcome,
.bank-details-container,
.referral-upline-container,
.community-container,
.wallet-container,
.investment-summary,
.packages-container,
.transactions-container,
.admin-controls,
.withdrawal-management,
.pending-investments-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: box-shadow 0.2s;
}

.dashboard-welcome:hover,
.bank-details-container:hover,
.wallet-container:hover,
.packages-container:hover {
    box-shadow: var(--shadow-lg);
}

.dashboard-welcome {
    padding: 24px;
}

.dashboard-welcome p {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

/* Wallet Section */
.wallet-container {
    padding: 24px;
}

.wallet-container h3 {
    color: var(--royal-blue);
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 700;
}

.wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.wallet-item {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    border: 1px solid var(--gray-200);
    transition: transform 0.2s;
}

.wallet-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--royal-blue-accent);
}

.wallet-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-600);
    margin-bottom: 12px;
    font-weight: 600;
}

.wallet-amount {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--royal-blue);
    margin-bottom: 20px;
}

/* Investment Summary */
.investment-summary {
    padding: 20px;
}

.investment-summary h4 {
    color: var(--royal-blue);
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.summary-item {
    text-align: center;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.summary-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--royal-blue);
    margin-bottom: 8px;
}

.summary-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    text-transform: uppercase;
    font-weight: 600;
}

/* Packages Section */
.packages-container {
    padding: 24px;
}

.packages-container h3 {
    color: var(--royal-blue);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.package-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.package-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--royal-blue-accent);
}

.package-card h4 {
    color: var(--royal-blue);
    font-size: 1.25rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.package-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.package-return {
    color: var(--gold-dark);
    font-weight: 700;
    margin-bottom: 8px;
}

.package-duration {
    color: var(--gray-600);
    margin-bottom: 16px;
}

.package-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.status-available {
    background: #e6f7e6;
    color: var(--success);
}

.status-unavailable {
    background: #ffe6e6;
    color: var(--danger);
}

/* Investment Items */
.investment-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.investment-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--royal-blue), var(--gold));
}

.investment-item:hover {
    box-shadow: var(--shadow-md);
}

.investment-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.investment-details div {
    background: var(--gray-50);
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.investment-details strong {
    color: var(--royal-blue);
}

.package-status {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.package-status.active {
    background: #e3f2fd;
    color: var(--royal-blue);
}

.package-status.completed {
    background: #d4edda;
    color: var(--success);
}

.package-status.pending {
    background: #fff3cd;
    color: var(--warning);
}

/* Transactions */
.transactions-container {
    padding: 24px;
}

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.transactions-header h3 {
    color: var(--royal-blue);
    font-size: 1.3rem;
}

.transactions-toggle-btn {
    background: none;
    border: 1px solid var(--gray-300);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.transactions-toggle-btn:hover {
    background: var(--gray-100);
}

.collapsible-transactions {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s;
}

.transaction-item {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.transaction-details {
    flex: 1;
}

.transaction-type {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.transaction-amount {
    font-weight: 800;
    font-size: 1.1rem;
}

.transaction-amount.credit {
    color: var(--success);
}

.transaction-amount.debit {
    color: var(--danger);
}

.transaction-info {
    text-align: right;
}

.transaction-date {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.transaction-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 4px;
}

.transaction-status.completed {
    background: #d4edda;
    color: var(--success);
}

.transaction-status.pending {
    background: #fff3cd;
    color: var(--warning);
}

/* Admin Dashboard */
.admin-controls {
    padding: 24px;
}

.user-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}

.user-item:hover {
    box-shadow: var(--shadow-md);
}

.user-info {
    margin-bottom: 16px;
}

.user-details small {
    display: block;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.user-stats {
    display: flex;
    gap: 16px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.user-stat {
    background: var(--gray-100);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.user-action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-credit {
    background: var(--success);
    color: white;
}

.btn-debit {
    background: var(--warning);
    color: var(--gray-900);
}

.btn-edit-bank {
    background: var(--info);
    color: white;
}

.btn-view-investments {
    background: #6f42c1;
    color: white;
}

.btn-suspend {
    background: var(--danger);
    color: white;
}

.btn-unsuspend {
    background: var(--gray-600);
    color: white;
}

.btn-delete {
    background: var(--danger);
    color: white;
}

.user-action-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* WhatsApp Community */
.community-container {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.community-info h3 {
    color: var(--royal-blue);
    margin-bottom: 8px;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-whatsapp:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 28px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 550px;
    position: relative;
    box-shadow: var(--shadow-xl);
    border-top: 4px solid var(--royal-blue);
}

.close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--gray-600);
    transition: color 0.2s;
}

.close:hover {
    color: var(--danger);
}

.investment-preview {
    background: var(--gray-50);
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 20px 0;
    border-left: 4px solid var(--royal-blue);
}

.preview-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--gray-200);
}

.preview-label {
    font-weight: 600;
    color: var(--gray-700);
}

.preview-value {
    font-weight: 700;
    color: var(--royal-blue);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--royal-blue);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 24px 0;
        gap: 16px;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .packages-grid,
    .wallet-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .investment-details {
        grid-template-columns: 1fr;
    }

    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .transaction-info {
        text-align: left;
        width: 100%;
    }

    .community-container {
        flex-direction: column;
        text-align: center;
    }

    .user-actions {
        flex-direction: column;
    }

    .user-action-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 16px;
    }

    .hero {
        padding: 32px 20px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .wallet-amount {
        font-size: 1.8rem;
    }

    .summary-value {
        font-size: 1.4rem;
    }
}

/* ============ ZIPPER ANIMATION EFFECT (Preserved) ============ */
#zipper-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
}

.zipper-mask {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 58, 108, 0.95), rgba(10, 37, 64, 0.98));
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: opacity 0.5s ease;
    pointer-events: all;
}

.zipper-left,
.zipper-right {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, var(--royal-blue), var(--royal-blue-dark));
    transition: transform 1.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    z-index: 10;
}

.zipper-left {
    left: 0;
    transform-origin: left center;
}

.zipper-right {
    right: 0;
    transform-origin: right center;
}

.zipper-tooth {
    position: absolute;
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, var(--gold), var(--gold-dark));
    border-radius: 2px;
    z-index: 6;
    transition: all 0.3s ease;
}

.zipper-pull {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    width: 60px;
    height: 120px;
    z-index: 15;
    opacity: 0;
    pointer-events: none;
}

.pull-tab {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 40px;
    background: linear-gradient(to bottom, #c0c0c0, #888);
    border-radius: 4px;
}

.pull-ring {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 25px;
    border: 4px solid #c0c0c0;
    border-radius: 50%;
}

.zipper-click-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    transition: opacity 0.5s ease;
}

.click-here-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--royal-blue), var(--royal-blue-dark));
    color: var(--white);
    border: 2px solid var(--gold);
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    animation: pulse-glow 2s infinite;
}

.zipper-mask.unzipping .zipper-left {
    transform: translateX(-100%) rotateY(-30deg);
}

.zipper-mask.unzipping .zipper-right {
    transform: translateX(100%) rotateY(30deg);
}

.zipper-mask.unzipping .zipper-pull {
    opacity: 1;
    animation: pull-down 1.2s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
}

@keyframes pull-down {
    0% {
        transform: translate(-50%, -50%) rotate(90deg);
    }

    100% {
        transform: translate(-50%, 100%) rotate(90deg);
    }
}

.zipper-mask.unzipping .zipper-tooth {
    animation: tooth-open 0.8s cubic-bezier(0.645, 0.045, 0.355, 1) forwards;
    animation-delay: calc(var(--tooth-index) * 0.03s);
}

@keyframes tooth-open {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

.zipper-mask.unzipping .zipper-click-area {
    opacity: 0;
    pointer-events: none;
}

.zipper-mask.complete {
    opacity: 0;
    pointer-events: none;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    }

    50% {
        box-shadow: 0 0 35px rgba(212, 175, 55, 0.9);
    }
}

#register-section .form-container form {
    opacity: 0;
    transition: opacity 0.5s ease 1.2s;
}

#register-section .form-container.form-visible form {
    opacity: 1;
}

/* Additional Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 16px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 16px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--royal-blue-accent);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--royal-blue);
}