/* --- PROFILE EDIT SAVE BUTTON: MOBILE STICKY & MEDIA-STYLE --- */
.profile-save-btn {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    padding: 14px 0;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    margin: 24px 0 0 0;
    width: 100%;
    max-width: 100%;
    display: block;
    transition: all 0.3s;
    position: static;
    z-index: 1;
}
.profile-save-btn:hover, .profile-save-btn:focus {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Signika:wght@500;600&display=swap');

/* =========================
   ROOT VARIABLES
========================= */
:root {
    --background-color: rgb(252, 251, 251);
    --font-color: rgb(0, 0, 0);
    --second-font-color: rgb(101, 101, 101);
    --secondary-font-color: rgb(179, 179, 179);
    --background-on-hover: rgb(215, 214, 214);
    --primary-color: #00c4b4;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --gradient: linear-gradient(43deg, #4158D0 0%, #C850C0 46%, #FFCC70 100%);
    --transition: all 0.2s ease;
    
    /* Enhanced Analytics Variables */
    --bg-dark: #1e1e2f;
    --card-dark: #2c2c3e;
    --text-primary: #ffffff;
    --text-secondary: #b0b3c7;
    --accent-color: #4e73df;
    --analytics-success-color: #1cc88a;
}

/* =========================
   DARK MODE OVERRIDES
========================= */
body.dark-mode {
    --background-color: rgb(15, 15, 15);
    --font-color: rgb(254, 252, 252);
    --second-font-color: rgb(197, 195, 195);
    --secondary-font-color: rgb(108, 106, 106);
    --background-on-hover: rgba(52, 51, 51, 0.834);
}

/* =========================
   ENHANCED ANIMATIONS
========================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -5px, 0);
    }
    70% {
        transform: translate3d(0, -3px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

/* =========================
   GENERAL RESET
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

/* =========================
   CUSTOM LOADERS & PROGRESS
========================= */
/* Smooth Progress Loader */
.loader {
    width: 120px;
    height: 22px;
    border-radius: 20px;
    color: #514b82;
    border: 2px solid;
    position: relative;
}
.loader::before {
    content: "";
    position: absolute;
    margin: 2px;
    inset: 0 100% 0 0;
    border-radius: inherit;
    background: currentColor;
    animation: l6 2s infinite;
}
@keyframes l6 {
    100% {inset:0}
}

/* Video Progress Loader (branded) */
.video-loader {
    width: 150px;
    height: 25px;
    border-radius: 25px;
    color: #667eea;
    border: 2px solid currentColor;
    position: relative;
    margin: 10px auto;
}
.video-loader::before {
    content: "";
    position: absolute;
    margin: 2px;
    inset: 0 100% 0 0;
    border-radius: inherit;
    background: linear-gradient(45deg, #667eea, #764ba2);
    animation: videoProgress 3s ease-in-out infinite;
}
@keyframes videoProgress {
    0% { inset: 0 100% 0 0; }
    50% { inset: 0 20% 0 0; }
    100% { inset: 0 0 0 0; }
}

/* Fast Pulse Loader */
.pulse-loader {
    width: 100px;
    height: 20px;
    border-radius: 15px;
    color: #00c4b4;
    border: 2px solid;
    position: relative;
    margin: 10px auto;
}
.pulse-loader::before {
    content: "";
    position: absolute;
    margin: 2px;
    inset: 0 100% 0 0;
    border-radius: inherit;
    background: currentColor;
    animation: fastPulse 1.5s ease-in-out infinite;
}
@keyframes fastPulse {
    0%, 100% { inset: 0 100% 0 0; }
    50% { inset: 0 0 0 0; }
}

/* Instant Mode Loader */
.instant-loader {
    width: 80px;
    height: 18px;
    border-radius: 15px;
    color: #28a745;
    border: 2px solid;
    position: relative;
    margin: 10px auto;
}
.instant-loader::before {
    content: "";
    position: absolute;
    margin: 2px;
    inset: 0 100% 0 0;
    border-radius: inherit;
    background: linear-gradient(45deg, #28a745, #20c997);
    animation: instantProgress 0.8s ease-out;
}
@keyframes instantProgress {
    0% { inset: 0 100% 0 0; }
    100% { inset: 0 0 0 0; }
}

body {
  background: var(--background-color);
  color: var(--font-color);
  min-height: 100vh;
  margin: 0;
}

/* Container */
.container {
    display: flex;
}

/* Navbar (Desktop Sidebar) */
.navbar {
    width: 245px;
    height: 100vh;
    background-color: var(--background-color);
    border-right: 0.1px solid rgba(76, 75, 75, 0.737);
    position: sticky;
    top: 0;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.biashara-hub-logo {
    width: 150px;
    margin: 5px 30px;
    cursor: pointer;
}

.biashara-hub-logo img {
    width: 100%;
    height: auto;
}

.sub-section {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.sub-section:hover {
    background-color: var(--background-on-hover);
}

.sub-section i,
.sub-section img.profile-img {
    font-size: 1.3rem;
    color: var(--font-color);
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 50%;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.sub-section a,
.profile-nav-item .profile-text {
    font-family: 'Signika', sans-serif;
    font-size: 0.9rem;
    font-weight: 550;
    color: var(--font-color);
    text-decoration: none;
}

.menu-section {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 10px 20px;
    margin-top: auto;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.menu-section:hover {
    background-color: var(--background-on-hover);
}

.menu-section i {
    font-size: 1.2rem;
    color: var(--font-color);
}

.menu-section a {
    font-family: 'Signika', sans-serif;
    font-size: 0.9rem;
    font-weight: 550;
    color: var(--font-color);
    text-decoration: none;
}

/* Language Toggle Specific Styling */
#language-toggle-icon {
    transition: transform 0.3s ease;
}

#language-toggle:hover + #language-toggle-icon,
#language-toggle-icon:hover {
    transform: rotate(15deg);
}

.menu-section:has(#language-toggle) {
    border: 1px solid rgba(0, 196, 180, 0.3);
    background: rgba(0, 196, 180, 0.05);
}

.menu-section:has(#language-toggle):hover {
    background: rgba(0, 196, 180, 0.1);
    border-color: rgba(0, 196, 180, 0.5);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 975px;
    margin: 0 auto;
    padding: 20px;
}

/* Post Section */
.post-section {
    max-width: 660px;
    margin: 0 auto;
}

/* =================================
   MOBILE NAVIGATION
================================= */
.nav-hidden {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1001;
    pointer-events: none; /* Allow clicks to pass through the container */
}

.nav-hide-2 {
    position: relative; /* Crucial for positioning the floating button */
    width: 100%;
    pointer-events: all; /* Enable clicks on children */
}

#mobile-public-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    padding: 5px 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

/* Hide public nav items when user is authenticated */
body[data-user-role="user"] #mobile-public-nav,
body[data-user-role="admin"] #mobile-public-nav {
    display: none !important;
}

body[data-user-role="user"] #mobile-login-link,
body[data-user-role="admin"] #mobile-login-link,
body[data-user-role="user"] #mobile-register-link,
body[data-user-role="admin"] #mobile-register-link {
    display: none !important;
}

/* Hide desktop login/register sections for authenticated users */
body[data-user-role="user"] #login-section,
body[data-user-role="admin"] #login-section,
body[data-user-role="user"] #register-section,
body[data-user-role="admin"] #register-section {
    display: none !important;
}

/* Show appropriate mobile nav for authenticated users */
body[data-user-role="user"] #mobile-user-nav {
    display: flex !important;
}

body[data-user-role="admin"] #mobile-admin-nav {
    display: flex !important;
}

/* Hide other mobile navs when user is authenticated */
body[data-user-role="user"] #mobile-admin-nav,
body[data-user-role="admin"] #mobile-user-nav {
    display: none !important;
}

/* Profile tabs visibility control */
/* Hide business-specific tabs for public users (no data-user-role attribute) */
body:not([data-user-role]) .profile-tabs .tab[data-tab="subscription"],
body:not([data-user-role]) .profile-tabs .tab[data-tab="analytics"],
body:not([data-user-role]) .profile-tabs .tab[data-tab="invoices"],
body:not([data-user-role]) .profile-tabs .tab[data-tab="location"],
body:not([data-user-role]) .profile-tabs .tab[data-tab="settings"] {
    display: none !important;
}

/* Show all tabs for authenticated users */
body[data-user-role="user"] .profile-tabs .tab,
body[data-user-role="admin"] .profile-tabs .tab {
    display: flex !important;
}

/* For public users, make posts tab more prominent since it's the only one shown */
body:not([data-user-role]) .profile-tabs .tab[data-tab="posts"] {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    justify-content: center;
    background: rgba(0, 196, 180, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

body:not([data-user-role]) .profile-tabs {
    justify-content: center;
    align-items: center;
}

#mobile-public-nav .nav-hidden-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 6px 2px;
    border-radius: 8px;
    margin: 0 2px;
    transition: all 0.2s ease;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
}

#mobile-public-nav .nav-hidden-item:hover,
#mobile-public-nav .nav-hidden-item:active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

#mobile-public-nav .nav-hidden-item i {
    font-size: 1.4rem;
    line-height: 1;
    margin: 0;
    margin-bottom: 2px;
}

/* Mobile nav text styling */
#mobile-public-nav .nav-hidden-item .mobile-nav-text {
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 2px;
    text-align: center;
    line-height: 1;
}

/* Hide text labels for public nav too */
#mobile-public-nav .nav-hidden-item[aria-label]:after {
    display: none;
}

.nav-floating-button {
    position: absolute;
    left: 50%;
    top: -20px;
    transform: translateX(-50%);
    background: #00c4b4;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1005;
    pointer-events: all !important;
    touch-action: manipulation;
    transition: all 0.2s ease;
}

.nav-floating-button:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* Hide floating button text labels to save space */
.nav-floating-button[aria-label]:after {
    display: none;
}

/* Hide desktop navbar and show mobile nav on smaller screens */
@media (max-width: 935px) {
    .navbar {
        display: none !important;
    }
    .nav-hidden {
        display: flex !important;
    }
    .main-content {
        padding-bottom: 80px; /* Ensure content isn't hidden by nav */
    }
}

@media (min-width: 936px) {
    .nav-hidden {
        display: none !important;
    }
}

/* Other styles from your file... */
.hero-section { background: var(--gradient); color: white; padding: 24px 16px; border-radius: 0 0 20px 20px; text-align: center; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); }
.hero-section .user-name { font-size: 1.2rem; font-weight: 600; margin-top: 8px; font-family: 'Signika', sans-serif; }
.hero-section .package-info { margin-top: 12px; font-size: 0.9rem; opacity: 0.9; }
.hero-section .pay-now-btn { margin-top: 18px; background: white; color: var(--primary-color); font-weight: 600; padding: 10px 24px; border-radius: 50px; border: none; cursor: pointer; transition: var(--transition); }
.hero-section .pay-now-btn:hover { background: var(--primary-color); color: white; }

/* ===================== CREATOR DASHBOARD & REWARDS (SPECIFICITY FIX) ===================== */
#creator-dashboard-content .creator-dashboard {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 16px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    font-family: 'Inter', Arial, sans-serif;
}

/* ===================== WITHDRAWAL MODAL DARK MODE SUPPORT ===================== */
body.dark-mode .modal-content {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
    border: 1px solid #444 !important;
}

body.dark-mode .modal-header {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-bottom: 1px solid #444 !important;
}

body.dark-mode .modal-title {
    color: #ffffff !important;
}

body.dark-mode .modal-body {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
}

body.dark-mode .modal-footer {
    background-color: #1a1a1a !important;
    border-top: 1px solid #444 !important;
}

body.dark-mode .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: #3a3a3a !important;
    border-color: #555 !important;
    color: #ffffff !important;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
    background-color: #3a3a3a !important;
    border-color: #007bff !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

body.dark-mode .form-label {
    color: #ffffff !important;
}

body.dark-mode .form-text {
    color: #cccccc !important;
}

body.dark-mode .alert-info {
    background-color: #1e3a5f !important;
    border-color: #2e5a8f !important;
    color: #b3d4fc !important;
}

/* Dark mode for creator dashboard */
@media (prefers-color-scheme: dark) {
  #creator-dashboard-content .creator-dashboard {
    background: #181c1f;
    color: #e0e6ed;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  }
  #creator-dashboard-content .dashboard-header h2 {
    color: #00e6d0;
  }
  #creator-dashboard-content .dashboard-subtitle {
    color: #b0b8c1;
  }
  #creator-dashboard-content .creator-balance-card {
    background: linear-gradient(90deg, #003c3c 60%, #005c5c 100%);
    color: #e0e6ed;
    box-shadow: 0 2px 12px rgba(0,196,180,0.18);
  }
  #creator-dashboard-content .withdraw-btn {
    background: #22292f;
    color: #00e6d0;
  }
  #creator-dashboard-content .withdraw-btn:hover {
    background: #00e6d0;
    color: #22292f;
  }
  #creator-dashboard-content .stat-card {
    background: #22292f;
    color: #e0e6ed;
    box-shadow: 0 2px 8px rgba(0,196,180,0.18);
  }
  #creator-dashboard-content .stat-card .stat-icon {
    color: #00e6d0;
    opacity: 0.22;
  }
  #creator-dashboard-content .stat-value {
    color: #e0e6ed;
  }
  #creator-dashboard-content .stat-label {
    color: #00e6d0;
  }
  #creator-dashboard-content .earnings-section h3,
  #creator-dashboard-content .business-performance-section h3 {
    color: #00e6d0;
  }
  #creator-dashboard-content .earning-item {
    background: #22292f;
    color: #e0e6ed;
    box-shadow: 0 1px 4px rgba(0,196,180,0.18);
  }
  #creator-dashboard-content .earning-date {
    color: #00e6d0;
  }
  #creator-dashboard-content .earning-amount {
    color: #00e6d0;
  }
  #creator-dashboard-content .business-item {
    background: #22292f;
    color: #e0e6ed;
    box-shadow: 0 1px 6px rgba(0,196,180,0.18);
  }
  #creator-dashboard-content .business-thumb {
    background: #003c3c;
  }
  #creator-dashboard-content .business-name {
    color: #00e6d0;
  }
  #creator-dashboard-content .business-stats {
    color: #b0b8c1;
  }
  #creator-dashboard-content .viewed-badge {
    background: #00e6d0;
    color: #181c1f;
  }
  #creator-dashboard-content .already-viewed {
    opacity: 0.5;
    filter: grayscale(0.3);
  }
  .creator-toast {
    background: #22292f;
    color: #e0e6ed;
    box-shadow: 0 2px 8px rgba(0,196,180,0.18);
  }
  .creator-toast-success { background: #059669; color: #e0e6ed; }
  .creator-toast-info { background: #2563eb; color: #e0e6ed; }
  .creator-toast-warning { background: #f59e0b; color: #181c1f; }
  .creator-toast-error { background: #ef4444; color: #e0e6ed; }
  /* Remove pure white backgrounds */
  #creator-dashboard-content .creator-dashboard,
  #creator-dashboard-content .creator-balance-card,
  #creator-dashboard-content .stat-card,
  #creator-dashboard-content .earning-item,
  #creator-dashboard-content .business-item {
    background: #181c1f !important;
    color: #e0e6ed !important;
    border-color: #22292f !important;
  }
  #creator-dashboard-content .withdraw-btn {
    background: #22292f !important;
    color: #00e6d0 !important;
    border: none !important;
  }
}
#creator-dashboard-content .dashboard-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 24px;
}
#creator-dashboard-content .dashboard-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #00c4b4;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}
#creator-dashboard-content .dashboard-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 10px;
}
#creator-dashboard-content .dashboard-actions {
    display: flex;
    gap: 12px;
}
#creator-dashboard-content .dashboard-actions .btn {
    font-size: 1rem;
    padding: 8px 18px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,196,180,0.07);
    transition: background 0.2s;
}
#creator-dashboard-content .creator-balance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #00c4b4 60%, #00a094 100%);
    color: #fff;
    border-radius: 14px;
    padding: 24px 20px;
    margin-bottom: 28px;
    box-shadow: 0 2px 12px rgba(0,196,180,0.09);
}

/* Total earnings card variant */
#creator-dashboard-content .total-earnings-card {
    background: linear-gradient(90deg, #28a745 60%, #20c997 100%);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
}

#creator-dashboard-content .total-earnings-card .balance-info {
    width: 100%;
    margin-bottom: 10px;
}

#creator-dashboard-content .earnings-breakdown {
    width: 100%;
    text-align: left;
}

#creator-dashboard-content .earnings-breakdown small {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}
#creator-dashboard-content .balance-info {
    display: flex;
    flex-direction: column;
}
#creator-dashboard-content .balance-label {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.85;
}
#creator-dashboard-content .balance-amount {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 6px;
    letter-spacing: 1px;
}

/* Creator Balance Card Button Container */
#creator-dashboard-content .creator-balance-card .balance-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

#creator-dashboard-content .withdraw-btn,
#creator-dashboard-content .history-btn {
    background: #fff;
    color: #00a094;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,196,180,0.07);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex: 1;
    justify-content: center;
    min-width: 140px;
}

#creator-dashboard-content .withdraw-btn:hover {
    background: #00a094;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,196,180,0.2);
}

#creator-dashboard-content .history-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    box-shadow: 0 3px 12px rgba(23, 162, 184, 0.3);
    border: none;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#creator-dashboard-content .history-btn::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: left 0.5s ease;
}

#creator-dashboard-content .history-btn:hover::before {
    left: 100%;
}

#creator-dashboard-content .history-btn:hover {
    background: linear-gradient(135deg, #138496 0%, #17a2b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
    color: white;
    text-decoration: none;
}

/* Ensure history button stays visible during loading states */
.creator-balance-card.stat-loading .history-btn,
.stat-loading .history-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 0.7 !important;
}

.creator-balance-card .balance-actions {
    display: flex !important;
    gap: 12px;
    margin-top: 15px;
}

.creator-balance-card .balance-actions .history-btn {
    display: flex !important;
    visibility: visible !important;
}

/* =================== MILESTONE SECTION =================== */
.creator-dashboard .milestone-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.creator-dashboard .milestone-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="70" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="30" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    pointer-events: none;
}

.creator-dashboard .milestone-section .balance-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
}

.creator-dashboard .milestone-section .milestone-content {
    position: relative;
    z-index: 1;
}

.milestone-achieved {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.milestone-achieved i {
    color: #ffd700;
    font-size: 1.2rem;
}

.milestone-progress {
    margin-bottom: 15px;
}

.milestone-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.milestone-info span {
    font-weight: 500;
}

.milestone-reward {
    color: #ffd700;
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.milestone-remaining {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

.total-milestone-rewards {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.total-milestone-rewards i {
    color: #ffd700;
    font-size: 1.2rem;
}

/* Remove duplicate milestone displays */
.milestone-card {
    display: none !important;
}

#milestone-progress:not(.milestone-content) {
    display: none !important;
}

#creator-dashboard-content .creator-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 20px !important;
    padding: 25px 30px !important;
    color: white !important;
    border-radius: 12px !important;
    margin-bottom: 25px !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Animated background overlay for stats grid */
#creator-dashboard-content .creator-stats-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

#creator-dashboard-content .creator-stats-grid:hover::before {
    left: 100%;
}

#creator-dashboard-content .stat-card {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 20px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    color: white !important;
}

#creator-dashboard-content .stat-card:hover {
    transform: translateY(-3px) !important;
    background: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Stat card icons with modern styling */
#creator-dashboard-content .stat-card .stat-icon {
    font-size: 1.8rem !important;
    opacity: 0.95 !important;
    padding: 12px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    width: 50px !important;
    height: 50px !important;
}

/* Different colors for different stat types */
#creator-dashboard-content .stat-card .stat-icon.views {
    color: #17a2b8 !important;
    background: rgba(23, 162, 184, 0.2) !important;
}

#creator-dashboard-content .stat-card .stat-icon.likes {
    color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.2) !important;
}

#creator-dashboard-content .stat-card .stat-icon.comments {
    color: #28a745 !important;
    background: rgba(40, 167, 69, 0.2) !important;
}

#creator-dashboard-content .stat-card .stat-icon.businesses {
    color: #ffc107 !important;
    background: rgba(255, 193, 7, 0.2) !important;
}

/* Stat card info styling */
#creator-dashboard-content .stat-card .stat-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

#creator-dashboard-content .stat-card .stat-number,
#creator-dashboard-content .stat-card .stat-value {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    color: white !important;
}

#creator-dashboard-content .stat-card .stat-label {
    font-size: 0.9rem !important;
    opacity: 0.85 !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

#creator-dashboard-content .stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,196,180,0.12);
    border-color: rgba(102, 126, 234, 0.2);
}
#creator-dashboard-content .stat-card .stat-icon {
    font-size: 1.4rem;
    color: #667eea;
    opacity: 0.7;
    margin-right: 4px;
}
#creator-dashboard-content .stat-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    flex: 1;
}
#creator-dashboard-content .stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--font-color);
    margin-bottom: 1px;
    line-height: 1.2;
}
#creator-dashboard-content .stat-label {
    font-size: 0.75rem;
    color: var(--secondary-font-color);
    font-weight: 500;
    line-height: 1.2;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}
#creator-dashboard-content .stat-card.stat-updating {
    box-shadow: 0 0 0 4px #00c4b433;
}
#creator-dashboard-content .earnings-section h3,
#creator-dashboard-content .business-performance-section h3 {
    font-size: 1.2rem;
    color: #00a094;
    margin-bottom: 10px;
    font-weight: 600;
}
#creator-dashboard-content .earnings-list {
    margin-bottom: 32px;
}
#creator-dashboard-content .earning-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f8f8;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,196,180,0.04);
}
#creator-dashboard-content .earning-info {
    display: flex;
    flex-direction: column;
}
#creator-dashboard-content .earning-date {
    font-size: 0.95rem;
    color: #00a094;
    font-weight: 500;
}
#creator-dashboard-content .earning-description {
    font-size: 1rem;
    color: #333;
}
#creator-dashboard-content .earning-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00c4b4;
}
#creator-dashboard-content .business-list {
    margin-bottom: 32px;
}
#creator-dashboard-content .business-item {
    background: #f7fdfd;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 6px rgba(0,196,180,0.05);
    display: flex;
    align-items: center;
    gap: 16px;
}
#creator-dashboard-content .business-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
    background: #e0f7f7;
}
#creator-dashboard-content .business-info {
    flex: 1;
}
#creator-dashboard-content .business-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #00a094;
}
#creator-dashboard-content .business-stats {
    font-size: 0.95rem;
    color: #666;
    margin-top: 4px;
}
#creator-dashboard-content .loading-text {
    color: #aaa;
    font-size: 1rem;
    padding: 12px 0;
    text-align: center;
}
#creator-dashboard-content .viewed-badge {
    background: #00c4b4;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 12px;
    padding: 2px 10px;
    margin-left: 8px;
    display: inline-block;
    box-shadow: 0 1px 4px rgba(0,196,180,0.09);
}
#creator-dashboard-content .already-viewed {
    opacity: 0.6;
    filter: grayscale(0.2);
}
.creator-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}
.creator-toast-success { background: #10b981; }
.creator-toast-info { background: #3b82f6; }
.creator-toast-warning { background: #f59e0b; }
.creator-toast-error { background: #ef4444; }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@media (max-width: 700px) {
    #creator-dashboard-content .creator-dashboard {
        padding: 12px 2px;
        border-radius: 8px;
    }
    #creator-dashboard-content .dashboard-header h2 {
        font-size: 1.3rem;
    }
    #creator-dashboard-content .creator-balance-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 10px;
    }
    #creator-dashboard-content .creator-stats-grid {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        margin-bottom: 10px !important;
        justify-content: space-between !important;
    }
    #creator-dashboard-content .stat-card {
        flex: 1 1 calc(50% - 3px) !important;
        min-width: 140px !important;
        max-width: none !important;
        padding: 10px 8px !important;
        gap: 6px !important;
    }
    #creator-dashboard-content .business-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    #creator-dashboard-content .business-thumb {
        margin-right: 0;
        margin-bottom: 8px;
    }
}
/* ===================== END CREATOR DASHBOARD & REWARDS (SPECIFICITY FIX) ===================== */

.modal-backdrop.show { 
    display: block; 
    /* iOS fixes */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Ensure all modal containers have proper z-index */
.tm-form-container,
.profile-edit-modal-modern,
#profile-edit-overlay,
#subscription-payment-modal {
    z-index: 9999 !important;
}

/* Profile edit content within tab system */
#profile-edit-content {
    padding: 20px;
    background: var(--background-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 10px;
    text-align: left;
}

/* Profile edit header with close button */
.profile-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.profile-edit-header h4 {
    margin: 0;
    color: var(--font-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.close-edit-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--second-font-color);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.close-edit-btn:hover {
    background: var(--secondary-font-color);
    color: var(--font-color);
    transform: scale(1.1);
}

.close-edit-btn:active {
    transform: scale(0.95);
}

/* Dark mode for close button */
body.dark-mode .close-edit-btn {
    color: #ccc;
}

body.dark-mode .close-edit-btn:hover {
    background: #444;
    color: #fff;
}

/* Apply profile edit modal styles to tab content */
#profile-edit-content .form-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: nowrap;
    width: 100%;
    text-align: left;
}

#profile-edit-content .form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--second-font-color);
    min-width: 120px;
    max-width: 120px;
    flex-shrink: 0;
    text-align: left;
    margin: 0;
    padding-right: 10px;
}

#profile-edit-content .form-group input,
#profile-edit-content .form-group textarea {
    flex: 1;
    min-width: 200px;
    max-width: none;
    padding: 12px 15px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--font-color);
    background: var(--background-color);
    transition: all 0.3s ease;
}

#profile-edit-content .form-group textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.4;
}

#profile-edit-content .form-group input:focus,
#profile-edit-content .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 196, 180, 0.3);
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    /* iOS specific fixes */
    -webkit-overflow-scrolling: touch;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.tm-form-container { 
    display: none; 
    position: fixed; 
    top: 60%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    background: var(--background-color); 
    padding: 24px 20px; 
    border-radius: 16px; 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); 
    z-index: 9999; 
    max-width: 420px; 
    width: 94%;
    max-height: 85vh;
    overflow-y: auto;
    /* iOS fixes */
    -webkit-overflow-scrolling: touch;
    -webkit-transform: translate3d(-50%, -50%, 0);
    -webkit-backface-visibility: hidden;
}
.tm-form-container[aria-hidden="false"] { display: block; }
.tm-form-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--background-on-hover);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--font-color);
    cursor: pointer;
    transition: var(--transition);
}

.tm-form-close:hover {
    background: var(--danger-color);
    color: white;
    transform: rotate(90deg);
}
.tm-form-container h2 { font-size: 1.4rem; font-weight: 600; margin-bottom: 14px; text-align: center; color: var(--font-color); }
.tm-form-container form { display: flex; flex-direction: column; gap: 15px; }
.tm-form-container input, .tm-form-container select, .tm-form-container textarea { padding: 10px; border: 1px solid var(--secondary-font-color); border-radius: 5px; font-size: 0.9rem; color: var(--font-color); background: var(--background-color); }
.tm-form-container button { padding: 10px; border: none; border-radius: 5px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: var(--transition); }

/* Mobile optimization for all form containers */
@media (max-width: 768px) {
    .modal-backdrop {
        z-index: 9998 !important;
        background: rgba(0, 0, 0, 0.7) !important;
    }
    
    .tm-form-container {
        max-height: 95vh;
        overflow-y: auto;
        top: 55%;
        width: 96%;
        max-width: 400px;
        padding: 20px 16px;
        border-radius: 12px;
    }
    
    .tm-form-container form {
        gap: 12px;
    }
    
    .tm-form-container input,
    .tm-form-container select,
    .tm-form-container textarea {
        padding: 8px;
        font-size: 0.85rem;
    }
    
    .tm-form-container h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
}

/* Extra small mobile screens */
@media (max-width: 480px) {
    .modal-backdrop {
        z-index: 9998 !important;
        background: rgba(0, 0, 0, 0.8) !important;
    }
    
    .tm-form-container {
        max-height: 98vh;
        top: 52%;
        padding: 14px;
        border-radius: 12px;
        z-index: 9999 !important;
        width: 98%;
        /* iOS specific fixes */
        -webkit-transform: translate3d(-50%, -50%, 0);
        transform: translate3d(-50%, -50%, 0);
        -webkit-overflow-scrolling: touch;
        -webkit-backface-visibility: hidden;
    }
    
    .tm-form-container h2 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .tm-form-container input,
    .tm-form-container select,
    .tm-form-container textarea {
        padding: 6px;
        font-size: 16px !important; /* Prevent zoom on iOS */
    }
    
    .tm-form-container form {
        gap: 10px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .tm-form-container {
        /* Fixed height for iOS */
        max-height: 90vh !important;
        /* Use vh instead of % for iOS */
        top: 50vh !important;
        /* Hardware acceleration */
        -webkit-transform: translate3d(-50%, -50%, 0) !important;
        transform: translate3d(-50%, -50%, 0) !important;
        -webkit-backface-visibility: hidden !important;
        backface-visibility: hidden !important;
    }
    
    /* iOS full screen modal */
    @media (max-width: 480px) {
        body.create-form-active #create-form {
            /* Use 100vh instead of 100% for iOS */
            height: 100vh !important;
            /* Prevent bounce scrolling */
            -webkit-overflow-scrolling: touch !important;
            /* Hardware acceleration */
            -webkit-transform: none !important;
            transform: none !important;
            /* Fix for iOS status bar and home indicator */
            padding-top: max(70px, calc(70px + env(safe-area-inset-top))) !important;
            padding-bottom: max(100px, calc(100px + env(safe-area-inset-bottom))) !important;
            /* Ensure fullscreen coverage */
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
        }
        
        /* Ensure modal inputs don't cause zoom on iOS */
        .tm-form-container input,
        .tm-form-container select,
        .tm-form-container textarea {
            font-size: 16px !important;
            -webkit-appearance: none;
            appearance: none;
            border-radius: 8px;
        }
        
        /* Fix iOS keyboard pushing modal up */
        .tm-form-container {
            position: fixed !important;
            top: 50% !important;
            -webkit-transform: translate3d(-50%, -50%, 0) !important;
            transform: translate3d(-50%, -50%, 0) !important;
        }
    }
}
.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { background: #009688; }
.btn-secondary { background: #eee; color: #333; border: none; padding: 10px 16px; border-radius: 8px; cursor: pointer; }
.btn-secondary:hover { background: #999999; }
.btn-success { background: var(--success-color); color: white; }
.btn-danger { background: var(--danger-color); color: white; }
.btn-danger:hover { background: #c82333; }
.step-navigation { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 10px; 
    margin-top: 20px; 
    position: relative;
    z-index: 1;
}
.step-navigation button { 
    flex: 0 0 auto; 
    min-width: 100px; 
    padding: 10px 16px;
    font-weight: 600;
}


/* Edit media overlay */
.edit-media-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-media-modal {
    background: var(--background-color);
    width: 90%;
    max-width: 800px;
    height: 90%;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.edit-media-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--secondary-font-color);
    background: var(--background-color);
    position: relative;
    z-index: 2;
    min-height: 60px;
    flex-shrink: 0;
}

.edit-media-header .back-btn,
.edit-media-header .save-btn {
    background: none;
    border: none;
    color: var(--font-color);
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 80px;
    justify-content: center;
}

.edit-media-header .back-btn:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.edit-media-header .save-btn {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.edit-media-header .save-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.edit-media-header .edit-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--font-color);
}

.edit-media-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.media-preview-container {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
}

.media-preview-container img,
.media-preview-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* =========================
   CLEAN INSTAGRAM-STYLE CROP SYSTEM
========================= */
/* Crop overlay */
.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: transparent;
    backdrop-filter: none;
    transition: all 0.3s ease;
    pointer-events: none;
    opacity: 1;
}

.crop-overlay.active {
    background: transparent;
    opacity: 1;
}

/* Instagram-style crop box */
.crop-box {
    position: absolute;
    border: 2px solid #ffffff;
    background: transparent;
    min-width: 60px;
    min-height: 60px;
    cursor: move;
    transition: border-color 0.2s ease;
    pointer-events: all;
}

.crop-box:hover {
    border-color: #0095f6;
}

/* Instagram-style rule of thirds grid */
.crop-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.4) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 1px, transparent 1px);
    background-size: 33.33% 33.33%;
    background-position: 33.33% 33.33%;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.crop-box:hover::before {
    opacity: 1;
}

/* Instagram L-shaped corner handles */
.resize-handle {
    position: absolute;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.2s ease;
    pointer-events: all;
}

.resize-handle::before,
.resize-handle::after {
    content: '';
    position: absolute;
    background: #ffffff;
    transition: background-color 0.2s ease;
}

/* Corner handles - L shapes */
.resize-handle.nw,
.resize-handle.ne,
.resize-handle.sw,
.resize-handle.se {
    width: 20px;
    height: 20px;
}

.resize-handle.nw::before,
.resize-handle.ne::before,
.resize-handle.sw::before,
.resize-handle.se::before {
    width: 3px;
    height: 14px;
}

.resize-handle.nw::after,
.resize-handle.ne::after,
.resize-handle.sw::after,
.resize-handle.se::after {
    width: 14px;
    height: 3px;
}

/* Corner positioning */
.resize-handle.nw {
    top: -10px;
    left: -10px;
    cursor: nw-resize;
}
.resize-handle.nw::before { top: 0; left: 0; }
.resize-handle.nw::after { top: 0; left: 0; }

.resize-handle.ne {
    top: -10px;
    right: -10px;
    cursor: ne-resize;
}
.resize-handle.ne::before { top: 0; right: 0; }
.resize-handle.ne::after { top: 0; right: 0; }

.resize-handle.sw {
    bottom: -10px;
    left: -10px;
    cursor: sw-resize;
}
.resize-handle.sw::before { bottom: 0; left: 0; }
.resize-handle.sw::after { bottom: 0; left: 0; }

.resize-handle.se {
    bottom: -10px;
    right: -10px;
    cursor: se-resize;
}
.resize-handle.se::before { bottom: 0; right: 0; }
.resize-handle.se::after { bottom: 0; right: 0; }

/* Edge handles */
.resize-handle.n,
.resize-handle.s {
    width: 30px;
    height: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.resize-handle.w,
.resize-handle.e {
    width: 8px;
    height: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.resize-handle.n { top: -4px; cursor: n-resize; }
.resize-handle.s { bottom: -4px; cursor: s-resize; }
.resize-handle.w { left: -4px; cursor: w-resize; }
.resize-handle.e { right: -4px; cursor: e-resize; }

/* Hover states */
.resize-handle:hover::before,
.resize-handle:hover::after {
    background: #0095f6;
}

.resize-handle.n:hover,
.resize-handle.s:hover,
.resize-handle.w:hover,
.resize-handle.e:hover {
    background: #0095f6;
}

/* Active states */
.crop-box.dragging {
    border-color: #0095f6;
}

.crop-box.resizing {
    border-color: #0095f6;
}

/* Instagram-style crop controls */
.crop-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 1002;
}

.crop-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.crop-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.crop-btn.primary {
    background: #0095f6;
    color: white;
}

.crop-btn.primary:hover {
    background: #1877f2;
}

/* Aspect ratio controls */
.crop-ratio-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 1002;
}

.crop-ratio-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.crop-ratio-btn:hover {
    background: #ffffff;
}

.crop-ratio-btn.active {
    background: #0095f6;
    color: white;
    border-color: #0095f6;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .crop-box {
        min-width: 80px;
        min-height: 80px;
    }
    
    .resize-handle.nw,
    .resize-handle.ne,
    .resize-handle.sw,
    .resize-handle.se {
        width: 24px;
        height: 24px;
    }
    
    .resize-handle.n,
    .resize-handle.s {
        width: 40px;
        height: 12px;
    }
    
    .resize-handle.w,
    .resize-handle.e {
        width: 12px;
        height: 40px;
    }
    
    .crop-controls {
        bottom: 30px;
        gap: 10px;
    }
    
    .crop-btn {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .crop-ratio-controls {
        top: 30px;
        flex-direction: column;
    }
}

/* Body states for better UX */
body.crop-dragging,
body.crop-resizing {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body.crop-dragging * {
    cursor: grabbing !important;
}

/* Preview item update feedback */
.preview-item.updated,
.image-preview-container.updated {
    animation: preview-updated 2s ease-in-out;
    border: 2px solid #0095f6;
}

@keyframes preview-updated {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 149, 246, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 149, 246, 0);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 149, 246, 0);
        transform: scale(1);
    }
}

/* Enhanced edit overlay buttons */
.preview-item,
.image-preview-container {
    position: relative;
}

.preview-item .edit-overlay,
.image-preview-container .edit-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 149, 246, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 20;
    font-size: 22px;
    pointer-events: all !important;
}

.preview-item:hover .edit-overlay,
.image-preview-container:hover .edit-overlay {
    opacity: 1;
    transform: scale(1.1);
}

/* Mobile: always show edit overlay */
@media (max-width: 768px), (hover: none) {
    .preview-item .edit-overlay,
    .image-preview-container .edit-overlay {
        opacity: 0.8 !important;
    }
}

.edit-overlay:hover {
    background: rgba(24, 119, 242, 0.95) !important;
    transform: scale(1.2) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Profile picture edit button styling */
#profile-picture-edit-btn {
    background: linear-gradient(45deg, #0095f6, #1877f2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 149, 246, 0.3);
}

#profile-picture-edit-btn:hover {
    background: linear-gradient(45deg, #1877f2, #0653d3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 149, 246, 0.4);
}

#profile-picture-edit-btn i {
    margin-right: 4px;
}

/* Preview item update feedback */
.preview-item.updated,
.image-preview-container.updated {
    animation: preview-updated 2s ease-in-out;
    border: 2px solid #00c4b4;
}

@keyframes preview-updated {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 196, 180, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 196, 180, 0);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 196, 180, 0);
        transform: scale(1);
    }
}

/* Enhanced edit overlay buttons */
.preview-item,
.image-preview-container {
    position: relative;
}

.preview-item .edit-overlay,
.image-preview-container .edit-overlay {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 196, 180, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.7; /* Always visible on mobile */
    transition: all 0.3s ease;
    z-index: 20; /* Higher z-index */
    font-size: 22px;
    pointer-events: all !important; /* Ensure clicks work */
}

.preview-item:hover .edit-overlay,
.image-preview-container:hover .edit-overlay {
    opacity: 1;
    transform: scale(1.1);
}

/* Mobile: always show edit overlay */
@media (max-width: 768px), (hover: none) {
    .preview-item .edit-overlay,
    .image-preview-container .edit-overlay {
        opacity: 0.8 !important;
    }
}

.edit-overlay:hover {
    background: rgba(0, 160, 148, 0.95) !important;
    transform: scale(1.2) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Profile picture edit button styling */
#profile-picture-edit-btn {
    background: linear-gradient(45deg, #00c4b4, #00a094);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 196, 180, 0.3);
}

#profile-picture-edit-btn:hover {
    background: linear-gradient(45deg, #00a094, #008f7a);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 196, 180, 0.4);
}

#profile-picture-edit-btn i {
    margin-right: 4px;
}

/* Grid lines for better crop visualization */
.crop-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.3) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.3) 1px, transparent 1px);
    background-size: 33.33% 33.33%;
    pointer-events: none;
}

.edit-tools {
    flex: 1;
    padding: 20px;
    background: var(--background-on-hover);
    overflow-y: auto;
}

.tool-group {
    margin-bottom: 25px;
}

/* ========================================
   MOBILE RESPONSIVE - IMAGE CROP MODAL
   ======================================== */

@media (max-width: 768px) {
    .edit-media-modal {
        width: 100%;
        height: 100%;
        max-width: 100%;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    .edit-media-header {
        padding: 12px 16px;
        min-height: 50px;
        position: sticky;
        top: 0;
        z-index: 20;
        background: var(--background-color);
        border-bottom: 1px solid var(--secondary-font-color);
    }
    
    .edit-media-header .edit-title {
        font-size: 1rem;
    }
    
    .edit-media-header .back-btn,
    .edit-media-header .save-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 70px;
    }
    
    .edit-media-content {
        flex: 1;
        flex-direction: column;
        overflow: hidden;
    }
    
    .media-preview-container {
        flex: 1;
        min-height: 50vh;
        max-height: 60vh;
        background: #000;
        position: relative;
        overflow: hidden;
    }
    
    .media-preview-container img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        max-width: 100%;
        max-height: 100%;
    }
    
    .edit-tools {
        flex: none;
        max-height: 40vh;
        min-height: 200px;
        padding: 16px;
        overflow-y: auto;
        background: var(--background-color);
        border-top: 1px solid var(--secondary-font-color);
    }
    
    .tool-group {
        margin-bottom: 20px;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 15px;
    }
    
    .tool-group:last-child {
        border-bottom: none;
        margin-bottom: 20px; /* Normal spacing */
    }
    
    .tool-group h4 {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    /* Crop box optimizations for mobile */
    .crop-box {
        border-width: 2px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .crop-box::before {
        width: 16px;
        height: 16px;
        border-width: 1px;
    }
    
    .resize-handle {
        width: 12px;
        height: 12px;
    }
    
    /* Touch-friendly buttons */
    .crop-btn,
    .tool-btn {
        padding: 12px 16px;
        font-size: 14px;
        margin: 5px;
        min-height: 44px;
        border-radius: 8px;
    }
    
    /* Sticky save button for mobile crop */
    .edit-media-header .save-btn {
        position: sticky;
        right: 16px;
        background: var(--primary-color);
        color: white;
        z-index: 21;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .edit-media-header {
        padding: 10px 12px;
        min-height: 45px;
    }
    
    .edit-media-header .back-btn,
    .edit-media-header .save-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 60px;
    }
    
    .media-preview-container {
        min-height: 45vh;
        max-height: 55vh;
    }
    
    .edit-tools {
        padding: 12px;
        min-height: 180px;
        max-height: 45vh;
    }
    
    .crop-box {
        min-width: 35px;
        min-height: 35px;
    }
    
    .resize-handle {
        width: 10px;
        height: 10px;
    }
}

/* Mobile-specific enhancements */
@media (max-width: 768px) {
    /* Save button pulse animation */
    .mobile-save-pulse {
        animation: savePulse 2s ease-in-out infinite;
    }
    
    @keyframes savePulse {
        0%, 100% {
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
            transform: scale(1);
        }
        50% {
            box-shadow: 0 4px 16px rgba(0, 196, 180, 0.4);
            transform: scale(1.05);
        }
    }
    
    /* Scroll indicator */
    .scroll-indicator {
        background: rgba(0, 196, 180, 0.1);
        border: 1px solid var(--primary-color);
        border-radius: 8px;
        padding: 8px 12px;
        text-align: center;
        margin-bottom: 15px;
        color: var(--primary-color);
        font-size: 12px;
        animation: slideInDown 0.5s ease;
    }
    
    .scroll-indicator i {
        display: block;
        margin-bottom: 4px;
        animation: bounce 2s infinite;
    }
    
    @keyframes slideInDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    @keyframes bounce {
        0%, 20%, 50%, 80%, 100% {
            transform: translateY(0);
        }
        40% {
            transform: translateY(-5px);
        }
        60% {
            transform: translateY(-3px);
        }
    }
    
    /* Image preview touch optimizations */
    .media-preview-container {
        touch-action: pan-x pan-y;
        -webkit-overflow-scrolling: touch;
    }
    
    .crop-box {
        touch-action: none;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

.tool-group label {
    display: block;
    font-weight: 600;
    color: var(--font-color);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.crop-presets,
.filter-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.crop-btn,
.crop-trigger-btn,
.filter-btn {
    background: var(--background-color);
    border: 1px solid var(--secondary-font-color);
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    color: var(--font-color);
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    width: 100%;
}

.crop-btn:hover,
.crop-trigger-btn:hover,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.crop-trigger-btn {
    background: #0095f6;
    color: white;
    border-color: #0095f6;
    font-weight: 600;
}

.crop-trigger-btn:hover {
    background: #0084e6;
    border-color: #0084e6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 149, 246, 0.3);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.adjustment-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.control-item span {
    font-size: 0.85rem;
    color: var(--second-font-color);
    min-width: 80px;
}

.control-item input[type="range"] {
    flex: 1;
    height: 4px;
    background: var(--secondary-font-color);
    border-radius: 2px;
    outline: none;
}

.control-item input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

/* Save media button styling */
.save-media-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    min-width: 160px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.save-media-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

.save-media-btn:active {
    transform: translateY(0);
}

.save-controls {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: 15px;
}

/* Mobile-friendly crop trigger button */
.crop-trigger {
    margin-bottom: 15px;
}

.crop-trigger-btn {
    background: #0095f6;
    color: white;
    border-color: #0095f6;
    font-weight: 600;
    width: 100%;
    padding: 12px 20px;
    font-size: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(0, 149, 246, 0.3);
}

.crop-trigger-btn:hover {
    background: #0084e6;
    border-color: #0084e6;
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(0, 149, 246, 0.4);
}

.video-trim {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-trim input[type="range"] {
    width: 100%;
}

.video-trim span {
    font-size: 0.8rem;
    color: var(--second-font-color);
}

/* Video tools styling */
.video-tools .tool-group {
    margin-bottom: 20px;
}

.video-tools .save-controls {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* Mobile responsive for edit modal */
@media (max-width: 768px) {
    .edit-media-modal {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .edit-media-header {
        padding: 12px 16px;
    }
    
    .edit-media-header .back-btn,
    .edit-media-header .save-btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 70px;
    }
    
    .edit-media-header .edit-title {
        font-size: 1rem;
    }
    
    .edit-media-content {
        flex-direction: column;
        position: relative;
    }
    
    .media-preview-container {
        flex: 1;
        min-height: 300px;
    }
    
    .edit-tools {
        flex: none;
        max-height: 50%;
        position: relative;
        padding-bottom: 20px; /* Normal spacing */
    }
    
    /* Move save controls to top of tools for better visibility */
    .edit-tools .tool-group:first-child {
        order: 2; /* Push other tool groups down */
    }
    
    .edit-tools .save-controls {
        order: 1; /* Bring save controls to top */
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        background: var(--background-color);
        border: 2px solid var(--primary-color);
        border-radius: 12px;
        padding: 15px 20px;
        margin: 10px 0 20px 0;
        z-index: auto;
        box-shadow: 0 4px 15px rgba(0, 196, 180, 0.2);
    }
    
    .edit-tools .save-media-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        font-weight: 700;
        min-width: auto;
        border-radius: 12px;
        background: var(--primary-color);
        color: white;
        border: none;
        box-shadow: 0 4px 15px rgba(0, 196, 180, 0.3);
        transition: all 0.3s ease;
    }
    
    .edit-tools .save-media-btn:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 196, 180, 0.4);
    }
    
    .crop-presets,
    .filter-options {
        justify-content: center;
    }
    
    /* Make sure crop image button is easily accessible */
    .crop-trigger-btn {
        position: relative;
        top: auto;
        z-index: auto;
        width: 100%;
        margin-bottom: 15px;
        padding: 14px 20px;
        font-size: 16px;
        font-weight: 700;
        background: #0095f6;
        color: white;
        border: none;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 149, 246, 0.3);
    }
    
    .crop-trigger-btn:hover {
        background: #0084e6;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 149, 246, 0.4);
    }
    
    /* Specific optimizations for video and image tools - scrollable design */
    .video-tools .save-controls,
    .image-tools .save-controls {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        background: var(--background-color);
        border: 2px solid var(--primary-color);
        border-radius: 12px;
        padding: 15px 20px;
        margin: 10px 0 20px 0;
        z-index: auto;
        box-shadow: 0 4px 15px rgba(0, 196, 180, 0.2);
        order: 1; /* Bring to top of tools */
    }
    
    .video-tools .save-media-btn,
    .image-tools .save-media-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        font-weight: 700;
        min-width: auto;
        border-radius: 12px;
        background: var(--primary-color);
        color: white;
        border: none;
        box-shadow: 0 4px 15px rgba(0, 196, 180, 0.3);
        transition: all 0.3s ease;
    }
    
    .video-tools .save-media-btn:hover,
    .image-tools .save-media-btn:hover {
        background: var(--primary-dark);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 196, 180, 0.4);
    }
    
    .video-tools .tool-group,
    .image-tools .tool-group {
        order: 2; /* Push other tool groups below save controls */
    }
    
    /* Remove extra bottom spacing */
    .video-tools,
    .image-tools {
        padding-bottom: 20px; /* Normal spacing */
        display: flex;
        flex-direction: column;
    }
    
    .step-navigation {
        padding: 15px 0;
        gap: 8px;
    }
    
    .btn-step-back,
    .btn-step-next {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .btn-post-primary {
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* Step navigation buttons */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    gap: 10px;
}

.btn-step-back,
.btn-step-next {
    background: var(--light-bg);
    color: var(--font-color);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-step-next {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-step-back:hover {
    background: var(--background-on-hover);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-step-next:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Post button styling */
.btn-post-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-post-primary:hover {
    background: #009688;
    transform: translateY(-2px);
}

.btn-post-primary i {
    font-size: 1.1rem;
}


.create-form-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--background-color);
    border-bottom: 1px solid var(--secondary-font-color);
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top));
    z-index: 10001;
    align-items: center;
    justify-content: space-between;
    /* Ensure visibility on all devices */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.create-form-header .back-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--font-color);
    cursor: pointer;
    padding: 8px;
}

.create-form-header .form-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--font-color);
}

.create-form-header .action-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    min-width: 80px;
    text-align: center;
    transition: all 0.3s ease;
    /* iOS fixes */
    -webkit-appearance: none;
    appearance: none;
}

.create-form-header .action-btn:disabled {
    background: var(--secondary-font-color);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Different styles for final step */
.create-form-header .action-btn.publish-btn {
    background: var(--success-color);
    font-weight: bold;
    transform: scale(1.05);
}

.create-form-header .action-btn.publish-btn:hover {
    background: #28a745;
    transform: scale(1.08);
}

/* iOS specific fixes for create form header */
@supports (-webkit-touch-callout: none) {
    .create-form-header {
        /* Ensure header is always visible on iOS */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    .create-form-header .action-btn {
        /* Ensure button is tappable on iOS */
        -webkit-tap-highlight-color: transparent;
        -webkit-user-select: none;
        user-select: none;
        /* Better visibility */
        min-height: 44px;
        min-width: 88px;
        font-size: 16px !important; /* Prevent zoom */
    }
}

/* Mobile responsive create form */
@media (max-width: 768px) {
    /* Show Instagram-style header when create form is active */
    body.create-form-active .create-form-header {
        display: flex !important;
    }
    
    /* Hide regular title when header is shown */
    body.create-form-active #create-form h2 {
        display: none;
    }
    
    /* Full screen form when create form is active */
    body.create-form-active #create-form {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        padding: 70px 20px 100px 20px !important;
        transform: none !important;
        overflow-y: auto;
        z-index: 9998;
    }
    
    /* Fixed bottom navigation for create form */
    body.create-form-active .step-navigation {
        position: fixed;
        bottom: 0;
        left: 0;     
        right: 0;
        background: var(--background-color);
        padding: 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--secondary-font-color);
        z-index: 9999;
        margin-top: 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }
    
    body.create-form-active .step-navigation button {
        min-width: 80px;
        padding: 12px 16px;
        font-size: 0.9rem;
        font-weight: 600;
        border-radius: 25px;
        flex: 1;
        max-width: 150px;
    }
    
    /* Ensure next/submit button is always primary */
    body.create-form-active .step-navigation #next-step,
    body.create-form-active .step-navigation button[type="submit"] {
        background: var(--primary-color) !important;
        color: white !important;
    }
}

/* Instagram-style image preview with edit options */
.image-preview {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding: 10px 0;
}

.preview-item {
    position: relative;
    border-radius: 12px;
    overflow: visible;
    background: var(--background-on-hover);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.preview-item img,
.preview-item video {
    width: 350px;
    height: 400px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

/* Instagram-style edit button outside image */
.edit-overlay {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 1;
}

.preview-item:hover .edit-overlay {
    background: var(--primary-dark);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.edit-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.edit-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.edit-btn:hover {
    background: white;
    transform: scale(1.1);
}

.edit-btn.delete {
    background: rgba(255, 59, 48, 0.9);
    color: white;
}

.edit-btn.delete:hover {
    background: #ff3b30;
}

/* Next/Continue button styling like Instagram */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #009688;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--secondary-font-color);
    cursor: not-allowed;
    transform: none;
}

/* Upload area enhancements */
.pipo-upload-area {
    border: 2px dashed var(--secondary-font-color);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--background-on-hover);
}

.pipo-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(0, 196, 180, 0.05);
}

.pipo-upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(0, 196, 180, 0.1);
    transform: scale(1.02);
}

/* Upload button styling */
.upload-btn {
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    font-weight: 600;
}

.upload-btn:hover {
    background: #009688;
    transform: translateY(-2px);
}
.step-indicator { display: flex; justify-content: center; gap: 12px; margin: 0 auto 18px; }
.step { width: 32px; height: 32px; background: var(--secondary-font-color); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 600; }
.step.active { background: var(--primary-color); }
.step-content { display: none; }
.step-content.active { display: block; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-group label { font-size: 0.88rem; font-weight: 500; color: var(--second-font-color); }
.image-preview { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.image-preview img { width: 88px; height: 88px; border-radius: 10px; object-fit: cover; border: 1px solid var(--secondary-font-color); }
#alertMessageContainer { position: fixed; top: 20px; right: 20px; max-width: 320px; padding: 16px; border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); font-size: 0.85rem; font-weight: 500; z-index: 2000; display: none; }
#alertMessageContainer.alert-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
#alertMessageContainer.alert-error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
/* =================================
   SEARCH FORM STYLES
================================= */
.tm-search-container {
    background: var(--background-color);
    padding: 15px;
    border-radius: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--secondary-font-color);
}

#search-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.tm-search-box {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid var(--secondary-font-color);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--font-color);
    transition: var(--transition);
}

.tm-search-box:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 196, 180, 0.2);
}

.category-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px; /* For scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-on-hover);
}

.category-tabs::-webkit-scrollbar {
    height: 5px;
}

.category-tabs::-webkit-scrollbar-track {
    background: var(--background-on-hover);
    border-radius: 10px;
}

.category-tabs::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid transparent;
    background-color: rgba(175, 221, 255, 0.83);;
    border-radius: 25px; /* Pill shape */
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.category-tab:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.category-tab.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.category-tab i {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .category-tabs {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
        overflow-x: visible;
        padding-bottom: 0;
    }

    .category-tab {
        white-space: normal;
        text-align: center;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    #search-form .tm-search-filter,
    #search-form button[type="submit"] {
        display: none;
    }

    #search-form.show-filters .tm-search-filter,
    #search-form.show-filters button[type="submit"] {
        display: block;
    }
}

.tm-search-filter {
    padding: 12px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 8px;
    background-color: var(--background-color);
    color: var(--font-color);
    font-size: 0.9rem;
    width: 100%;
}

#search-form button[type="submit"] {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

#search-form button[type="submit"]:hover {
    background: #00a394; /* Darker shade of primary */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Grid layout for filters on larger screens */
@media (min-width: 600px) {
    #search-form {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        align-items: center;
    }
    .tm-search-box {
        grid-column: 1 / -1; /* Span full width */
    }
    .category-tabs {
        grid-column: 1 / -1; /* Span full width */
    }
    #search-form button[type="submit"] {
        grid-column: 1 / -1; /* Span full width */
    }
}
.story-section { display: flex; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--secondary-font-color); overflow-x: auto; justify-content: center; }
.story { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.story-image { width: 65px; height: 65px; border-radius: 50%; background: var(--gradient); padding: 2px; display: flex; justify-content: center; align-items: center; }
.story-image img { width: 90%; height: 90%; border-radius: 50%; border: 2px solid var(--background-color); object-fit: cover; }
.story span { font-size: 0.8rem; font-weight: 500; color: var(--font-color); text-align: center; max-width: 74px; overflow: hidden; text-overflow: ellipsis; }
.post-main { background-color: var(--background-color); border-radius: 12px; border: 1px solid var(--secondary-font-color); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); width: 100%; max-width: 470px; margin: 0 auto 20px; }
.post-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; }
.post-image { width: 32px; height: 32px; border-radius: 50%; background: var(--gradient); padding: 2px; display: flex; justify-content: center; align-items: center; }
.post-image img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--background-color); }
.post-username { font-size: 14px; font-weight: 600; color: var(--font-color); }
.business-carousel { position: relative; width: 100%; overflow: hidden; }
.carousel-wrapper { overflow: hidden; width: 100%; }
.carousel-images { display: flex; transition: transform 0.4s ease; }
.carousel-images img { 
    flex-shrink: 0; 
    width: 100%; 
    max-height: 500px; 
    object-fit: cover; 
    background: transparent; 
}
.post-footer { padding: 8px 15px; }
.post-description { padding: 10px 15px; }

/* Post content images - show full images without cropping */
.post-description img,
.business-description img,
.tm-content img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  background: transparent;
  border-radius: 8px;
  display: block;
  margin: 10px 0;
}

.dark-mode .post-description img,
.dark-mode .business-description img,
.dark-mode .tm-content img {
  background: transparent;
}

/* Business post images specifically */
.business-post img,
.user-post img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.dark-mode .business-post img,
.dark-mode .user-post img {
  background: #1a1a1a;
}
.business-title { font-size: 16px; font-weight: 600; color: var(--font-color); margin-bottom: 5px; }
.business-meta { display: flex; gap: 10px; font-size: 13px; color: var(--second-font-color); }
.business-location { font-size: 13px; color: var(--second-font-color); margin-top: 5px; }
.tm-content { max-width: 800px; margin: 0 auto; padding: 20px; }
.tm-collapsible { margin-bottom: 15px; border: 1px solid var(--secondary-font-color); border-radius: 10px; }
.tm-collapsible-header { padding: 12px; background-color: var(--background-on-hover); cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 16px; }
.tm-collapsible-content { display: none; padding: 15px; }
.tm-collapsible-content.active { display: block; }
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; }
.stat-card { padding: 15px; background-color: var(--background-on-hover); border-radius: 10px; text-align: center; }
.stat-card i { font-size: 1.8rem; color: var(--primary-color); margin-bottom: 8px; }
.stat-card h4 { font-size: 14px; margin-bottom: 8px; }

/* Subscription Payment Modal */
#subscription-payment-modal.tm-form-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 400px;
    width: 90%;
}

#subscription-payment-modal.tm-form-container[aria-hidden="false"] {
    display: block;
}

#subscription-payment-modal .modal-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#subscription-payment-modal h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

#subscription-payment-modal h3 {
    font-size: 1.1rem;
    color: var(--font-color);
    margin: 8px 0 4px;
}

#subscription-payment-modal select,
#subscription-payment-modal input[type="tel"] {
    padding: 10px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 5px;
    font-size: 0.9rem;
    color: var(--font-color);
    background: var(--background-color);
    margin-bottom: 8px;
}

#subscription-payment-modal select:focus,
#subscription-payment-modal input[type="tel"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 196, 180, 0.3);
}

#subscription-payment-modal .payment-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 10px;
}

#subscription-payment-modal .payment-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--font-color);
}

#subscription-payment-modal .payment-options input[type="radio"] {
    width: 14px;
    height: 14px;
    accent-color: var(--primary-color);
}

#subscription-payment-modal .mobile-money-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

#subscription-payment-modal .mobile-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: contain;
  padding: 6px;
  margin: 6px;
  background: white;
  border: 2px solid transparent;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

#subscription-payment-modal .mobile-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#subscription-payment-modal .mobile-icon.selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(0, 196, 180, 0.6);
  background-color: #f0faf9;
}

#subscription-payment-modal #mobile-money-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
    margin: 0 auto;
}

#subscription-payment-modal .payment-instructions,
#subscription-payment-modal .pay-later-instructions {
    font-size: 0.85rem;
    color: var(--font-color);
    margin-bottom: 10px;
    text-align: center;
}

#subscription-payment-modal .payment-instructions p,
#subscription-payment-modal .pay-later-instructions p {
    margin: 0;
}

#subscription-payment-modal #total-charges {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
}

#subscription-payment-modal button[type="submit"],
#subscription-payment-modal .tm-form-close {
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 1.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

#subscription-payment-modal button[type="submit"] {
    background: var(--primary-color);
    color: white;
}

#subscription-payment-modal button[type="submit"]:hover {
    background: #009688;
}

#subscription-payment-modal .tm-form-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    color: var(--second-font-color);
}

#subscription-payment-modal .tm-form-close:hover {
    color: var(--font-color);
}

#subscription-payment-modal .loader {
    display: none;
    border: 3px solid var(--secondary-font-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 8px auto;
}

#subscription-payment-modal .loader.show {
    display: block;
}



@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Withdrawal Modal Styles */
#withdrawal-modal.tm-form-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
}

#withdrawal-modal.tm-form-container[aria-hidden="false"],
#withdrawal-modal.tm-form-container.show {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

#withdrawal-modal .withdrawal-modal-content {
    background: var(--background-color);
    padding: 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 380px;
    width: 85%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#withdrawal-modal.show .withdrawal-modal-content {
    transform: scale(1);
}

#withdrawal-modal .modal-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#withdrawal-modal h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    color: var(--font-color);
}

#withdrawal-modal h3 {
    font-size: 1.1rem;
    color: var(--font-color);
    margin: 8px 0 4px;
}

#withdrawal-modal select,
#withdrawal-modal input[type="number"],
#withdrawal-modal input[type="tel"] {
    padding: 10px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 5px;
    font-size: 0.9rem;
    color: var(--font-color);
    background: var(--background-color);
    margin-bottom: 8px;
}

#withdrawal-modal select:focus,
#withdrawal-modal input[type="number"]:focus,
#withdrawal-modal input[type="tel"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 196, 180, 0.3);
}

#withdrawal-modal .payment-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 10px;
}

#withdrawal-modal .payment-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--font-color);
}

#withdrawal-modal .payment-options input[type="radio"] {
    width: 14px;
    height: 14px;
    accent-color: var(--primary-color);
}

#withdrawal-modal .mobile-money-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

#withdrawal-modal .mobile-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: contain;
    padding: 6px;
    margin: 6px;
    background: white;
    border: 2px solid transparent;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.3s, box-shadow 0.3s;
}

#withdrawal-modal .mobile-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#withdrawal-modal .mobile-icon.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 196, 180, 0.6);
    background-color: #f0faf9;
}

#withdrawal-modal #mobile-money-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: contain;
    margin: 0 auto;
}

#withdrawal-modal .withdrawal-amount-display {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(0, 196, 180, 0.1);
    border-radius: 8px;
    border: 2px solid rgba(0, 196, 180, 0.2);
}

#withdrawal-modal .available-balance {
    font-size: 0.9rem;
    color: var(--second-font-color);
    text-align: center;
    margin-bottom: 15px;
}

#withdrawal-modal .withdrawal-instructions {
    font-size: 0.85rem;
    color: var(--font-color);
    margin-bottom: 10px;
    text-align: center;
    padding: 10px;
    background: rgba(0, 196, 180, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

#withdrawal-modal .withdrawal-instructions p {
    margin: 0;
}

#withdrawal-modal .withdrawal-fee-info {
    font-size: 0.8rem;
    color: var(--second-font-color);
    text-align: center;
    margin-bottom: 15px;
    font-style: italic;
}

#withdrawal-modal .tm-form-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    color: var(--second-font-color);
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

#withdrawal-modal .tm-form-close:hover {
    color: var(--font-color);
}

#withdrawal-modal button[type="submit"] {
    background: var(--primary-color);
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

#withdrawal-modal button[type="submit"]:hover {
    background: #009688;
}

#withdrawal-modal .loader {
    display: none;
    border: 3px solid var(--secondary-font-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 8px auto;
}

#withdrawal-modal .loader.show {
    display: block;
}

/* Withdrawal form validation styles */
#withdrawal-modal .form-error {
    color: var(--danger-color);
    font-size: 0.8rem;
    margin-top: -5px;
    margin-bottom: 10px;
    display: none;
}

#withdrawal-modal .form-error.show {
    display: block;
}

#withdrawal-modal input.error {
    border-color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
}

#withdrawal-modal input.error:focus {
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.3);
}

/* Responsive design for withdrawal modal */
@media (max-width: 480px) {
    #withdrawal-modal .withdrawal-modal-content {
        max-width: 320px;
        width: 90%;
        max-height: 85vh;
    }
    
    #withdrawal-modal .modal-content {
        padding: 15px;
    }
    
    #withdrawal-modal h2 {
        font-size: 1.1rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    #withdrawal-modal .withdrawal-modal-content {
        max-width: 350px;
        width: 85%;
    }
}

/* Payment Modal CSS for JavaScript-generated modals */
.payment-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.payment-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.payment-modal .modal-content {
    background-color: var(--background-color);
    padding: 0;
    border-radius: 15px;
    width: 85%;
    max-width: 380px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.payment-modal .modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--secondary-font-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.payment-modal .modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: white;
}

.payment-modal .close-modal {
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    padding: 0 10px;
    color: white;
}

.payment-modal .modal-body {
    padding: 20px;
}

.payment-modal .balance-display {
    background: var(--secondary-background-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.payment-modal .balance-display p {
    margin: 0;
    color: var(--font-color);
}

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

.payment-modal .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--font-color);
    font-size: 0.9rem;
}

.payment-modal .form-group input,
.payment-modal .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--background-color);
    color: var(--font-color);
    box-sizing: border-box;
}

.payment-modal .form-group input:focus,
.payment-modal .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.payment-modal .form-group small {
    color: var(--secondary-font-color);
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
}

.payment-modal .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.payment-modal .btn-secondary,
.payment-modal .btn-primary {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.payment-modal .btn-secondary {
    background-color: var(--secondary-font-color);
    color: white;
}

.payment-modal .btn-secondary:hover {
    background-color: #5a6268;
}

.payment-modal .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.payment-modal .btn-primary:hover {
    background-color: #5a6bcf;
}

.payment-modal .loader-container {
    display: none;
    text-align: center;
    padding: 30px 20px;
}

.payment-modal .loader-container.show {
    display: block;
}

.payment-modal .loader-container p {
    margin: 15px 0 0 0;
    color: var(--font-color);
}

.payment-modal .loader {
    border: 3px solid var(--secondary-font-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Modal animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design for payment modal */
@media (max-width: 480px) {
    .payment-modal .modal-content {
        max-width: 320px;
        width: 90%;
        margin: 0 10px;
    }
    
    .payment-modal .modal-body {
        padding: 15px;
    }
    
    .payment-modal .modal-header {
        padding: 15px;
    }
    
    .payment-modal .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .payment-modal .form-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .payment-modal .btn-secondary,
    .payment-modal .btn-primary {
        width: 100%;
        padding: 10px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .payment-modal .modal-content {
        max-width: 350px;
        width: 85%;
    }
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 975px;
    margin: 0 auto;
    padding: 20px;
}



/* Post Section */
.post-section {
    max-width: 660px;
    margin: 0 auto;
}


#search-lite {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-text {
    padding: 10px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 5px;
    font-size: 0.9rem;
    flex: 1;
    background-color: var(--background-color);
    color: var(--font-color);
}



@media (max-width: 480px) {
    .tm-search-selects {
        flex-direction: column;
        gap: 6px;
    }
}




/* Story Section */
.story-section {
    display: flex;
    gap: 10px;
    padding: 16px 0;
    border-bottom: 1px solid var(--secondary-font-color);
    overflow-x: auto;
    justify-content: center;
}

.story {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.story-image {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--gradient);
    padding: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.story-image img {
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 2px solid var(--background-color);
    object-fit: cover;
}

.story span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--font-color);
    text-align: center;
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Container ya post zote */
.post-section {
    padding: 30px 15px;
}

.post-section .container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 15px;
}

.post-section .tm-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
}

/* Post moja moja */
.post-main {
    background-color: var(--background-color);
    border-radius: 12px;
    border: 1px solid var(--secondary-font-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 470px; /* kama Instagram */
    padding-bottom: 15px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px; /* space kati ya post */
}

/* Divider kwa desktop kati ya post */
@media (min-width: 936px) {
    .post-main::after {
        content: "";
        position: absolute;
        bottom: -15px;
        left: 0;
        width: 100%;
        height: 1px;
        background-color: var(--secondary-font-color);
    }

    .tm-list .post-main:last-child::after {
        content: none;
    }
}

/* Post header */
.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}

/* Profile image */
.post-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient);
    padding: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.post-image img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--background-color);
}

/* Username and timestamp */
.post-username {
    font-size: 14px;
    font-weight: 600;
    color: var(--font-color);
}

.one-day {
    font-size: 12px;
    color: var(--second-font-color);
}


.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
}

.post-footer-left {
    display: flex;
    gap: 20px;
}

.like-section, .comment-section, .share-section, .view-section {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.view-section {
    cursor: default; /* Views are not clickable */
}

.like-section span, .comment-section span, .share-section span, .view-section span {
    font-size: 0.9rem;
    color: var(--second-font-color);
}

.view-section i {
    color: var(--second-font-color) !important;
    cursor: default;
}

.like-section:hover i, .comment-section:hover i, .share-section:hover i {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.view-section .view-count {
    font-weight: 500;
}

.post-footer i {
    font-size: 1.2rem;
    color: var(--font-color);
    cursor: pointer;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.post-footer i:hover {
    color: var(--primary-color);
}

.post-footer i.fa-comment.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.post-description {
    padding: 10px 15px;
}

.business-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--font-color);
    margin-bottom: 5px;
}

#business-description {
    resize: vertical;
    min-height: 80px;
    max-height: 240px;
    line-height: 1.5;
    overflow-y: auto;
    white-space: pre-wrap;
}

.business-meta {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: var(--second-font-color);
}

.business-price,
.business-category {
    font-weight: 500;
}

.business-location {
    font-size: 13px;
    color: var(--second-font-color);
    margin-top: 5px;
}

/* Follow Section */
.follow-section {
    width: 320px;
    padding: 20px;
    margin-top: 30px;
}

.suggestion-follow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.suggestion {
    font-size: 16px;
    font-weight: 600;
    color: var(--second-font-color);
}

.view-all {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.view-all:hover {
    color: #009688;
}

.profile-follow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.profile-follow:hover {
    background-color: var(--background-on-hover);
    border-radius: 8px;
}

.profile-follow-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-follow-img {
    width: 44px;
    height: 44px;
}

.profile-follow-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-follow-content {
    display: flex;
    flex-direction: column;
}

.profile-id {
    font-size: 13px;
    font-weight: 600;
    color: var(--font-color);
}

.profile-name {
    font-size: 12px;
    color: var(--second-font-color);
}

.follow {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.follow:hover {
    color: #009688;
}

.copyright {
    font-size: 12px;
    color: var(--second-font-color);
    text-align: center;
    margin-top: 20px;
}

/* User Dashboard */
.tm-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.tm-collapsible {
    margin-bottom: 15px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 10px;
}

.tm-collapsible-header {
    padding: 12px;
    background-color: var(--background-on-hover);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-family: 'Signika', sans-serif;
    font-weight: 600;
    color: var(--font-color);
}

.tm-collapsible-content {
    display: none;
    padding: 15px;
}

.tm-collapsible-content.active {
    display: block;
}

.tm-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.stat-card {
    padding: 15px;
    background-color: var(--background-on-hover);
    border-radius: 10px;
    text-align: center;
}

.stat-card i {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.stat-card h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-card p {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
}

/* Admin Dashboard */
.admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-dashboard h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--secondary-font-color);
}

.admin-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--font-color);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 14px;
}

.admin-tab.active,
.admin-tab:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.admin-tab-content {
    display: none;
    padding: 20px;
    min-height: 300px;
}

.admin-tab-content.active {
    display: block !important;
}

/* Stats Grid for Admin Overview */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid var(--primary-color);
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

/* Reports Section */
.reports-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.report-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.report-filters input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.report-filters button {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.admin-stat-card {
    padding: 15px;
    background-color: var(--background-on-hover);
    border-radius: 10px;
    text-align: center;
}

.admin-stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.admin-stat-card h3 {
    font-size: 14px;
    margin-bottom: 8px;
}

.admin-stat-card p {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
}

/* Invoice Reports Styles */
.report-section {
    margin-bottom: 30px;
}

.report-section h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.invoice-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.report-card {
    padding: 20px;
    background-color: var(--background-on-hover);
    border-radius: 10px;
}

.report-card h4 {
    margin-bottom: 15px;
    text-align: center;
}

/* Invoice table responsive styles */
#admin-invoices-table {
    width: 100%;
    font-size: 14px;
}

#admin-invoices-table th,
#admin-invoices-table td {
    padding: 8px;
    text-align: left;
}

.text-success {
    color: #28a745;
    font-weight: bold;
}

.text-warning {
    color: #ffc107;
    font-weight: bold;
}

.text-danger {
    color: #dc3545;
    font-weight: bold;
}

/* Mobile responsiveness for admin tables */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .admin-stat-card {
        padding: 10px;
    }
    
    .admin-stat-card h3 {
        font-size: 12px;
    }
    
    .admin-stat-card p {
        font-size: 20px;
    }
    
    .invoice-filters {
        flex-direction: column;
        gap: 5px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    #admin-invoices-table {
        font-size: 12px;
    }
    
    #admin-invoices-table th,
    #admin-invoices-table td {
        padding: 5px;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.admin-section-header h3 {
    font-size: 16px;
}

.filter-controls select {
    padding: 8px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 6px;
    font-size: 13px;
}

.admin-table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th,
.admin-table td {
    padding: 10px;
    border: 1px solid var(--secondary-font-color);
    text-align: left;
}

/* Modals */
.tm-form-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background-color);
    padding: 24px 20px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 420px;
    width: 94%;
    font-family: 'Inter', sans-serif;
}


.tm-form-container[aria-hidden="false"] {
    display: block;
}

.tm-form-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--second-font-color);
    cursor: pointer;
    transition: var(--transition);
}

.tm-form-close:hover {
    color: var(--font-color);
}

.tm-form-container h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 14px;
    text-align: center;
    color: var(--font-color);
}


.tm-form-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tm-form-container input,
.tm-form-container select,
.tm-form-container textarea {
    padding: 10px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 5px;
    font-size: 0.9rem;
    color: var(--font-color);
    background: var(--background-color);
}

.tm-form-container input::placeholder,
.tm-form-container select:invalid {
    color: var(--secondary-font-color);
    font-style: italic;
}

.tm-form-container input:focus,
.tm-form-container select:focus,
.tm-form-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 196, 180, 0.3);
}

.tm-form-container button {
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}


.btn-primary:hover {
    background: #009688;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: #eee;
    color: #333;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}


.btn-secondary:hover {
    background: #999999;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Login Modal */
#login-form.tm-form-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    max-width: 450px;
    width: 90%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

#login-form.tm-form-container[aria-hidden="false"] {
    display: block;
}

#login-form .tm-form-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--second-font-color);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

#login-form .tm-form-close:hover {
    color: var(--font-color);
    transform: scale(1.1);
}

#login-form h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    font-family: 'Signika', sans-serif;
    color: var(--font-color);
}

#login-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#login-form input[type="email"],
#login-form input[type="password"] {
    padding: 12px 15px;
    border: 2px solid var(--secondary-font-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--font-color);
    background: var(--background-color);
    transition: all 0.3s ease;
}

#login-form input[type="email"]::placeholder,
#login-form input[type="password"]::placeholder {
    color: var(--secondary-font-color);
}

#login-form input[type="email"]:focus,
#login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 196, 180, 0.1);
}

#login-form button[type="submit"] {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#login-form button[type="submit"]:hover {
    background: #00a693;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Register Modal */
#register-form.tm-form-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    max-width: 450px;
    width: 90%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    max-height: 90vh;
    overflow-y: auto;
}

#register-form.tm-form-container::-webkit-scrollbar {
    width: 6px;
}

#register-form.tm-form-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#register-form.tm-form-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

#register-form.tm-form-container[aria-hidden="false"] {
    display: block;
}

#register-form .tm-form-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--second-font-color);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

#register-form .tm-form-close:hover {
    color: var(--font-color);
    transform: scale(1.1);
}

#register-form h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    font-family: 'Signika', sans-serif;
    color: var(--font-color);
}

#register-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#register-form input[type="text"],
#register-form input[type="email"],
#register-form input[type="password"],
#register-form select {
    padding: 12px 15px;
    border: 2px solid var(--secondary-font-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--font-color);
    background: var(--background-color);
    transition: all 0.3s ease;
}

#register-form input[type="text"]::placeholder,
#register-form input[type="email"]::placeholder,
#register-form input[type="password"]::placeholder,
#register-form select:invalid {
    color: var(--secondary-font-color);
}

#register-form input[type="text"]:focus,
#register-form input[type="email"]:focus,
#register-form input[type="password"]:focus,
#register-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 196, 180, 0.1);
}

#register-form button[type="submit"] {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#register-form button[type="submit"]:hover {
    background: #00a693;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Form Footer Links */
.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.form-footer p {
    color: var(--second-font-color);
    font-size: 0.9rem;
    margin: 0;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-footer a:hover {
    color: #00a693;
    text-decoration: underline;
}

/* Form Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0 auto 18px;
}

.step {
    width: 32px;
    height: 32px;
    background: var(--secondary-font-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.step.active {
    background: var(--primary-color);
}

/* Step Section Visibility */
.step-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.step-content.active {
    display: block;
}

/* Fade effect */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Group Styling */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

/* Form Labels */
.form-group label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--second-font-color);
    padding-left: 2px;
}

/* Image Preview Styling */
.image-preview {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 4px;
}

.image-preview img {
    width: 88px;
    height: 88px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--secondary-font-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    background: #f9f9f9;
}


/* Alerts */
#alertMessageContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 320px;
    padding: 16px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 2000;
    display: none;
}

#alertMessageContainer.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#alertMessageContainer.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#alertMessageContainer.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ========================================
   MODERN NOTIFICATION SYSTEM
======================================== */

/* Notification Container */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 420px;
    width: 100%;
}

/* Base Notification Styles */
.notification {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.3);
    margin-bottom: 15px;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 5px solid #2E7D32;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(450px);
    opacity: 0;
}

/* Animated background pattern */
.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.1) 75%, transparent 75%);
    background-size: 20px 20px;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

/* Notification Header */
.notification-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.notification-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    animation: pulse 2s infinite;
    font-size: 18px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.notification-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    position: relative;
    z-index: 1;
}

.notification-message {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.notification-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 2;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* User Info Section */
.user-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}

.user-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
}

.user-info-row:last-child {
    margin-bottom: 0;
}

.user-info-label {
    opacity: 0.9;
    font-weight: 500;
}

.user-info-value {
    font-weight: 600;
    text-align: right;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Profile Picture Preview */
.profile-picture-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    position: relative;
    z-index: 1;
}

.profile-picture-preview img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.profile-picture-info {
    flex: 1;
}

.profile-picture-status {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.profile-picture-url {
    font-size: 11px;
    opacity: 0.7;
    word-break: break-all;
}

/* Progress bar for auto-close */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    width: 100%;
    transform-origin: left;
    animation: progressBar 5s linear forwards;
}

@keyframes progressBar {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Notification Variants */
.notification.error {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    border-left-color: #c62828;
    box-shadow: 0 8px 32px rgba(244, 67, 54, 0.3);
}

.notification.warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border-left-color: #e65100;
    box-shadow: 0 8px 32px rgba(255, 152, 0, 0.3);
}

.notification.info {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    border-left-color: #1565c0;
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.3);
}

/* Success Animation Effects */
.notification.success .notification-icon {
    animation: successBounce 0.6s ease-out;
}

@keyframes successBounce {
    0% { transform: scale(0) rotate(-180deg); }
    50% { transform: scale(1.3) rotate(-90deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Profile Update Specific Styles */
.notification.profile-update {
    max-width: 450px;
}

.notification.profile-update .notification-message {
    margin-bottom: 10px;
}

/* Location Update Styles */
.notification.location-update .notification-icon::before {
    content: '📍';
}

/* Dark Mode Support */
body.dark-mode .notification {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

body.dark-mode .user-info {
    background: rgba(0, 0, 0, 0.2);
}

body.dark-mode .profile-picture-preview {
    background: rgba(0, 0, 0, 0.2);
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .notification-container {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }
    
    .notification {
        transform: translateY(-100px);
        padding: 15px 20px;
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .notification.hide {
        transform: translateY(-100px);
    }
    
    .user-info-value {
        max-width: 150px;
    }
    
    .notification-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .profile-picture-preview img {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 320px) {
    .notification {
        padding: 12px 15px;
    }
    
    .notification-title {
        font-size: 14px;
    }
    
    .notification-message {
        font-size: 13px;
    }
}

/* Invoice List (Mobile Default) */
.invoice-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.invoice-item {
    background: var(--background-color);
    border: 1px solid var(--secondary-font-color);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.invoice-item-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.invoice-item-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--font-color);
}

.invoice-item-content p strong {
    color: var(--primary-color);
}

/* Invoice Table */
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--font-color);
}

.invoice-table th,
.invoice-table td {
    padding: 12px;
    border: 1px solid var(--secondary-font-color);
    text-align: left;
}

.invoice-table th {
    background: var(--background-on-hover);
    font-weight: bold;
}

.invoice-table td {
    background: var(--background-color);
}

.invoice-table tr:nth-child(even) {
    background: var(--background-on-hover);
}

/* Toggle View Button (Mobile Only) */
.toggle-view-btn {
    display: none;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: var(--transition);
}

.toggle-view-btn:hover {
    background: #009688;
}

/* Pay Button */
.btn-pay {
    padding: 8px 16px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-pay:hover {
    background: #218838;
}

/* Post Options */
.post-options {
    position: relative;
}

.post-options-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    color: var(--font-color);
}

.post-options-toggle:hover {
    color: var(--primary-color);
}

.post-options-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--background-color);
    border: 1px solid var(--secondary-font-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    min-width: 120px;
}

.post-options-dropdown.show {
    display: block;
}

.post-options-dropdown a {
    display: block;
    padding: 8px 12px;
    color: var(--font-color);
    text-decoration: none;
    font-size: 14px;
}

.post-options-dropdown a:hover {
    background: var(--background-on-hover);
}

.post-options-dropdown .delete-option {
    color: var(--danger-color);
}

.post-options-dropdown .delete-option:hover {
    background: #ffe6e6;
}

/* Responsive Design */
.mobile-header {
    display: none; /* Hidden by default */
}

@media (max-width: 935px) {
    body {
        overflow-y: hidden; /* Prevent body from scrolling */
    }
    .container {
        height: 100vh;
        overflow: hidden;
    }
    .navbar {
        display: none !important;
    }
    .nav-hidden {
        display: flex !important;
    }
    .main-content {
        padding: 0;
        max-width: 100%;
        
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: 50px; /* Space for mobile header */
        padding-bottom: 70px; /* Space for bottom nav */
    }
    .post-section {
        max-width: 100%;
        padding: 0;
    }
    .post-main {
        max-width: 100%;
        
        scroll-snap-align: start; /* Snap to the start of each post */
        display: flex;
        flex-direction: column;
    }
    .follow-section {
        display: none;
    }
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.2); /* Semi-transparent background */
        z-index: 1001;
        backdrop-filter: blur(10px);
    }
    .mobile-logo img {
        height: 30px;
        width: auto;
    }
    
    /* Mobile Language Toggle */
    .mobile-header-controls {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .mobile-language-toggle {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 12px;
        background: rgba(0, 196, 180, 0.1);
        border: 1px solid rgba(0, 196, 180, 0.3);
        border-radius: 20px;
        cursor: pointer;
        transition: all 0.3s ease;
        backdrop-filter: blur(5px);
    }
    
    .mobile-language-toggle:hover {
        background: rgba(0, 196, 180, 0.2);
        border-color: rgba(0, 196, 180, 0.5);
        transform: scale(1.05);
    }
    
    .mobile-language-toggle i {
        font-size: 14px;
        color: var(--primary-color);
    }
    
    .mobile-language-toggle span {
        font-size: 12px;
        font-weight: 600;
        color: var(--font-color);
        text-transform: uppercase;
    }
}

@media (max-width: 600px) {
    .profile-edit-modal.tm-form-container {
        width: 95%;
        padding: 12px;
        max-height: 90vh;
        overflow-y: auto;
        top: 5px;
        transform: translateX(-50%);
    }
    .profile-edit-modal #profile-picture-preview {
        width: 70px !important;
        height: 70px !important;
        max-width: 70px !important;
        max-height: 70px !important;
        margin-bottom: 8px;
    }
    .profile-edit-modal h2 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    .profile-edit-modal .form-group {
        margin-bottom: 8px;
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }
    .profile-edit-modal .form-group label {
        min-width: 65px;
        margin-bottom: 0;
        font-size: 0.7rem;
        flex-shrink: 0;
        line-height: 1.2;
    }
    .profile-edit-modal .form-group input,
    .profile-edit-modal .form-group textarea {
        font-size: 0.8rem;
        padding: 6px;
        flex: 1;
    }
    
    /* Special handling for bio textarea on mobile */
    .profile-edit-modal .form-group textarea {
        min-height: 45px;
        resize: vertical;
    }
    
    /* Compact button styling for small mobile */
    .profile-edit-modal #change-profile-picture,
    .profile-edit-modal .tm-action-btn.btn-primary {
        padding: 6px 10px;
        font-size: 0.75rem;
        margin-top: 8px;
        width: 100%;
    }
    .profile-edit-modal #change-profile-picture,
    .profile-edit-modal .tm-action-btn.btn-primary {
        padding: 8px;
        font-size: 0.85rem;
    }
    #subscription-payment-modal.tm-form-container {
        width: 95%;
        padding: 16px;
    }
    #subscription-payment-modal h2 {
        font-size: 1.1rem;
    }
    #subscription-payment-modal h3 {
        font-size: 1rem;
    }
    #subscription-payment-modal .mobile-icon {
    width: 60px;
    height: 60px;
    padding: 6px;
}

    #subscription-payment-modal #mobile-money-preview {
    width: 50px;
    height: 50px;
}

    #subscription-payment-modal select,
    #subscription-payment-modal input[type="tel"] {
        font-size: 0.85rem;
        padding: 8px;
    }
    #subscription-payment-modal .payment-options {
        gap: 10px;
    }
    #subscription-payment-modal .payment-options label {
        font-size: 0.85rem;
    }
    #subscription-payment-modal .payment-options input[type="radio"] {
        width: 12px;
        height: 12px;
    }
    #subscription-payment-modal button[type="submit"],
    #subscription-payment-modal .tm-form-close {
        padding: 8px;
        font-size: 0.85rem;
    }
    #subscription-payment-modal .payment-instructions,
    #subscription-payment-modal .pay-later-instructions {
        font-size: 0.8rem;
    }
    #subscription-payment-modal #total-charges {
        font-size: 1rem;
    }
    
    /* Withdrawal Modal Mobile Styles */
    #withdrawal-modal.tm-form-container {
        width: 95%;
        padding: 16px;
    }
    #withdrawal-modal h2 {
        font-size: 1.1rem;
    }
    #withdrawal-modal h3 {
        font-size: 1rem;
    }
    #withdrawal-modal .mobile-icon {
        width: 60px;
        height: 60px;
        padding: 6px;
    }
    #withdrawal-modal #mobile-money-preview {
        width: 50px;
        height: 50px;
    }
    #withdrawal-modal select,
    #withdrawal-modal input[type="number"],
    #withdrawal-modal input[type="tel"] {
        font-size: 0.85rem;
        padding: 8px;
    }
    #withdrawal-modal .payment-options {
        gap: 10px;
    }
    #withdrawal-modal .payment-options label {
        font-size: 0.85rem;
    }
    #withdrawal-modal .payment-options input[type="radio"] {
        width: 12px;
        height: 12px;
    }
    #withdrawal-modal button[type="submit"],
    #withdrawal-modal .tm-form-close {
        padding: 8px;
        font-size: 0.85rem;
    }
    #withdrawal-modal .withdrawal-instructions,
    #withdrawal-modal .withdrawal-fee-info {
        font-size: 0.8rem;
    }
    #withdrawal-modal .withdrawal-amount-display {
        font-size: 1rem;
        padding: 8px;
    }
    #withdrawal-modal .available-balance {
        font-size: 0.8rem;
    }
    .tm-search-container {
        padding: 8px;
    }
    .category-tabs {
        gap: 6px;
    }
    .category-tab {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .tm-search-filter {
        padding: 8px;
        font-size: 0.8rem;
    }
    .story-section {
        gap: 8px;
    }
    .story-image {
        width: 76px;
        height: 76px;
    }
    .story-image img {
        width: 70px;
        height: 70px;
    }
    .story span {
        font-size: 0.7rem;
    }
   .tm-form-container {
    max-width: 480px;
    border-radius: 12px;
}
    #login-form.tm-form-container,
    #register-form.tm-form-container {
        width: 95%;
        padding: 20px;
        max-width: 95%;
    }
    
    #login-form .tm-form-close,
    #register-form .tm-form-close {
        top: 10px;
        right: 15px;
        font-size: 20px;
    }
    
    #login-form h2,
    #register-form h2 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    #login-form input[type="email"],
    #login-form input[type="password"],
    #register-form input[type="text"],
    #register-form input[type="email"],
    #register-form input[type="password"],
    #register-form select {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    #login-form button[type="submit"],
    #register-form button[type="submit"] {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    .admin-stats {
        grid-template-columns: 1fr;
    }
    .admin-table th,
    .admin-table td {
        font-size: 0.8rem;
        padding: 8px;
    }
    .invoice-list {
        gap: 8px;
    }
    .invoice-item {
        padding: 8px;
    }
    .invoice-item-content p {
        font-size: 0.8rem;
    }
    
    /* Admin Invoice Mobile Layout */
    .admin-invoice-item {
        background: var(--background-color);
        border: 1px solid var(--secondary-font-color);
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .admin-invoice-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
        border-bottom: 1px solid var(--secondary-font-color);
        padding-bottom: 8px;
    }
    
    .admin-invoice-id {
        font-weight: bold;
        color: var(--primary-color);
        font-size: 0.9rem;
    }
    
    .admin-invoice-status {
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 0.75rem;
        font-weight: bold;
    }
    
    .admin-invoice-status.paid {
        background: #d4edda;
        color: #155724;
    }
    
    .admin-invoice-status.pending {
        background: #fff3cd;
        color: #856404;
    }
    
    .admin-invoice-status.failed {
        background: #f8d7da;
        color: #721c24;
    }
    
    .admin-invoice-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .admin-invoice-detail {
        font-size: 0.8rem;
    }
    
    .admin-invoice-detail strong {
        color: var(--primary-color);
        display: block;
        margin-bottom: 2px;
    }
    
    .admin-invoice-actions {
        display: flex;
        gap: 8px;
        justify-content: flex-end;
    }
    
    .admin-invoice-actions .btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        border-radius: 4px;
    }
    
    /* Hide table on mobile for admin invoices */
    @media (max-width: 768px) {
        #admin-invoices-table {
            display: none;
        }
        
        #admin-invoices-mobile {
            display: block;
        }
    }
    
    /* Show table on desktop */
    @media (min-width: 769px) {
        #admin-invoices-table {
            display: table;
        }
        
        #admin-invoices-mobile {
            display: none;
        }
    }
    
    /* Invoice Filter Buttons */
    .invoice-filters {
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }
    
    .invoice-filters .btn {
        padding: 8px 16px;
        border: 1px solid var(--primary-color);
        background: transparent;
        color: var(--primary-color);
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.9rem;
    }
    
    .invoice-filters .btn:hover,
    .invoice-filters .btn.active {
        background: var(--primary-color);
        color: white;
    }
    
    .invoice-filters .btn-success {
        border-color: #28a745;
        color: #28a745;
    }
    
    .invoice-filters .btn-success:hover,
    .invoice-filters .btn-success.active {
        background: #28a745;
        color: white;
    }
    
    .invoice-filters .btn-warning {
        border-color: #ffc107;
        color: #856404;
    }
    
    .invoice-filters .btn-warning:hover,
    .invoice-filters .btn-warning.active {
        background: #ffc107;
        color: #856404;
    }
    
    /* Mobile responsive for filter buttons */
    @media (max-width: 480px) {
        .invoice-filters {
            justify-content: center;
        }
        
        .invoice-filters .btn {
            flex: 1;
            min-width: 80px;
            font-size: 0.8rem;
            padding: 6px 12px;
        }
    }
    
    .invoice-table {
        font-size: 0.8rem;
    }
    .invoice-table th,
    .invoice-table td {
        padding: 8px;
    }
    .toggle-view-btn {
        display: block;
    }
    .btn-pay {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .nav-hidden-item {
        font-size: 1.1rem;
    }
    .nav-hidden-item i {
        font-size: 1.2rem;
    }

    .nav-hidden-item img.mobile-profile-img {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        object-fit: cover;
    }
    .nav-hidden-item[aria-label]:after {
        font-size: 0.6rem;
        transition: all 0.3s ease;
    }
    
    /* Language update animation for mobile nav */
    .nav-hidden-item.updating {
        animation: mobileNavUpdate 0.3s ease;
    }
    
    @keyframes mobileNavUpdate {
        0% { transform: scale(1); }
        50% { transform: scale(1.1); }
        100% { transform: scale(1); }
    }
}

@media (max-width: 690px) {
    .story-section .story:nth-child(n+7) {
        display: none;
    }
}

@media (max-width: 562px) {
    .story-section .story:nth-child(n+6) {
        display: none;
    }
}

@media (max-width: 482px) {
    .story-section .story:nth-child(n+5) {
        display: none;
    }
}

@media (max-width: 402px) {
    .story-section .story:nth-child(n+4) {
        display: none;
    }
}

@media (max-width: 323px) {
    .story-section .story:nth-child(n+3) {
        display: none;
    }
}

.fa-heart.liked {
    color: red;
}

.fa-heart.loading {
    cursor: not-allowed;
}

.btn-comment-submit {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-comment-submit:hover {
    background: #009688;
}

/* ==== Preview ya picha (usifute hizi) ==== */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.preview-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    background-color: #f3f3f3;
}
.image-preview-container {
    position: relative;
}
.remove-image {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ==== USITUMIE hizi kabisa! ==== */
/* .image-carousel {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin: 10px 0;
    scroll-snap-type: x mandatory;
}
.image-carousel img {
    width: 100%;
    max-width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 5px;
    scroll-snap-align: start;
    background-color: #f0f0f0;
} */

/* ==== Carousel ya post (hizi pekee kwa sliding) ==== */
.business-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: transparent;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dark-mode .business-carousel {
  box-shadow: 0 2px 8px rgba(255,255,255,0.05);
}

.carousel-wrapper {
  overflow: hidden;
  width: 100%;
}

.carousel-images {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
  background: transparent;
}

.carousel-images img {
  flex-shrink: 0;
  width: 100%; /* Each image takes full width of container */
  max-width: 100%;
  max-height: 500px;
  min-height: 200px;
  object-fit: cover;
  background: transparent;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

/* Single image (no carousel needed) */
.business-carousel .carousel-images img:only-child {
  height: auto;
  max-height: 600px;
  width: 100%;
  object-fit: contain;
  background: #000;
  aspect-ratio: auto;
}

/* Landscape images */
.carousel-images img[style*="landscape"] {
  max-height: 400px;
}

/* Portrait images */
.carousel-images img[style*="portrait"] {
  max-height: 600px;
}

/* Square images */
.carousel-images img[style*="square"] {
  max-height: 500px;
  aspect-ratio: 1;
}

/* Image loading states */
.carousel-images img {
  transition: opacity 0.3s ease;
}

.carousel-images img:not([src]),
.carousel-images img[src=""] {
  opacity: 0;
}

.carousel-images img[src]:not([src=""]) {
  opacity: 1;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--font-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0.9;
    backdrop-filter: blur(5px);
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.95);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.carousel-arrow-left { 
    left: 10px; 
}

.carousel-arrow-right { 
    right: 10px; 
}

/* Show arrows on mobile for better UX */
.carousel-arrow { 
    display: flex; 
}

/* Dark mode arrow styles */
.dark-mode .carousel-arrow {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

/* Hide arrows when only one image */
.business-carousel:not([data-image-count]) .carousel-arrow,
.business-carousel[data-image-count="1"] .carousel-arrow {
    display: none !important;
}

/* Show arrows only when multiple images */
.business-carousel[data-image-count]:not([data-image-count="1"]) .carousel-arrow {
    display: flex;
}

/* Mobile responsive arrow improvements */
@media (max-width: 768px) {
    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 16px;
        opacity: 0.9;
    }
    
    .carousel-arrow-left {
        left: 8px;
    }
    
    .carousel-arrow-right {
        right: 8px;
    }
}

/* Touch targets for better mobile UX */
.carousel-arrow::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: -1;
}
.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    gap: 6px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.2);
    opacity: 0.8;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    opacity: 1;
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.9);
}

.carousel-dot.active {
    background: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
    opacity: 1;
    transform: scale(1.2);
}

.dark-mode .carousel-dot {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .carousel-dot:hover {
    background: rgba(0, 0, 0, 0.9);
}

.dark-mode .carousel-dot.active {
    background: var(--primary-color);
    border: 1px solid rgba(0, 0, 0, 0.3);
}

/* Hide dots when only one image */
.business-carousel[data-image-count="1"] .carousel-dots {
    display: none;
}

.video-container {
    position: relative;
    width: 100%;
}

.post-video {
    width: 100%;
    height: auto;
    max-height: 500px;
    display: block;
}

/* MOBILE BOTTOM NAVIGATION WITH GRADIENT + FLOATING BUTTON DESIGN */
.nav-hidden {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: 60px;
    background: transparent;
    z-index: 1000;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

@media (min-width: 769px) {
    .nav-hidden {
        display: none !important;
    }
}

.nav-hide-2 {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
    justify-content: center;
    pointer-events: all;
}

.nav-hidden-nav {
    background: var(--background-color);
    border-top: 1px solid var(--secondary-font-color);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1001;
}

/* Enhanced Mobile User Navigation */
#mobile-user-nav {
    background: linear-gradient(135deg, #1a237e, #3949ab, #5c6bc0);
    border-top: 2px solid rgba(92, 107, 192, 0.3);
    box-shadow: 0 -4px 20px rgba(26, 35, 126, 0.4);
    border-radius: 20px 20px 0 0;
    padding: 5px 0;
    height: 60px;
}

#mobile-user-nav .nav-hidden-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 6px 2px;
    border-radius: 12px;
    margin: 0 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    height: 50px;
    min-height: 50px;
    max-height: 50px;
}

#mobile-user-nav .nav-hidden-item:hover,
#mobile-user-nav .nav-hidden-item:active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(26, 35, 126, 0.3);
}

#mobile-user-nav .nav-hidden-item i {
    font-size: 1.4rem;
    margin-bottom: 0;
    color: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    line-height: 1;
}

/* Hide text labels to save space */
#mobile-user-nav .nav-hidden-item[aria-label]:after {
    display: none;
}

/* Enhanced Mobile Admin Navigation */
#mobile-admin-nav {
    background: linear-gradient(135deg, #b71c1c, #d32f2f, #f44336);
    border-top: 2px solid rgba(244, 67, 54, 0.3);
    box-shadow: 0 -4px 20px rgba(183, 28, 28, 0.4);
    border-radius: 20px 20px 0 0;
    padding: 5px 0;
    height: 60px;
}

#mobile-admin-nav .nav-hidden-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 6px 2px;
    border-radius: 12px;
    margin: 0 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    height: 50px;
    min-height: 50px;
    max-height: 50px;
}

#mobile-admin-nav .nav-hidden-item:hover,
#mobile-admin-nav .nav-hidden-item:active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(183, 28, 28, 0.3);
}

#mobile-admin-nav .nav-hidden-item i {
    font-size: 1.4rem;
    margin-bottom: 0;
    color: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    line-height: 1;
}

/* Hide text labels to save space */
#mobile-admin-nav .nav-hidden-item[aria-label]:after {
    display: none;
}

/* Enhanced Mobile Profile Images */
.nav-hidden-item img.mobile-profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#mobile-user-nav .nav-hidden-item img.mobile-profile-img:hover,
#mobile-admin-nav .nav-hidden-item img.mobile-profile-img:hover {
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: scale(1.1);
}

/* Special styling for active navigation items */
.nav-hidden-item.active {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-3px);
}

.nav-hidden-item.active i {
    color: #ffeb3b !important;
    transform: scale(1.1);
}

/* Touch feedback */
.nav-hidden-item:active {
    transform: scale(0.95) translateY(-1px);
}

/* Responsive adjustments for mobile navigation */
@media (max-width: 480px) {
    #mobile-user-nav .nav-hidden-item,
    #mobile-admin-nav .nav-hidden-item {
        margin: 0 2px;
        padding: 6px 2px;
    }
    
    #mobile-user-nav .nav-hidden-item i,
    #mobile-admin-nav .nav-hidden-item i {
        font-size: 1.4rem;
    }
    
    #mobile-user-nav .nav-hidden-item[aria-label]:after,
    #mobile-admin-nav .nav-hidden-item[aria-label]:after {
        font-size: 0.6rem;
    }
    
    .nav-hidden-item img.mobile-profile-img {
        width: 28px;
        height: 28px;
    }
}

.nav-hidden-nav .nav-hidden-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    color: white;
    font-size: 1.6rem;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
}

.nav-floating-button {
    position: absolute;
    left: 50%;
    top: -25px;
    transform: translateX(-50%);
    background: var(--primary-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1002;
    border: 4px solid var(--background-color);
}

.nav-hidden-nav .nav-hidden-item:hover,
.nav-floating-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-hidden-nav .nav-hidden-item.active,
.nav-floating-button.active {
    background: rgba(255, 255, 255, 0.3);
}

.nav-hidden-nav .nav-hidden-item[aria-label]:after,
.nav-floating-button[aria-label]:after {
    content: none; /* Remove text labels */
}

.nav-floating-button {
    pointer-events: all !important;
}

/* Profile Container */
.profile-container {
    max-width: 935px;
    margin: 0 auto;
    padding: 30px 20px;
    background-color: var(--background-color);
}

.profile-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 44px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(219, 219, 219, 0.3);
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 70px;
    flex-shrink: 0;
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    padding: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.profile-picture:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #feda75 0%,#fa7e1e 25%,#d62976 50%,#962fbf 75%,#4f5bd5 100%);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: var(--background-color);
    border: 2px solid var(--background-color);
}

/* Profile picture in edit form styling */
.tm-profile-picture {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--background-color);
    border-radius: 12px;
    border: 1px solid var(--secondary-font-color);
}

#profile-picture-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    padding: 3px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border: 2px solid var(--background-color);
}

#change-profile-picture {
    background: #0095f6 !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

#change-profile-picture:hover {
    background: #1877f2 !important;
    transform: translateY(-1px);
}

#change-profile-picture:active {
    transform: scale(0.98);
}

.profile-info {
    flex-grow: 1;
    max-width: calc(100% - 220px);
}

/* ====== Profile Name & Actions Section ====== */
.profile-name-and-actions {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.profile-name-and-actions h2 {
    font-size: 28px;
    font-weight: 300;
    margin: 0;
    color: var(--font-color);
    letter-spacing: -0.5px;
}

/* Instagram-style profile action buttons */
.profile-action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.instagram-edit-btn {
    background: #fafafa !important;
    border: 1px solid #dbdbdb !important;
    color: #262626 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.instagram-edit-btn:hover {
    background: #f0f0f0 !important;
    border-color: #c7c7c7 !important;
    color: #262626 !important;
}

.instagram-edit-btn:active {
    background: #e8e8e8 !important;
    transform: scale(0.98);
}

.instagram-edit-btn i {
    font-size: 12px;
}

/* Dark mode for Instagram-style button */
body.dark-mode .instagram-edit-btn {
    background: #363636 !important;
    border-color: #545454 !important;
    color: #ffffff !important;
}

body.dark-mode .instagram-edit-btn:hover {
    background: #404040 !important;
    border-color: #606060 !important;
    color: #ffffff !important;
}

/* ====== Instagram-Style Edit Profile Button ====== */
#edit-profile-btn {
    background: transparent;
    border: 1px solid var(--secondary-font-color);
    color: var(--font-color);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0;
}

#edit-profile-btn:hover {
    background: var(--background-on-hover);
    border-color: var(--font-color);
    transform: translateY(-1px);
}

/* Dark mode support for profile elements */
body.dark-mode .profile-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .profile-picture {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 196, 180, 0.3);
}

body.dark-mode .profile-links a {
    background: rgba(0, 196, 180, 0.15);
    border-color: rgba(0, 196, 180, 0.3);
}

body.dark-mode .profile-contact {
    background: rgba(0, 196, 180, 0.08);
    border-color: rgba(0, 196, 180, 0.2);
}

body.dark-mode .profile-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    background-color: var(--background-color);
}

body.dark-mode .profile-tabs .tab {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .profile-tabs .tab:hover {
    background: rgba(0, 196, 180, 0.2);
    border-color: var(--primary-color);
    color: white;
}

body.dark-mode .profile-tabs .tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

body.dark-mode #edit-profile-btn {
    border-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode #edit-profile-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

/* ====== Profile Stats - Instagram Style ====== */
.profile-stats {
    display: flex;
    margin-bottom: 20px;
    gap: 40px;
    align-items: center;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.stat::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.stat:hover::after {
    width: 100%;
}

.stat:hover {
    transform: translateY(-2px);
}

.stat-count {
    font-weight: 700;
    font-size: 18px;
    color: var(--font-color);
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.stat:hover .stat-count {
    color: var(--primary-color);
    transform: scale(1.1);
}

.stat-label {
    font-weight: 400;
    font-size: 14px;
    color: var(--second-font-color);
    text-transform: lowercase;
    transition: color 0.3s ease;
}

.stat:hover .stat-label {
    color: var(--font-color);
}

/* ====== Bio Section - Instagram Style ====== */
.profile-bio {
    margin-bottom: 16px;
    font-size: 16px;
    color: var(--font-color);
    line-height: 1.5;
    min-height: 24px;
    word-break: break-word;
    font-weight: 400;
}
.profile-bio p {
    margin: 0;
    color: var(--font-color);
    font-size: 16px;
    font-weight: 400;
}

/* ====== Links Section - Instagram Style ====== */
.profile-links {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.profile-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    background: rgba(0, 196, 180, 0.1);
    border: 1px solid rgba(0, 196, 180, 0.2);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.profile-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}
.profile-links a:hover::before {
    left: 100%;
}
.profile-links a i {
    font-size: 16px;
    transition: transform 0.3s ease;
}
.profile-links a:hover {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 196, 180, 0.3);
}
.profile-links a:hover i {
    transform: scale(1.1);
}

/* ====== Contact Section - Instagram Style ====== */
.profile-contact {
    background: rgba(0, 196, 180, 0.05);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(0, 196, 180, 0.15);
}

.profile-contact h4 {
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--font-color);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-contact h4::before {
    content: "📞";
    font-size: 18px;
}

.profile-contact p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.profile-contact p i {
    font-size: 16px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.profile-contact a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.profile-contact a:hover {
    color: var(--font-color);
    text-decoration: underline;
}

/* ====== Profile Tabs - Two Row Layout ====== */
.profile-tabs {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(219, 219, 219, 0.3);
    background-color: var(--background-color);
    margin-top: 20px;
    position: relative;
    gap: 8px;
    padding: 10px;
}

.tab-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.profile-tabs .tab {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 11px;
    color: var(--second-font-color);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(219, 219, 219, 0.5);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(245, 245, 245, 0.3);
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    min-width: 120px;
}

.profile-tabs .tab i {
    font-size: 14px;
    transition: all 0.3s ease;
}

.profile-tabs .tab:hover {
    color: var(--font-color);
    background: rgba(0, 196, 180, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.profile-tabs .tab.active {
    color: white;
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 700;
}

.profile-tabs .tab.active i {
    color: white;
    transform: scale(1.1);
}

/* Profile content wrapper - Instagram Style */
.profile-content {
    padding: 30px 0;
    background-color: var(--background-color);
    min-height: 300px;
}

/* Tab contents */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Buttons */
.tm-action-btn {
    padding: 10px 16px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* Form styling inside location tab */
#user-location-form {
    display: grid;
    gap: 15px;
    margin-top: 15px;
    max-width: 500px;
}

#user-location-form .form-group {
    display: flex;
    flex-direction: column;
}

#user-location-form label {
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--font-color);
}

#user-location-form select,
#user-location-form button {
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid var(--secondary-font-color);
    font-size: 14px;
    font-weight: 500;
    background: var(--background-color);
    color: var(--font-color);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

/* Location dropdowns styling */
#user-location-form select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

#user-location-form select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

#user-location-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1), 0 4px 12px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

#user-location-form select:disabled {
    background-color: var(--secondary-background-color);
    color: var(--secondary-font-color);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Specific styling for each dropdown */
#profile-mkoa {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #28a745;
}

#profile-wilaya {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
}

#profile-eneo {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-color: #17a2b8;
}

#profile-mkoa:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1), 0 4px 12px rgba(40, 167, 69, 0.15);
}

#profile-wilaya:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1), 0 4px 12px rgba(255, 193, 7, 0.15);
}

#profile-eneo:focus {
    border-color: #17a2b8;
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1), 0 4px 12px rgba(23, 162, 184, 0.15);
}

/* Location form container */
#user-location-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background: var(--background-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#user-location-form .location-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#user-location-form label {
    font-weight: 600;
    color: var(--font-color);
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#user-location-form label::before {
    content: "📍";
    font-size: 16px;
}

#profile-mkoa + label::before {
    content: "🏔️";
}

#profile-wilaya + label::before {
    content: "🏘️";
}

#profile-eneo + label::before {
    content: "📍";
}

/* Save button styling */
#user-location-form button[type="submit"] {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
    transition: all 0.3s ease;
}

#user-location-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

#user-location-form button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

/* Loading state for location save button */
#user-location-form button[type="submit"]:disabled {
    background: #6c757d;
    color: #fff;
    cursor: not-allowed;
    transform: none;
    position: relative;
}

#user-location-form button[type="submit"]:disabled::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success message styling - now deprecated in favor of alert system */
#location-save-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    margin-top: 15px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    display: none; /* Hidden since we now use enhanced alerts */
}

#location-save-message.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #user-location-form {
        padding: 16px;
        gap: 16px;
    }
    
    #user-location-form select {
        padding: 14px 16px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    #user-location-form button[type="submit"] {
        padding: 16px 24px;
        font-size: 16px;
    }
}

/* ========================================
   SAVED LOCATION DISPLAY STYLES
   ======================================== */

/* Current Location Display Container */
#current-location-display {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border: 2px solid #c3e6cb;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(195, 230, 203, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

#current-location-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(195, 230, 203, 0.4);
}

/* Location Display Header */
#current-location-display h4 {
    color: #155724;
    font-weight: 700;
    font-size: 18px;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

#current-location-display h4::before {
    content: "📍";
    font-size: 20px;
}

/* Current Location Text */
#current-location-text {
    color: #155724;
    font-size: 16px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.7);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    margin: 10px 0 15px 0;
    letter-spacing: 0.5px;
}

/* Edit Location Button */
#edit-location-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(40, 167, 69, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#edit-location-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(40, 167, 69, 0.4);
}

#edit-location-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

#edit-location-btn::before {
    content: "✏️";
    font-size: 14px;
}

/* Cancel Edit Button */
#cancel-edit-btn {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(108, 117, 125, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
}

#cancel-edit-btn:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(108, 117, 125, 0.4);
}

#cancel-edit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

#cancel-edit-btn::before {
    content: "❌";
    font-size: 14px;
}

/* Mobile responsive for saved location */
@media (max-width: 768px) {
    #current-location-display {
        padding: 16px;
        margin: 10px 0;
    }
    
    #current-location-display h4 {
        font-size: 16px;
    }
    
    #current-location-text {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    #edit-location-btn,
    #cancel-edit-btn {
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 20px;
    }
    
    #cancel-edit-btn {
        margin-left: 8px;
        margin-top: 8px;
    }
}

/* Dark mode support for location display */
@media (prefers-color-scheme: dark) {
    #current-location-display {
        background: linear-gradient(135deg, #2d3e2d 0%, #3a4a3a 100%);
        border-color: #4a6741;
        color: #e8f5e8;
    }
    
    #current-location-display h4 {
        color: #90c695;
    }
    
    #current-location-text {
        background: rgba(0, 0, 0, 0.3);
        color: #90c695;
        border-left-color: #4a6741;
    }
}

/* Animation for showing/hiding location sections */
#current-location-display.fade-in {
    animation: fadeInLocation 0.4s ease;
}

#user-location-form.fade-in {
    animation: slideInLocation 0.4s ease;
}

#current-location-display.fade-out {
    animation: fadeOutLocation 0.3s ease;
}

#user-location-form.fade-out {
    animation: slideOutLocation 0.3s ease;
}

@keyframes fadeInLocation {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLocation {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutLocation {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes slideOutLocation {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(15px);
    }
}


/* Modern Instagram-like modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Misingi ya dark mode */
:root {
    --bg-dark: #1e1e2f;
    --card-dark: #2c2c3e;
    --text-primary: #ffffff;
    --text-secondary: #b0b3c7;
    --accent-color: #4e73df;
    --success-color: #1cc88a;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -5px, 0);
    }
    70% {
        transform: translate3d(0, -3px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

/* Container wa Analytics */
#analytics-content {
    background-color: var(--bg-dark);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    animation: fadeIn 0.8s ease-in-out;
}

/* Kichwa cha sehemu ya Analytics */
#analytics-content h4 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 1s ease-in-out;
}

#analytics-content h4 i {
    color: var(--accent-color);
    font-size: 22px;
}

/* Grid ya analytics cards */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 0 auto 30px auto;
    max-width: 900px;
    justify-items: center;
}

/* Kadi ya takwimu */
.analytics-card {
    background: var(--card-dark);
    border-left: 5px solid var(--accent-color);
    border-radius: 10px;
    padding: 15px 20px;
    transition: transform 0.3s ease, border-left-color 0.3s ease;
    /* Remove problematic animations for mobile */
}

/* Staggered Animation for Cards - Desktop Only */
@media (min-width: 769px) {
    .analytics-card {
        animation: zoomIn 0.6s ease-in-out;
        opacity: 0;
        animation-fill-mode: forwards;
    }
    
    .analytics-card:nth-child(1) { 
        animation-delay: 0.1s; 
    }
    .analytics-card:nth-child(2) { 
        animation-delay: 0.2s; 
    }
    .analytics-card:nth-child(3) { 
        animation-delay: 0.3s; 
    }
    .analytics-card:nth-child(4) { 
        animation-delay: 0.4s; 
    }
}

.analytics-card:hover {
    transform: translateY(-2px);
    border-left-color: var(--primary-color);
}

.analytics-card h5 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.analytics-number {
    font-size: 28px;
    font-weight: bold;
    color: var(--analytics-success-color);
    /* Remove problematic animations for mobile */
}

/* Number animations - Desktop Only */
@media (min-width: 769px) {
    .analytics-number {
        animation: slideInLeft 0.8s ease-in-out;
        animation-fill-mode: forwards;
        opacity: 0;
    }
    
    /* Number staggered animation */
    .analytics-card:nth-child(1) .analytics-number { animation-delay: 0.3s; }
    .analytics-card:nth-child(2) .analytics-number { animation-delay: 0.4s; }
    .analytics-card:nth-child(3) .analytics-number { animation-delay: 0.5s; }
    .analytics-card:nth-child(4) .analytics-number { animation-delay: 0.6s; }
}

/* Chati */
.analytics-chart {
    margin-top: 20px;
    /* Remove problematic animations for mobile */
}

/* Chart animations - Desktop Only */
@media (min-width: 769px) {
    .analytics-chart {
        animation: slideInUp 0.8s ease-in-out;
        animation-delay: 0.7s;
        opacity: 0;
        animation-fill-mode: forwards;
    }
}

.analytics-chart canvas {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    background-color: var(--card-dark);
}

/* =========================
   ANALYTICS LOADING STATES & ANIMATIONS
========================= */

/* Loading state for analytics cards */
.analytics-card.loading {
    position: relative;
    overflow: hidden;
}

.analytics-card.loading .analytics-number {
    opacity: 0.5;
    animation: analyticsLoading 1.5s infinite;
}

.analytics-card.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 196, 180, 0.2), transparent);
    animation: loadingShimmer 1.2s infinite;
}

/* Animation for updated analytics numbers */
.analytics-number.updated {
    animation: analyticsUpdate 0.6s ease-in-out;
    color: #00c4b4 !important;
    transform: scale(1.1);
}

/* Loading animation keyframes */
@keyframes analyticsLoading {
    0%, 100% { 
        opacity: 0.5; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.02);
    }
}

@keyframes loadingShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes analyticsUpdate {
    0% { 
        transform: scale(1); 
        color: var(--analytics-success-color);
    }
    50% { 
        transform: scale(1.15); 
        color: #00c4b4;
        text-shadow: 0 0 8px rgba(0, 196, 180, 0.4);
    }
    100% { 
        transform: scale(1.05); 
        color: #00c4b4;
    }
}

/* =========================
   ANALYTICS MOBILE RESPONSIVE
========================= */

/* Tablet & Medium Mobile */
@media (max-width: 768px) {
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin: 0 auto 25px auto;
        max-width: 500px;
        padding: 0 10px;
    }
    
    .analytics-card {
        padding: 12px 16px;
        animation: zoomIn 0.4s ease-in-out;
    }
    
    .analytics-card h5 {
        font-size: 14px;
    }
    
    .analytics-number {
        font-size: 24px;
    }
    
    #analytics-content {
        padding: 15px;
        margin-top: 15px;
    }
    
    #analytics-content h4 {
        font-size: 18px;
        margin-bottom: 15px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .analytics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin: 0 auto 20px auto;
        max-width: 100%;
        padding: 0 5px;
        justify-items: stretch;
    }
    
    .analytics-card {
        padding: 10px 12px;
        border-radius: 8px;
        animation: zoomIn 0.3s ease-in-out;
        min-height: 80px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    
    .analytics-card:nth-child(1) { animation-delay: 0.1s; }
    .analytics-card:nth-child(2) { animation-delay: 0.2s; }
    .analytics-card:nth-child(3) { animation-delay: 0.3s; }
    .analytics-card:nth-child(4) { animation-delay: 0.4s; }
    
    .analytics-card h5 {
        font-size: 12px;
        margin-bottom: 5px;
        line-height: 1.2;
    }
    
    .analytics-number {
        font-size: 20px;
        font-weight: 700;
    }
    
    .analytics-card:hover {
        transform: translateY(-2px);
        border-left-color: var(--primary-color);
    }
    
    #analytics-content {
        padding: 12px;
        margin-top: 10px;
        border-radius: 8px;
    }
    
    #analytics-content h4 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    #analytics-content h4 i {
        font-size: 18px;
    }
    
    .analytics-chart {
        margin-top: 15px;
    }
}

/* Extra Small Mobile */
@media (max-width: 320px) {
    .analytics-grid {
        gap: 8px;
        padding: 0 2px;
    }
    
    .analytics-card {
        padding: 8px 10px;
        min-height: 70px;
    }
    
    .analytics-card h5 {
        font-size: 11px;
    }
    
    .analytics-number {
        font-size: 18px;
    }
    
    #analytics-content {
        padding: 10px;
    }
    
    #analytics-content h4 {
        font-size: 15px;
        margin-bottom: 10px;
    }
}


/* ========================================
   PROFILE EDIT MODAL - COMPLETELY REWRITTEN
   ======================================== */

/* Modal overlay */
#profile-edit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    cursor: pointer; /* Makes it clear the overlay can be clicked */
}

/* Prevent clicks on the modal itself from closing the overlay */
#profile-edit-overlay .profile-edit-modal-modern {
    cursor: default;
}

/* Main modal container */
.profile-edit-modal-modern {
    background: var(--background-color);
    color: var(--font-color);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

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

/* Modal header and title */
.profile-edit-modal-modern h2 {
    background: var(--primary-color);
    color: white;
    margin: 0;
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    position: relative;
}

/* Close button */
.profile-edit-modal-modern .tm-form-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.profile-edit-modal-modern .tm-form-close:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg) scale(1.1);
}

.profile-edit-modal-modern .tm-form-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Form container */
.profile-edit-modal-modern form {
    padding: 24px;
}

/* Profile picture section */
.profile-edit-modal-modern .tm-profile-picture {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--secondary-font-color);
}

.profile-edit-modal-modern .tm-profile-picture img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    margin-bottom: 12px;
}

.profile-edit-modal-modern .tm-profile-picture button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-edit-modal-modern .tm-profile-picture button:hover {
    background: var(--primary-hover-color);
    transform: translateY(-1px);
}

/* Form groups */
.profile-edit-modal-modern .form-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
    text-align: left;
}

.profile-edit-modal-modern .form-group label {
    min-width: 110px;
    max-width: 110px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--second-font-color);
    text-align: left;
    margin: 0;
    flex-shrink: 0;
}

.profile-edit-modal-modern .form-group input,
.profile-edit-modal-modern .form-group textarea {
    flex: 1;
    border-radius: 8px;
    border: 2px solid var(--secondary-font-color);
    background: var(--background-color);
    color: var(--font-color);
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.profile-edit-modal-modern .form-group input:focus,
.profile-edit-modal-modern .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 196, 180, 0.1);
    transform: translateY(-1px);
}

.profile-edit-modal-modern .form-group textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.5;
}

/* Submit button */
.profile-edit-modal-modern button[type="submit"] {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.profile-edit-modal-modern button[type="submit"]:hover {
    background: var(--primary-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 196, 180, 0.3);
}

.profile-edit-modal-modern button[type="submit"]:active {
    transform: translateY(0);
}

/* Dark mode adjustments */
body.dark-mode .profile-edit-modal-modern {
    background: #1a1a1a;
    color: #e4e6ea;
}

body.dark-mode .profile-edit-modal-modern .form-group input,
body.dark-mode .profile-edit-modal-modern .form-group textarea {
    background: #2a2a2a;
    border-color: #404040;
    color: #e4e6ea;
}

body.dark-mode .profile-edit-modal-modern .form-group input:focus,
body.dark-mode .profile-edit-modal-modern .form-group textarea:focus {
    border-color: var(--primary-color);
    background: #2a2a2a;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #profile-edit-overlay {
        padding: 0;
        align-items: stretch;
    }
    
    .profile-edit-modal-modern {
        max-width: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        position: relative;
    }
    
    .profile-edit-modal-modern h2 {
        padding: 16px 20px;
        font-size: 1.2rem;
        position: sticky;
        top: 0;
        z-index: 10;
        border-radius: 0;
    }
    
    .profile-edit-modal-modern form {
        padding: 20px;
        flex: 1;
        overflow-y: auto;
        padding-bottom: 100px; /* Space for sticky button */
    }
    
    .profile-edit-modal-modern .form-group {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        text-align: left;
        margin-bottom: 24px;
    }
    
    .profile-edit-modal-modern .form-group label {
        min-width: 90px;
        max-width: 90px;
        width: auto;
        margin-bottom: 0;
        font-size: 0.9rem;
    }
    
    .profile-edit-modal-modern .form-group input,
    .profile-edit-modal-modern .form-group textarea {
        width: auto;
        min-width: auto;
        flex: 1;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .profile-edit-modal-modern .tm-form-close {
        top: 12px;
        right: 16px;
        width: 28px;
        height: 28px;
        font-size: 14px;
        z-index: 11;
    }
    
    /* Sticky save button for mobile */
    .profile-edit-modal-modern button[type="submit"] {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 0;
        padding: 18px 24px;
        font-size: 16px;
        z-index: 10;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        background: var(--primary-color);
    }
    
    .profile-edit-modal-modern button[type="submit"]:hover {
        transform: none; /* Disable hover transforms on mobile */
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .profile-edit-modal-modern .form-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .profile-edit-modal-modern .form-group label {
        min-width: auto;
        max-width: none;
        width: 100%;
        text-align: left;
        margin-bottom: 6px;
        font-size: 0.9rem;
    }
    
    .profile-edit-modal-modern .form-group input,
    .profile-edit-modal-modern .form-group textarea {
        width: 100%;
        min-width: auto;
        flex: none;
    }
    
    .profile-edit-modal-modern form {
        padding: 15px;
        padding-bottom: 100px;
    }
    
    .profile-edit-modal-modern h2 {
        padding: 12px 15px;
        font-size: 1.1rem;
    }
    
    .profile-edit-modal-modern .tm-form-close {
        top: 8px;
        right: 12px;
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .profile-edit-modal-modern button[type="submit"] {
        padding: 16px 20px;
        font-size: 15px;
    }
}


.tab {
    padding: 15px;
    cursor: pointer;
    color: var(--second-font-color);
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 12px;
}

.tab.active {
    color: var(--font-color);
    border-top: 1px solid var(--font-color);
    margin-top: -1px;
}

.profile-content {
    padding-top: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ====== Instagram-Style Posts Grid ====== */
#posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 20px;
}

.post-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
    background: var(--background-color);
}

.post-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.post-thumbnail:hover img {
    filter: brightness(0.9);
}

/* Instagram-style overlay for video/multiple images */
.post-thumbnail::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

.post-thumbnail.has-video::after {
    content: '▶';
    display: flex;
    color: white;
    font-size: 10px;
}

.post-thumbnail.has-multiple::after {
    content: '⊞';
    display: flex;
    color: white;
    font-size: 12px;
}

/* Hover overlay with stats */
.post-thumbnail .post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-weight: 600;
    gap: 20px;
}

.post-thumbnail:hover .post-overlay {
    opacity: 1;
}

.post-overlay-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.post-overlay-stat i {
    font-size: 16px;
}
.pipo-upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #181818;
    margin-bottom: 20px;
    position: relative;
    transition: border-color 0.2s;
}
.pipo-upload-area.dragover {
    border-color: #00c4b4;
    background: #222;
}
.upload-icon {
    margin-bottom: 10px;
    color: #00c4b4;
}
.upload-btn {
    background: #00c4b4;
    color: #fff;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    display: inline-block;
}
.image-preview, .video-preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 15px;
    gap: 10px;
}
.image-preview img, .video-preview video {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #333;
}


/* HTML: <div class="loader"></div> */
.loader {
  width: 120px;
  height: 20px;
  border-radius: 20px;
  background:
   repeating-linear-gradient(135deg,#f03355 0 10px,#ffa516 0 20px) 0/0%   no-repeat,
   repeating-linear-gradient(135deg,#ddd    0 10px,#eee    0 20px) 0/100%;
  animation: l3 2s infinite;
}
@keyframes l3 {
    100% {background-size:100%}
}

@media (max-width: 600px) {
    .pipo-upload-area {
        padding: 20px 5px;
    }
    .image-preview img, .video-preview video {
        width: 70px;
        height: 70px;
    }
}

/* Video Thumbnail Styles */
.post-thumbnail .post-video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-thumbnail .video-icon-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    color: white;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px;
    border-radius: 50%;
    z-index: 1;
}


.instagram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.grid-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
    background: #000;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.grid-item:hover {
    transform: scale(1.02);
}

.grid-item-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.grid-image, .grid-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-item:hover .grid-overlay {
    opacity: 1;
}

.grid-stats {
    color: white;
    font-weight: bold;
    display: flex;
    gap: 15px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.grid-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-indicator, .multiple-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    color: white;
    font-size: 16px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.grid-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--background-on-hover);
    color: var(--secondary-font-color);
}

.grid-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-font-color);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .instagram-grid {
        gap: 2px;
        max-width: 100%;
    }
    
    .grid-stats {
        font-size: 0.9rem;
        gap: 10px;
    }
    
    .video-indicator, .multiple-indicator {
        font-size: 14px;
        top: 6px;
        right: 6px;
    }
}

@media (max-width: 480px) {
    .instagram-grid {
        gap: 1px;
    }
    
    .grid-stats {
        font-size: 0.8rem;
        gap: 8px;
    }
}

/* ===== BUSINESS MODAL WITH SEO ===== */
.business-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.business-modal-overlay.show {
    opacity: 1;
}

.business-modal {
    background: var(--background-color);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.business-modal-overlay.show .business-modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--background-on-hover);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gradient);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-height: calc(90vh - 80px);
    overflow: auto;
}

.modal-images {
    position: relative;
    background: #000;
    min-height: 300px;
}

.modal-image {
    display: none;
    width: 100%;
    height: 100%;
}

.modal-image.active {
    display: block;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 10px;
}

.prev-image, .next-image {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.prev-image:hover, .next-image:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-details {
    padding: 20px;
    overflow-y: auto;
}

.business-info {
    margin-bottom: 20px;
}

.business-category {
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 10px;
}

.business-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.business-location {
    color: var(--second-font-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.business-description, .business-contact {
    margin-bottom: 20px;
}

.business-description h3, .business-contact h3 {
    margin-bottom: 10px;
    color: var(--font-color);
    font-size: 1.1rem;
}

.business-description p {
    line-height: 1.6;
    color: var(--second-font-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--font-color);
}

.business-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--background-on-hover);
    border-radius: 8px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--second-font-color);
}

.business-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.business-actions .btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-success {
    background: #25D366;
    color: white;
}

.btn-secondary {
    background: var(--background-on-hover);
    color: var(--font-color);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Mobile responsive modal */
@media (max-width: 768px) {
    .business-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-images {
        min-height: 250px;
    }
    
    .business-actions {
        flex-direction: column;
    }
    
    .business-actions .btn {
        flex: none;
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-details {
        padding: 15px;
    }
    
    .business-price {
        font-size: 1.3rem;
    }
}

/* SEO-friendly URL indicator */
.seo-url-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.seo-url-indicator.show {
    opacity: 1;
}

/* =============================================
   SEO PAGE STYLES
   ============================================= */

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 3px;
}

.skip-to-content:focus {
    top: 6px;
}

/* Site header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo img {
    max-height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #00c4b4;
}

/* Main content */
.seo-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.seo-page main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 20px;
}

.breadcrumb-list {
    list-style: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '›';
    margin-left: 10px;
    color: #ccc;
}

.breadcrumb-list a {
    color: #00c4b4;
    text-decoration: none;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
}

/* Business details article */
.business-details {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 40px;
}

.business-header {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.business-header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.business-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.business-category {
    background: #00c4b4;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.business-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 15px;
}

.business-location i {
    color: #00c4b4;
}

/* Business gallery */
.business-gallery {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.main-image {
    margin-bottom: 20px;
}

.main-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-thumbnails img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-thumbnails img:hover {
    transform: scale(1.05);
}

/* Business info */
.business-info {
    padding: 30px;
}

.business-description {
    margin-bottom: 30px;
}

.business-description h2 {
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.business-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item h3 {
    color: #34495e;
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.detail-item .price {
    color: #00c4b4;
    font-size: 18px;
    font-weight: 700;
}

.detail-item a {
    color: #00c4b4;
    text-decoration: none;
}

.detail-item a:hover {
    text-decoration: underline;
}

/* Contact actions */
.contact-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.btn-primary {
    background: #00c4b4;
    color: white;
}

.btn-primary:hover {
    background: #00a89a;
    transform: translateY(-1px);
}

.btn-success {
    background: #25d366;
    color: white;
}

.btn-success:hover {
    background: #20ba5a;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Related businesses */
.related-businesses {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

.related-businesses h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 20px;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    margin-top: 60px;
    padding: 40px 0 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    color: #00c4b4;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #00c4b4;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #34495e;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background: #00c4b4;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    color: #bdc3c7;
}

/* Responsive design for SEO page */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
        height: 50px;
    }
    
    .nav-links {
        gap: 15px;
        font-size: 14px;
    }
    
    .seo-page main {
        padding: 15px;
    }
    
    .business-header {
        padding: 20px;
    }
    
    .business-header h1 {
        font-size: 2em;
    }
    
    .business-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .business-gallery {
        padding: 20px;
    }
    
    .main-image img {
        height: 250px;
    }
    
    .business-info {
        padding: 20px;
    }
    
    .business-details-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-actions {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
        padding: 15px;
    }
    
    .related-businesses {
        padding: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: none;
    }
    
    .business-header h1 {
        font-size: 1.6em;
    }
    
    .gallery-thumbnails img {
        width: 80px;
        height: 80px;
    }
    
    .btn {
        font-size: 14px;
        padding: 12px;
    }
}

/* =========================
   SOCIAL SHARING STYLES
========================= */
.share-section {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.share-section:hover {
    color: var(--primary-color);
}

/* Share Dropdown Menu */
.share-dropdown {
    position: absolute;
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 15px;
    min-width: 280px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-dropdown.show {
    opacity: 1;
    visibility: visible;
    top: -260px;
}

.dark-mode .share-dropdown {
    background: #2a2a2a;
    border: 1px solid #444;
}

.share-dropdown h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: var(--font-color);
}

.share-platforms {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.share-platform-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    color: white;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.share-platform-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.share-platform-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Mobile haptic feedback simulation */
@media (hover: none) and (pointer: coarse) {
    .share-platform-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

.share-platform-btn i {
    font-size: 16px;
}

/* Platform-specific colors */
.share-whatsapp { background: #25D366; }
.share-whatsapp:hover { background: #128C7E; }

.share-facebook { background: #1877F2; }
.share-facebook:hover { background: #166FE5; }

.share-twitter { background: #1DA1F2; }
.share-twitter:hover { background: #0C90E1; }

.share-telegram { background: #0088CC; }
.share-telegram:hover { background: #0077B3; }

.share-linkedin { background: #0077B5; }
.share-linkedin:hover { background: #005582; }

.share-instagram { background: linear-gradient(45deg, #F09433 0%,#E6683C 25%,#DC2743 50%,#CC2366 75%,#BC1888 100%); }
.share-instagram:hover { background: linear-gradient(45deg, #E6683C 0%,#DC2743 25%,#CC2366 50%,#BC1888 75%,#8B0E68 100%); }

.share-email { background: #EA4335; }
.share-email:hover { background: #D33B2C; }

.share-sms { background: #34C759; }
.share-sms:hover { background: #30B350; }

.share-copy { background: #6C757D; }
.share-copy:hover { background: #5A6268; }

.share-more { background: var(--primary-color); }
.share-more:hover { background: #00A999; }

/* Copy Link Section */
.share-copy-section {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

.dark-mode .share-copy-section {
    border-top-color: #444;
}

.share-url-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.share-url-input input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #f9f9f9;
}

.dark-mode .share-url-input input {
    background: #333;
    border-color: #555;
    color: var(--font-color);
}

.share-url-input button {
    padding: 10px 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.share-url-input button:hover {
    background: #00A999;
}


.comments-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.comments-modal.show {
    opacity: 1;
    visibility: visible;
}

.comments-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    display: grid;
    grid-template-columns: 1fr 400px;
    overflow: hidden;
    position: relative;
}

.dark-mode .comments-modal-content {
    background: #1a1a1a;
    border: 1px solid #333;
}

/* Close button */
.comments-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.2em;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.comments-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Media section (left side) */
.comments-modal-media {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 400px;
}

.comments-modal-media img,
.comments-modal-media video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Modal carousel styles */
.modal-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-carousel .carousel-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.modal-carousel .carousel-images {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
}

.modal-carousel .carousel-img {
    min-width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-carousel .carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--font-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 2;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.modal-carousel .carousel-arrow:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.modal-carousel .carousel-arrow-left {
    left: 15px;
}

.modal-carousel .carousel-arrow-right {
    right: 15px;
}

.modal-carousel .carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.modal-carousel .carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal-carousel .carousel-dot.active {
    background: white;
}

/* Comments section (right side) */
.comments-modal-sidebar {
    display: flex;
    flex-direction: column;
    height: 600px;
    background: white;
}

.dark-mode .comments-modal-sidebar {
    background: #1a1a1a;
}

/* Business header in comments */
.comments-modal-header {
    padding: 16px;
    border-bottom: 1px solid #dbdbdb;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dark-mode .comments-modal-header {
    border-bottom-color: #333;
}

.comments-modal-header img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.comments-modal-header .business-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--font-color);
}

.comments-modal-header .business-info p {
    margin: 0;
    font-size: 12px;
    color: var(--second-font-color);
}

/* Comments list area */
.comments-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-username {
    font-weight: 600;
    font-size: 14px;
    color: var(--font-color);
    margin-right: 8px;
}

.comment-text {
    font-size: 14px;
    color: var(--font-color);
    line-height: 1.4;
    word-wrap: break-word;
}

.comment-meta {
    margin-top: 8px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.comment-time {
    font-size: 12px;
    color: var(--second-font-color);
}

.comment-like-btn {
    background: none;
    border: none;
    color: var(--second-font-color);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
}

.comment-like-btn:hover {
    color: var(--font-color);
}

/* Comment form */
.comments-modal-footer {
    border-top: 1px solid #dbdbdb;
    padding: 16px;
}

.dark-mode .comments-modal-footer {
    border-top-color: #333;
}

.comment-form-modal {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.comment-input-modal {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 14px;
    line-height: 1.4;
    max-height: 80px;
    background: transparent;
    color: var(--font-color);
}

.comment-input-modal::placeholder {
    color: var(--second-font-color);
}

.comment-submit-modal {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}

.comment-submit-modal:disabled {
    color: var(--secondary-font-color);
    cursor: not-allowed;
}

.comment-submit-modal:enabled {
    color: var(--primary-color);
}

.comment-submit-modal:enabled:hover {
    color: #00A999;
}

/* Loading state for comments */
.comments-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--second-font-color);
}

.comments-loading i {
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Smooth scroll for comments */
.comments-modal-body {
    scroll-behavior: smooth;
}

/* Improved focus states */
.comment-input-modal:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

/* Animation for new comments */
.comment-item.new-comment {
    animation: slideInComment 0.3s ease-out;
}

@keyframes slideInComment {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   VIDEO MUTE/UNMUTE CONTROL
========================= */
.video-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.video-mute-toggle {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.video-mute-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
    opacity: 1;
    transform: scale(1.1);
}

.video-mute-toggle:active {
    transform: scale(0.95);
}

.video-mute-toggle.muted {
    background: rgba(220, 53, 69, 0.8);
}

.video-mute-toggle.muted:hover {
    background: rgba(220, 53, 69, 1);
}

.video-mute-toggle.unmuted {
    background: rgba(40, 167, 69, 0.8);
}

.video-mute-toggle.unmuted:hover {
    background: rgba(40, 167, 69, 1);
}

/* Animation for mute state change */
.video-mute-toggle i {
    transition: all 0.2s ease;
}

.video-mute-toggle.changing i {
    transform: scale(1.2);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .video-mute-toggle {
        width: 35px;
        height: 35px;
        font-size: 16px;
        top: 10px;
        right: 10px;
    }
}

/* Tooltip for mute button */
.video-mute-toggle::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 20;
}

.video-mute-toggle:hover::before {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    .comments-modal-content {
        grid-template-columns: 1fr;
        grid-template-rows: 60vh auto;
        width: 95%;
        max-height: 95vh;
    }
    
    .comments-modal-sidebar {
        height: auto;
        min-height: 300px;
    }
    
    .comments-modal-media {
        min-height: 300px;
    }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .share-dropdown {
        min-width: 260px;
        padding: 12px;
        left: 0;
        transform: none;
        right: 0;
        margin: 0 10px;
    }
    
    .share-platforms {
        grid-template-columns: 1fr;
    }
    
    .share-platform-btn {
        padding: 15px;
        font-size: 15px;
        justify-content: center;
    }
    
    .comments-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    
    /* Mobile image optimizations - show full images */
    .carousel-images img {
        max-height: 400px;
        min-height: 150px;
        object-fit: contain;
    }
    
    .business-carousel .carousel-images img:only-child {
        max-height: 500px;
        object-fit: contain;
    }
    
    /* All post images on mobile */
    .post-description img,
    .business-description img,
    .tm-content img,
    .business-post img,
    .user-post img {
        max-height: 400px;
        object-fit: contain;
    }
    
    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .carousel-arrow-left {
        left: 8px;
    }
    
    .carousel-arrow-right {
        right: 8px;
    }
}

/* Comments modal mobile responsive fixes */
@media (max-width: 768px) {
    .comments-modal-content {
        width: 100vw;
        height: 100vh;
        max-width: none;
        border-radius: 0;
        flex-direction: column;
    }
    
    .comments-modal-media {
        height: 60vh;
        min-height: 300px;
    }
    
    .comments-modal-sidebar {
        height: 40vh;
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--secondary-font-color);
    }
    
    .comments-modal-footer {
        padding: 15px;
        border-top: 1px solid var(--secondary-font-color);
        background: var(--background-color);
    }
    
    .comment-form-modal {
        display: flex;
        align-items: flex-end;
        gap: 10px;
        width: 100%;
    }
    
    .comment-input-modal {
        flex: 1;
        padding: 12px 15px;
        border: 1px solid var(--secondary-font-color);
        border-radius: 20px;
        resize: none;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .comment-submit-modal {
        flex-shrink: 0;
        padding: 12px 16px;
        background: var(--primary-color) !important;
        color: white !important;
        border-radius: 20px;
        font-weight: 600;
        font-size: 14px;
        min-width: 60px;
        border: none;
    }
    
    .comment-submit-modal:disabled {
        background: var(--secondary-font-color) !important;
        color: var(--background-color) !important;
    }
    
    .comment-submit-modal:enabled:hover {
        background: #00A999 !important;
    }
}

/* Tablet responsive */
@media (max-width: 1024px) {
    .profile-container {
        padding: 20px 15px;
    }
    
    .profile-picture {
        width: 120px;
        height: 120px;
        margin-right: 50px;
    }
    
    .profile-stats {
        gap: 30px;
    }
}

/* ====== Mobile Responsive - Instagram Style Profile ====== */
@media (max-width: 768px) {
    .profile-container {
        max-width: 100%;
        padding: 20px 16px;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .profile-picture {
        width: 130px;
        height: 130px;
        margin-right: 0;
        margin-bottom: 20px;
        border-width: 2px;
    }
    
    .profile-info {
        max-width: 100%;
        width: 100%;
    }
    
    .profile-name-and-actions {
        justify-content: center;
        margin-bottom: 16px;
        flex-direction: column;
        gap: 12px;
    }
    
    .profile-name-and-actions h2 {
        font-size: 24px;
        margin-bottom: 0;
    }
    
    .profile-stats {
        justify-content: center;
        gap: 25px;
        margin-bottom: 16px;
    }
    
    .stat-count {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .profile-bio {
        text-align: center;
        margin-bottom: 16px;
        font-size: 14px;
    }
    
    .profile-links {
        justify-content: center;
        margin-bottom: 16px;
    }
    
    .profile-links a {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .profile-contact {
        text-align: center;
        padding: 12px;
    }
    
    .profile-contact h4 {
        font-size: 14px;
        justify-content: center;
    }
    
    .profile-contact p {
        justify-content: center;
        font-size: 12px;
    }
    
    .profile-tabs {
        margin-top: 15px;
        gap: 6px;
        padding: 8px;
    }
    
    .tab-row {
        gap: 6px;
    }
    
    .profile-tabs .tab {
        padding: 10px 12px;
        font-size: 10px;
        min-width: auto;
        flex: 1;
        border-radius: 6px;
    }
    
    .profile-tabs .tab i {
        font-size: 12px;
    }
    
    .profile-content {
        padding: 20px 0;
    }
}

/* ====== Small Mobile ====== */
@media (max-width: 480px) {
    .profile-container {
        padding: 15px 12px;
    }
    
    .profile-picture {
        width: 110px;
        height: 110px;
        margin-bottom: 16px;
    }
    
    .profile-name-and-actions h2 {
        font-size: 20px;
    }
    
    .profile-stats {
        gap: 20px;
    }
    
    .stat-count {
        font-size: 14px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .profile-bio {
        font-size: 13px;
    }
    
    .profile-links a {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .profile-tabs {
        gap: 4px;
        padding: 6px;
    }
    
    .tab-row {
        gap: 4px;
    }
    
    .profile-tabs .tab {
        padding: 8px 10px;
        font-size: 9px;
        min-width: auto;
        flex: 1;
        border-radius: 4px;
    }
    
    .profile-tabs .tab i {
        font-size: 10px;
    }
    
    .tm-action-btn {
        font-size: 12px;
        padding: 8px 14px;
    }
    
    /* Posts Grid Mobile */
    #posts-grid {
        gap: 2px;
        margin-top: 15px;
    }
    
    .post-thumbnail .post-overlay {
        display: none; /* Hide overlay on mobile for better performance */
    }
    
    .post-overlay-stat {
        font-size: 12px;
    }
}

/* ====== Posts Grid Responsive ====== */
@media (max-width: 768px) {
    #posts-grid {
        gap: 3px;
    }
    
    .post-thumbnail::after {
        top: 6px;
        right: 6px;
        width: 18px;
        height: 18px;
    }
    
    .post-thumbnail.has-video::after {
        font-size: 9px;
    }
    
    .post-thumbnail.has-multiple::after {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    #posts-grid {
        gap: 2px;
    }
    
    .post-thumbnail::after {
        top: 4px;
        right: 4px;
        width: 16px;
        height: 16px;
    }
    
    .post-thumbnail.has-video::after {
        font-size: 8px;
    }
    
    .post-thumbnail.has-multiple::after {
        font-size: 10px;
    }
}
@media (max-width: 768px) and (min-width: 481px) {
    .carousel-images img {
        max-height: 450px;
        min-height: 180px;
    }
    
    .business-carousel .carousel-images img:only-child {
        max-height: 550px;
    }
}

/* =========================
   PULSE HIGHLIGHT EFFECTS
========================= */
/* Pulse highlight effect for next step button after video attachment */
.pulse-highlight {
    animation: pulseHighlight 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(0, 196, 180, 0.6) !important;
}

@keyframes pulseHighlight {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 196, 180, 0.6);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(0, 196, 180, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 196, 180, 0.6);
    }
}

/* =========================
   PASSWORD RECOVERY MODAL
========================= */
#passwordRecoveryModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out
}

@keyframes fadeIn {
    from {
        opacity: 0
    }
    to {
        opacity: 1
    }
}

#passwordRecoveryModal>div {
    background: var(--background-color);
    border-radius: 16px;
    max-width: 420px;
    width: 92%;
    padding: 32px 28px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    color: var(--font-color);
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1)
}

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

#passwordRecoveryModal h3 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.4rem;
    color: var(--font-color);
    font-weight: 600;
    font-family: Signika, sans-serif
}

#passwordRecoveryModal .tab-container {
    display: flex;
    margin-bottom: 20px;
    background: var(--background-on-hover);
    border-radius: 10px;
    padding: 4px
}

#passwordRecoveryModal .tab-button {
    flex: 1;
    padding: 10px 16px;
    text-align: center;
    cursor: pointer;
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--second-font-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative
}

#passwordRecoveryModal .tab-button:hover {
    background: rgba(0, 196, 180, 0.1);
    color: var(--primary-color);
    transform: translateY(-1px)
}

#passwordRecoveryModal .tab-button.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 196, 180, 0.3)
}

#passwordRecoveryModal .tab-button.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), #00e5d0, var(--primary-color));
    border-radius: 10px;
    z-index: -1;
    animation: tabGlow 2s infinite
}

@keyframes tabGlow {
    0%,
    100% {
        opacity: 0.5
    }
    50% {
        opacity: 0.8
    }
}

#passwordRecoveryModal .recovery-method {
    display: block
}

#passwordRecoveryModal label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--second-font-color)
}

#passwordRecoveryModal input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--secondary-font-color);
    border-radius: 10px;
    font-size: 14px;
    color: var(--font-color);
    background: var(--background-color);
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box
}

#passwordRecoveryModal input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 196, 180, 0.15);
    transform: translateY(-1px)
}

#passwordRecoveryModal input:hover {
    border-color: rgba(0, 196, 180, 0.6)
}

#passwordRecoveryModal .button-container {
    display: flex;
    gap: 12px;
    margin-top: 20px
}

#passwordRecoveryModal .modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden
}

#passwordRecoveryModal .modal-btn::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: left 0.5s ease
}

#passwordRecoveryModal .modal-btn:hover::before {
    left: 100%
}

#passwordRecoveryModal .btn-email,
#passwordRecoveryModal .btn-sms,
#passwordRecoveryModal .btn-reset {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 196, 180, 0.2)
}

#passwordRecoveryModal .btn-email:hover,
#passwordRecoveryModal .btn-sms:hover,
#passwordRecoveryModal .btn-reset:hover {
    background: #00a999;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 196, 180, 0.3)
}

#passwordRecoveryModal .btn-cancel,
#passwordRecoveryModal .btn-back {
    background: var(--background-on-hover);
    color: var(--font-color);
    border: 1px solid var(--secondary-font-color)
}

#passwordRecoveryModal .btn-cancel:hover,
#passwordRecoveryModal .btn-back:hover {
    background: var(--secondary-font-color);
    color: var(--background-color);
    transform: translateY(-1px)
}

#passwordRecoveryModal .sms-notification {
    background: var(--success-color);
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 13px;
    animation: slideInNotification 0.4s ease-out;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3)
}

@keyframes slideInNotification {
    from {
        opacity: 0;
        transform: translateY(-20px)
    }
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

#passwordRecoveryModal #smsStatus {
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 13px;
    text-align: center;
    transition: all 0.3s ease
}

#passwordRecoveryModal #smsStatus.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    animation: statusSlideIn 0.3s ease-out
}

#passwordRecoveryModal #smsStatus.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    animation: statusSlideIn 0.3s ease-out
}

#passwordRecoveryModal #smsStatus.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    animation: statusSlideIn 0.3s ease-out
}

@keyframes statusSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px)
    }
    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@media (max-width:600px) {
    #passwordRecoveryModal>div {
        width: 95%;
        padding: 24px 20px;
        max-height: 90vh;
        overflow-y: auto
    }
    #passwordRecoveryModal h3 {
        font-size: 1.2rem;
        margin-bottom: 20px
    }
    #passwordRecoveryModal .tab-button {
        font-size: 12px;
        padding: 8px 12px
    }
    #passwordRecoveryModal input,
    #passwordRecoveryModal .modal-btn {
        font-size: 13px;
        padding: 11px 14px
    }
    #passwordRecoveryModal .button-container {
        flex-direction: column;
        gap: 10px
    }
    #passwordRecoveryModal .modal-btn {
        flex: none
    }
}

/* ===============================================
   ENHANCED BIASHARA ALERT & NOTIFICATION SYSTEM 
   =============================================== */

#alertMessageContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 380px;
    min-width: 300px;
    border-radius: 12px;
    padding: 18px 24px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.4;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateX(400px);
    opacity: 0;
    animation: slideInAlert 0.5s ease-out forwards;
    border-left: 5px solid;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Alert Animation */
@keyframes slideInAlert {
    0% {
        transform: translateX(400px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutAlert {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Success Alert - Beautiful Green */
#alertMessageContainer.alert-success {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 50%, #c3e6cb 100%);
    border-left-color: #28a745;
    color: #155724;
    box-shadow: 0 8px 32px rgba(40, 167, 69, 0.2);
}

#alertMessageContainer.alert-success::before {
    content: '✓';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Error Alert - Attractive Red */
#alertMessageContainer.alert-error {
    background: linear-gradient(135deg, #fdf2f2 0%, #f8d7da 50%, #f1aeb5 100%);
    border-left-color: #dc3545;
    color: #721c24;
    box-shadow: 0 8px 32px rgba(220, 53, 69, 0.2);
}

#alertMessageContainer.alert-error::before {
    content: '✗';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Warning Alert - Eye-catching Orange */
#alertMessageContainer.alert-warning {
    background: linear-gradient(135deg, #fffdf7 0%, #fff3cd 50%, #ffeaa7 100%);
    border-left-color: #ffc107;
    color: #856404;
    box-shadow: 0 8px 32px rgba(255, 193, 7, 0.2);
}

#alertMessageContainer.alert-warning::before {
    content: '⚠';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #ffc107;
    color: #212529;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Info Alert - Professional Blue */
#alertMessageContainer.alert-info {
    background: linear-gradient(135deg, #f0f8ff 0%, #d1ecf1 50%, #bee5eb 100%);
    border-left-color: #17a2b8;
    color: #0c5460;
    box-shadow: 0 8px 32px rgba(23, 162, 184, 0.2);
}

#alertMessageContainer.alert-info::before {
    content: 'ℹ';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #17a2b8;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Welcome Alert - Special styling for registration success */
#alertMessageContainer.alert-welcome {
    background: linear-gradient(135deg, #fff0f5 0%, #fce4ec 50%, #f8bbd9 100%);
    border-left-color: #e91e63;
    color: #880e4f;
    box-shadow: 0 8px 32px rgba(233, 30, 99, 0.2);
    border-radius: 16px;
    padding: 20px 28px;
}

#alertMessageContainer.alert-welcome::before {
    content: '🎉';
    display: inline-block;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    font-size: 16px;
    flex-shrink: 0;
}

/* Alert Content */
.alert-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alert-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 2px;
}

.alert-message {
    font-size: 14px;
    opacity: 0.9;
}

/* Close button */
.alert-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.alert-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

/* Progress bar for auto-dismiss */
.alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 12px 12px;
    animation: alertProgress 5s linear forwards;
}

@keyframes alertProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    #alertMessageContainer {
        top: 15px;
        right: 15px;
        left: 15px;
        max-width: none;
        min-width: unset;
        padding: 16px 20px;
        font-size: 14px;
        border-radius: 8px;
        transform: translateY(-200px);
        animation: slideDownMobile 0.5s ease-out forwards;
    }
    
    @keyframes slideDownMobile {
        0% {
            transform: translateY(-200px);
            opacity: 0;
        }
        100% {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    #alertMessageContainer::before {
        width: 18px;
        height: 18px;
        line-height: 18px;
        font-size: 12px;
    }
    
    .alert-title {
        font-size: 15px;
    }
    
    .alert-message {
        font-size: 13px;
    }
}

/* Notification Stack Support */
.alert-stack {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
}

.alert-stack .alert-item {
    position: relative;
    transform: translateX(400px);
    opacity: 0;
    animation: slideInAlert 0.5s ease-out forwards;
}

.alert-stack .alert-item:nth-child(n+4) {
    display: none; /* Limit to 3 visible alerts */
}

@media (max-width: 768px) {
    .alert-stack {
        top: 15px;
        right: 15px;
        left: 15px;
        max-width: none;
    }
    
    .alert-stack .alert-item {
        transform: translateY(-200px);
        animation: slideDownMobile 0.5s ease-out forwards;
    }
}

/* Enhanced Registration Success Notifications */
.registration-success-notification {
    position: relative;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #b3e5fc 100%);
    border-left-color: #0288d1;
    color: #01579b;
    box-shadow: 0 12px 40px rgba(2, 136, 209, 0.25);
    padding: 24px 28px;
    border-radius: 16px;
}

.registration-success-notification::before {
    content: '🎊';
    font-size: 20px;
    width: 28px;
    height: 28px;
    line-height: 28px;
}

.registration-success-notification .welcome-message {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #01579b;
}

.registration-success-notification .welcome-subtitle {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.registration-success-notification .next-steps {
    font-size: 13px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    margin-top: 8px;
    border-left: 3px solid #0288d1;
}

/* Login Success Notifications */
.login-success-notification {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 50%, #ce93d8 100%);
    border-left-color: #9c27b0;
    color: #4a148c;
    box-shadow: 0 12px 40px rgba(156, 39, 176, 0.25);
}

.login-success-notification::before {
    content: '👋';
    background: #9c27b0;
}

/* System Status Notifications */
.system-notification {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 50%, #ffe082 100%);
    border-left-color: #ff8f00;
    color: #e65100;
    box-shadow: 0 8px 32px rgba(255, 143, 0, 0.2);
}

.system-notification::before {
    content: '📢';
    background: #ff8f00;
    color: white;
}

/* Business Update Notifications */
.business-notification {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 50%, #c8e6c9 100%);
    border-left-color: #4caf50;
    color: #1b5e20;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.2);
}

.business-notification::before {
    content: '🏢';
    background: #4caf50;
    color: white;
}

/* Payment & Subscription Notifications */
.payment-notification {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 50%, #eeeeee 100%);
    border-left-color: #607d8b;
    color: #263238;
    box-shadow: 0 8px 32px rgba(96, 125, 139, 0.2);
}

.payment-notification::before {
    content: '💳';
    background: #607d8b;
    color: white;
}

/* Critical Error Notifications */
.critical-error-notification {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 50%, #ef9a9a 100%);
    border-left-color: #d32f2f;
    color: #b71c1c;
    box-shadow: 0 12px 40px rgba(211, 47, 47, 0.3);
    animation: criticalPulse 2s infinite;
}

@keyframes criticalPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.critical-error-notification::before {
    content: '⚠️';
    background: #d32f2f;
    color: white;
    animation: pulse 1s infinite;
}

/* Maintenance Notifications */
.maintenance-notification {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
    border-left-color: #1976d2;
    color: #0d47a1;
    box-shadow: 0 8px 32px rgba(25, 118, 210, 0.2);
}

.maintenance-notification::before {
    content: '🔧';
    background: #1976d2;
    color: white;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    z-index: 11000;
    pointer-events: none;
}

.toast-container.top-right {
    top: 20px;
    right: 20px;
}

.toast-container.top-left {
    top: 20px;
    left: 20px;
}

.toast-container.bottom-right {
    bottom: 20px;
    right: 20px;
}

.toast-container.bottom-left {
    bottom: 20px;
    left: 20px;
}

.toast-container.top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.toast-container.bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.toast-item {
    pointer-events: auto;
    margin-bottom: 10px;
    max-width: 400px;
}

/* Enhanced Hover Effects */
#alertMessageContainer:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

#alertMessageContainer:hover .alert-progress {
    animation-play-state: paused;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    #alertMessageContainer.alert-success {
        background: linear-gradient(135deg, #1e3a32 0%, #2d5b47 50%, #3c7f5e 100%);
        color: #a8e6a3;
        border-left-color: #4caf50;
    }
    
    #alertMessageContainer.alert-error {
        background: linear-gradient(135deg, #3a1e1e 0%, #5b2d2d 50%, #7f3c3c 100%);
        color: #ffb3b3;
        border-left-color: #f44336;
    }
    
    #alertMessageContainer.alert-warning {
        background: linear-gradient(135deg, #3a351e 0%, #5b542d 50%, #7f743c 100%);
        color: #ffe0a3;
        border-left-color: #ff9800;
    }
    
    #alertMessageContainer.alert-info {
        background: linear-gradient(135deg, #1e2a3a 0%, #2d425b 50%, #3c5b7f 100%);
        color: #a3c7ff;
        border-left-color: #2196f3;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    #alertMessageContainer {
        border: 2px solid;
        font-weight: 600;
    }
    
    #alertMessageContainer.alert-success {
        border-color: #000;
        background: #00ff00;
        color: #000;
    }
    
    #alertMessageContainer.alert-error {
        border-color: #000;
        background: #ff0000;
        color: #fff;
    }
    
    #alertMessageContainer.alert-warning {
        border-color: #000;
        background: #ffff00;
        color: #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    #alertMessageContainer {
        animation: none;
        transition: opacity 0.2s ease;
    }
    
    @keyframes slideInAlert {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    @keyframes slideDownMobile {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* Focus Management for Accessibility */
#alertMessageContainer:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.alert-close:focus {
    outline: 2px solid currentColor;
    outline-offset: 1px;
    background: rgba(0, 0, 0, 0.2);
}

/* Print Styles */
@media print {
    #alertMessageContainer,
    .toast-container {
        display: none !important;
    }
}

/* ===============================================
   NOTIFICATION BADGES & COUNTERS
   =============================================== */

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-badge.success {
    background: #28a745;
}

.notification-badge.warning {
    background: #ffc107;
    color: #212529;
}

.notification-badge.info {
    background: #17a2b8;
}

/* Notification Bell Icon */
.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.notification-bell:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.notification-bell.has-notifications {
    animation: bellShake 0.5s ease-in-out;
}

@keyframes bellShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.notification-dropdown.show {
    display: block;
    animation: dropdownSlideIn 0.3s ease-out;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #f0f8ff;
    border-left: 3px solid #007bff;
}

.notification-item .notification-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.notification-item .notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.notification-item .notification-text {
    flex: 1;
}

.notification-item .notification-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    color: #333;
}

.notification-item .notification-message {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Instagram-style Profile Mobile Responsive */
@media (max-width: 768px) {
    .profile-header {
        padding: 16px 0 20px;
        margin-bottom: 24px;
    }
    
    .profile-picture {
        width: 100px;
        height: 100px;
        margin-right: 30px;
    }
    
    .profile-name-and-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .profile-name-and-actions h2 {
        font-size: 24px;
        margin: 0;
    }
    
    .instagram-edit-btn {
        font-size: 13px !important;
        padding: 6px 12px !important;
    }
    
    .profile-info {
        max-width: calc(100% - 130px);
    }
    
    .tm-profile-picture {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    #profile-picture-preview {
        width: 100px;
        height: 100px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 12px 0 16px;
    }
    
    .profile-picture {
        width: 120px;
        height: 120px;
        margin-right: 0;
        margin-bottom: 16px;
    }
    
    .profile-info {
        max-width: 100%;
        width: 100%;
    }
    
    .profile-name-and-actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .profile-name-and-actions h2 {
        font-size: 20px;
        text-align: center;
    }
    
    .instagram-edit-btn {
        font-size: 12px !important;
        padding: 6px 16px !important;
        width: auto !important;
    }
    
    .tm-profile-picture {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    #profile-picture-preview {
        width: 80px;
        height: 80px;
        margin-bottom: 10px;
    }
    
    #change-profile-picture {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
}

/* Extra compact mobile navigation for very small screens */
@media (max-width: 375px) {
    .nav-hidden {
        height: 55px;
    }
    
    #mobile-public-nav,
    #mobile-user-nav,
    #mobile-admin-nav {
        height: 55px;
        padding: 3px 0;
    }
    
    #mobile-public-nav .nav-hidden-item,
    #mobile-user-nav .nav-hidden-item,
    #mobile-admin-nav .nav-hidden-item {
        height: 45px;
        min-height: 45px;
        max-height: 45px;
        padding: 4px 1px;
        margin: 0 1px;
    }
    
    #mobile-public-nav .nav-hidden-item i,
    #mobile-user-nav .nav-hidden-item i,
    #mobile-admin-nav .nav-hidden-item i {
        font-size: 1.2rem;
    }
    
    .nav-floating-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
        top: -15px;
    }
    
    .nav-floating-button:hover {
        transform: translateX(-50%) translateY(-1px);
    }
    
    /* Profile images in mobile nav */
    .nav-hidden-item img.mobile-profile-img {
        width: 24px !important;
        height: 24px !important;
        border-radius: 50%;
    }
}

/* Ultra compact for iPhone SE and similar */
@media (max-width: 320px) {
    .nav-hidden {
        height: 50px;
    }
    
    #mobile-public-nav,
    #mobile-user-nav,
    #mobile-admin-nav {
        height: 50px;
        padding: 2px 0;
    }
    
    #mobile-public-nav .nav-hidden-item,
    #mobile-user-nav .nav-hidden-item,
    #mobile-admin-nav .nav-hidden-item {
        height: 40px;
        min-height: 40px;
        max-height: 40px;
        padding: 3px 1px;
        margin: 0;
    }
    
    #mobile-public-nav .nav-hidden-item i,
    #mobile-user-nav .nav-hidden-item i,
    #mobile-admin-nav .nav-hidden-item i {
        font-size: 1.1rem;
    }
    
    .nav-floating-button {
        width: 45px;
        height: 45px;
        font-size: 18px;
        top: -12px;
    }
    
    /* Profile images in mobile nav */
    .nav-hidden-item img.mobile-profile-img {
        width: 22px !important;
        height: 22px !important;
    }
}

.notification-item .notification-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* Welcome Banner for New Users */
.welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.welcome-banner h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.welcome-banner p {
    margin: 0 0 16px 0;
    font-size: 14px;
    opacity: 0.9;
}

.welcome-banner .welcome-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.welcome-banner .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.welcome-banner .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.online {
    background: #28a745;
    animation: statusPulse 2s infinite;
}

.status-indicator.offline {
    background: #6c757d;
}

.status-indicator.busy {
    background: #ffc107;
}

.status-indicator.away {
    background: #fd7e14;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}




/* Enhanced Button Interactions */
.tab-btn.tab-switching {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Mobile Instagram Mode Body */
body.mobile-instagram-mode {
    padding-bottom: var(--mobile-nav-height);
    touch-action: manipulation;
}

/* Instagram-style Loading States */
.instagram-loading {
    position: relative;
    overflow: hidden;
}

.instagram-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Performance Optimizations */
.instagram-carousel,
.tab-btn,
.nav-hidden-nav {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Final Enhanced Animations */
@keyframes instagramFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.instagram-animation {
    animation: instagramFadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Mobile responsive for enhanced image preview */
@media screen and (max-width: 768px) {
    .image-preview {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
        margin-bottom: 25px;
        padding: 10px 5px;
    }
    
    .preview-item {
        margin-bottom: 35px;
    }
    
    .preview-item img,
    .preview-item video {
        height: 220px;
    }
    
    .edit-overlay {
        bottom: -30px;
        padding: 6px 14px;
        font-size: 11px;
        border-radius: 16px;
    }
}

@media screen and (max-width: 480px) {
    .image-preview {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .preview-item img,
    .preview-item video {
        height: 300px;
		width: 280px;
    }
    
    .edit-overlay {
        bottom: -28px;
        padding: 5px 12px;
        font-size: 10px;
    }
}



/* =========================
   BIASHARAHUB ALERT SYSTEM
========================= */
/* BiasharaHub Alert System - High Specificity CSS */
/* This CSS has higher specificity to override any conflicts */

/* High specificity base styles */
body .alert-system.biashara-alert-system,
.alert-system#alertSystem {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 999999 !important;
    max-width: 400px !important;
    min-width: 300px !important;
    transform: translateX(450px) !important;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    pointer-events: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

body .alert-system.biashara-alert-system.show,
.alert-system#alertSystem.show {
    transform: translateX(0) !important;
    pointer-events: all !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body .alert-system.biashara-alert-system .alert-container,
.alert-system#alertSystem .alert-container {
    background: var(--alert-bg, #ffffff) !important;
    border: 1px solid var(--alert-border, #e1e5e9) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    padding: 16px 20px !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    position: relative !important;
    backdrop-filter: blur(10px) !important;
    border-left: 4px solid var(--alert-accent, #007bff) !important;
}

body .alert-system.biashara-alert-system .alert-icon,
.alert-system#alertSystem .alert-icon {
    flex-shrink: 0 !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--alert-accent, #007bff) !important;
    font-size: 18px !important;
}

body .alert-system.biashara-alert-system .alert-content,
.alert-system#alertSystem .alert-content {
    flex: 1 !important;
    min-width: 0 !important;
}

body .alert-system.biashara-alert-system .alert-title,
.alert-system#alertSystem .alert-title {
    font-weight: 600 !important;
    font-size: 14px !important;
    color: var(--alert-title-color, #333333) !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.3 !important;
}

body .alert-system.biashara-alert-system .alert-message,
.alert-system#alertSystem .alert-message {
    font-size: 13px !important;
    color: var(--alert-message-color, #666666) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
}

body .alert-system.biashara-alert-system .alert-close,
.alert-system#alertSystem .alert-close {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    color: var(--alert-close-color, #999999) !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
    font-size: 12px !important;
    margin-top: -2px !important;
}

body .alert-system.biashara-alert-system .alert-close:hover,
.alert-system#alertSystem .alert-close:hover {
    background: var(--alert-close-hover-bg, rgba(0, 0, 0, 0.05)) !important;
    color: var(--alert-close-hover-color, #333333) !important;
}

body .alert-system.biashara-alert-system .alert-progress,
.alert-system#alertSystem .alert-progress {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    height: 3px !important;
    background: var(--alert-accent, #007bff) !important;
    border-radius: 0 0 12px 12px !important;
    width: 100% !important;
    transform-origin: left !important;
    animation: alertProgress 5s linear forwards !important;
}

/* Progress animation */
@keyframes alertProgress {
    from {
        transform: scaleX(1) !important;
    }
    to {
        transform: scaleX(0) !important;
    }
}

/* Alert Type Styles with High Specificity */
body .alert-system.biashara-alert-system.success,
.alert-system#alertSystem.success {
    --alert-accent: #28a745 !important;
    --alert-bg: #f8fff9 !important;
    --alert-border: #d4edda !important;
    --alert-title-color: #155724 !important;
    --alert-message-color: #155724 !important;
}

body .alert-system.biashara-alert-system.error,
.alert-system#alertSystem.error {
    --alert-accent: #dc3545 !important;
    --alert-bg: #fff5f5 !important;
    --alert-border: #f5c6cb !important;
    --alert-title-color: #721c24 !important;
    --alert-message-color: #721c24 !important;
}

body .alert-system.biashara-alert-system.warning,
.alert-system#alertSystem.warning {
    --alert-accent: #ffc107 !important;
    --alert-bg: #fffbf0 !important;
    --alert-border: #ffeaa7 !important;
    --alert-title-color: #856404 !important;
    --alert-message-color: #856404 !important;
}

body .alert-system.biashara-alert-system.info,
.alert-system#alertSystem.info {
    --alert-accent: #17a2b8 !important;
    --alert-bg: #f0fdff !important;
    --alert-border: #bee5eb !important;
    --alert-title-color: #0c5460 !important;
    --alert-message-color: #0c5460 !important;
}

/* Dark Mode with High Specificity */
body.dark-mode .alert-system.biashara-alert-system,
body.dark-mode .alert-system#alertSystem {
    --alert-bg: #2a2a2a !important;
    --alert-border: #404040 !important;
    --alert-title-color: #ffffff !important;
    --alert-message-color: #cccccc !important;
    --alert-close-color: #888888 !important;
    --alert-close-hover-bg: rgba(255, 255, 255, 0.1) !important;
    --alert-close-hover-color: #ffffff !important;
}

body.dark-mode .alert-system.biashara-alert-system.success,
body.dark-mode .alert-system#alertSystem.success {
    --alert-bg: #1a2e1a !important;
    --alert-border: #2d5a2d !important;
    --alert-title-color: #4ade80 !important;
    --alert-message-color: #86efac !important;
}

body.dark-mode .alert-system.biashara-alert-system.error,
body.dark-mode .alert-system#alertSystem.error {
    --alert-bg: #2e1a1a !important;
    --alert-border: #5a2d2d !important;
    --alert-title-color: #f87171 !important;
    --alert-message-color: #fca5a5 !important;
}

body.dark-mode .alert-system.biashara-alert-system.warning,
body.dark-mode .alert-system#alertSystem.warning {
    --alert-bg: #2e2a1a !important;
    --alert-border: #5a522d !important;
    --alert-title-color: #fbbf24 !important;
    --alert-message-color: #fcd34d !important;
}

body.dark-mode .alert-system.biashara-alert-system.info,
body.dark-mode .alert-system#alertSystem.info {
    --alert-bg: #1a2a2e !important;
    --alert-border: #2d525a !important;
    --alert-title-color: #38bdf8 !important;
    --alert-message-color: #7dd3fc !important;
}

/* Mobile Responsive with High Specificity */
@media (max-width: 768px) {
    body .alert-system.biashara-alert-system,
    .alert-system#alertSystem {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
        min-width: auto !important;
        transform: translateY(-120px) !important;
    }
    
    body .alert-system.biashara-alert-system.show,
    .alert-system#alertSystem.show {
        transform: translateY(0) !important;
    }
    
    body .alert-system.biashara-alert-system .alert-container,
    .alert-system#alertSystem .alert-container {
        padding: 14px 16px !important;
        gap: 10px !important;
    }
    
    body .alert-system.biashara-alert-system .alert-title,
    .alert-system#alertSystem .alert-title {
        font-size: 13px !important;
    }
    
    body .alert-system.biashara-alert-system .alert-message,
    .alert-system#alertSystem .alert-message {
        font-size: 12px !important;
    }
}

/* Animation for slide in/out with High Specificity */
body .alert-system.biashara-alert-system.slide-out,
.alert-system#alertSystem.slide-out {
    transform: translateX(450px) !important;
}

@media (max-width: 768px) {
    body .alert-system.biashara-alert-system.slide-out,
    .alert-system#alertSystem.slide-out {
        transform: translateY(-120px) !important;
    }
}

/* Hide any old alert systems to prevent conflicts */
#alertMessageContainer {
    display: none !important;
}

/* Ensure our alert system always wins */
body .alert-system.biashara-alert-system * {
    box-sizing: border-box !important;
}

/* =============================================== */
/* 🎨 MODERN WITHDRAWAL MODAL DESIGN (Dark Mode) */
/* =============================================== */

/* Remove old withdrawal modal styles and add modern design */
#withdrawal-modal.withdrawal-modal,
#withdrawal-modal.tm-form-container.withdrawal-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10001;
    padding: 20px;
    animation: fadeIn 0.3s ease;
    /* Override tm-form-container styles */
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    transform: none !important;
}

#withdrawal-modal.withdrawal-modal[style*="display: flex"],
#withdrawal-modal.tm-form-container.withdrawal-modal[style*="display: flex"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Ensure balance display elements don't inherit white backgrounds */
#withdrawal-modal .balance-display,
#withdrawal-modal .balance-display * {
    background-color: transparent !important;
}

/* Specific fixes for balance info and note */
#withdrawal-modal .balance-info {
    background: linear-gradient(135deg, rgba(0, 196, 180, 0.2), rgba(0, 160, 148, 0.1)) !important;
}

#withdrawal-modal .balance-note {
    background: rgba(255, 193, 7, 0.1) !important;
}

body:not(.dark-mode) #withdrawal-modal .balance-info {
    background: linear-gradient(135deg, rgba(0, 196, 180, 0.08), rgba(0, 160, 148, 0.05)) !important;
}

body:not(.dark-mode) #withdrawal-modal .balance-note {
    background: rgba(255, 193, 7, 0.08) !important;
}

#withdrawal-modal .withdrawal-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 
                0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    animation: modalSlideUp 0.4s ease;
}

/* Dark mode override for withdrawal modal */
body.dark-mode #withdrawal-modal .withdrawal-modal-content {
    background: linear-gradient(135deg, #0f0f0f 0%, #1e1e1e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced dark mode text visibility */
body.dark-mode #withdrawal-modal .withdrawal-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

body.dark-mode #withdrawal-modal .balance-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

body.dark-mode #withdrawal-modal .form-label {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
}

body.dark-mode #withdrawal-modal .input-help {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode #withdrawal-modal .input-help small {
    color: rgba(255, 255, 255, 0.65);
}

/* Light mode styles */
body:not(.dark-mode) #withdrawal-modal .withdrawal-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* Header styling */
#withdrawal-modal .withdrawal-header {
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

#withdrawal-modal .withdrawal-header h2 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #00c4b4, #00a094);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#withdrawal-modal .withdrawal-header h2 i {
    background: linear-gradient(135deg, #00c4b4, #00a094);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 32px;
}

#withdrawal-modal .withdrawal-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin: 10px 0 0;
    font-weight: 400;
}

body:not(.dark-mode) #withdrawal-modal .withdrawal-subtitle {
    color: rgba(0, 0, 0, 0.6);
}

/* Close button */
#withdrawal-modal .tm-form-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
}

#withdrawal-modal .tm-form-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: rotate(90deg);
}

body:not(.dark-mode) #withdrawal-modal .tm-form-close {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.7);
}

body:not(.dark-mode) #withdrawal-modal .tm-form-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #000;
}

/* Balance display */
#withdrawal-modal .balance-display {
    padding: 20px 30px;
    text-align: center;
    background: transparent;
}

#withdrawal-modal .balance-info {
    background: linear-gradient(135deg, rgba(0, 196, 180, 0.25), rgba(0, 160, 148, 0.15)) !important;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(0, 196, 180, 0.4);
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 196, 180, 0.1);
}

/* Light mode balance info */
body:not(.dark-mode) #withdrawal-modal .balance-info {
    background: linear-gradient(135deg, rgba(0, 196, 180, 0.08), rgba(0, 160, 148, 0.05)) !important;
    border: 1px solid rgba(0, 196, 180, 0.15);
}

#withdrawal-modal .balance-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

#withdrawal-modal .balance-amount {
    color: #00c4b4;
    font-size: 32px;
    font-weight: 800;
    display: block;
    text-shadow: 0 2px 10px rgba(0, 196, 180, 0.4);
    letter-spacing: 1px;
}

body:not(.dark-mode) #withdrawal-modal .balance-label {
    color: rgba(0, 0, 0, 0.7);
}

#withdrawal-modal .balance-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    background: rgba(255, 193, 7, 0.1) !important;
    padding: 12px;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
}

body:not(.dark-mode) #withdrawal-modal .balance-note {
    color: rgba(0, 0, 0, 0.6);
    background: rgba(255, 193, 7, 0.08) !important;
}

#withdrawal-modal .balance-note i {
    color: #ffc107;
}

/* Form styling */
#withdrawal-modal .withdrawal-form {
    padding: 0 30px 30px;
}

#withdrawal-modal .form-group {
    margin-bottom: 25px;
}

#withdrawal-modal .form-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
}

body:not(.dark-mode) #withdrawal-modal .form-label {
    color: rgba(0, 0, 0, 0.8);
}

#withdrawal-modal .form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#withdrawal-modal .form-control:focus {
    outline: none;
    border-color: #00c4b4;
    background: rgba(0, 196, 180, 0.15);
    box-shadow: 0 0 20px rgba(0, 196, 180, 0.25);
    color: #ffffff;
}

#withdrawal-modal .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

body:not(.dark-mode) #withdrawal-modal .form-control {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) #withdrawal-modal .form-control::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

body:not(.dark-mode) #withdrawal-modal .form-control:focus {
    background: rgba(0, 196, 180, 0.05);
    border-color: #00c4b4;
}

/* Input help text */
#withdrawal-modal .input-help {
    margin-top: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 6px;
}

body:not(.dark-mode) #withdrawal-modal .input-help {
    color: rgba(0, 0, 0, 0.6);
}

/* Security notice */
#withdrawal-modal .security-notice {
    margin: 25px 0;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(56, 142, 60, 0.1));
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 12px;
    padding: 20px;
}

#withdrawal-modal .notice-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

#withdrawal-modal .notice-content i {
    color: #4caf50;
    font-size: 24px;
    margin-top: 2px;
    flex-shrink: 0;
}

#withdrawal-modal .notice-text strong {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 6px;
    display: block;
}

#withdrawal-modal .notice-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

body:not(.dark-mode) #withdrawal-modal .notice-text strong {
    color: rgba(0, 0, 0, 0.8);
}

body:not(.dark-mode) #withdrawal-modal .notice-text p {
    color: rgba(0, 0, 0, 0.6);
}

/* Form actions */
#withdrawal-modal .form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

#withdrawal-modal .btn-cancel {
    flex: 1;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#withdrawal-modal .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

#withdrawal-modal .btn-submit {
    flex: 2;
    padding: 15px;
    background: linear-gradient(135deg, #00c4b4, #00a094);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 196, 180, 0.3);
}

#withdrawal-modal .btn-submit:hover {
    background: linear-gradient(135deg, #00a094, #008780);
    box-shadow: 0 6px 20px rgba(0, 196, 180, 0.4);
    transform: translateY(-2px);
}

#withdrawal-modal .btn-submit:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

body:not(.dark-mode) #withdrawal-modal .btn-cancel {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.7);
}

body:not(.dark-mode) #withdrawal-modal .btn-cancel:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
    color: rgba(0, 0, 0, 0.8);
}

/* Loader styling */
#withdrawal-modal .withdrawal-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

#withdrawal-modal .loader-content {
    text-align: center;
    color: white;
}

#withdrawal-modal .loader-spinner {
    font-size: 48px;
    color: #00c4b4;
    margin-bottom: 20px;
}

#withdrawal-modal .loader-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: white;
}

#withdrawal-modal .loader-content p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

body:not(.dark-mode) #withdrawal-modal .form-label {
    color: rgba(0, 0, 0, 0.8);
}

#withdrawal-modal .form-label i {
    color: #00c4b4;
    font-size: 18px;
}

#withdrawal-modal .withdrawal-input,
#withdrawal-modal .withdrawal-select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

body:not(.dark-mode) #withdrawal-modal .withdrawal-input,
body:not(.dark-mode) #withdrawal-modal .withdrawal-select {
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.03);
    color: rgba(0, 0, 0, 0.9);
}

#withdrawal-modal .withdrawal-input:focus,
#withdrawal-modal .withdrawal-select:focus {
    outline: none;
    border-color: #00c4b4;
    background: rgba(0, 196, 180, 0.1);
    box-shadow: 0 0 0 4px rgba(0, 196, 180, 0.2);
    transform: translateY(-2px);
}

#withdrawal-modal .withdrawal-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

body:not(.dark-mode) #withdrawal-modal .withdrawal-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

#withdrawal-modal .input-help {
    margin-top: 8px;
}

#withdrawal-modal .input-help small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

body:not(.dark-mode) #withdrawal-modal .input-help small {
    color: rgba(0, 0, 0, 0.5);
}

#withdrawal-modal .input-help i {
    color: #ffc107;
}

/* Security notice */
#withdrawal-modal .security-notice {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    border-radius: 12px;
    border-left: 4px solid #10b981;
}

#withdrawal-modal .notice-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

#withdrawal-modal .notice-content i {
    color: #10b981;
    font-size: 24px;
    margin-top: 2px;
}

#withdrawal-modal .notice-text h4 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
}

#withdrawal-modal .notice-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

body:not(.dark-mode) #withdrawal-modal .notice-text h4 {
    color: rgba(0, 0, 0, 0.8);
}

body:not(.dark-mode) #withdrawal-modal .notice-text p {
    color: rgba(0, 0, 0, 0.6);
}

/* Form actions */
#withdrawal-modal .form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

#withdrawal-modal .btn-cancel,
#withdrawal-modal .btn-submit {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#withdrawal-modal .btn-cancel {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

#withdrawal-modal .btn-cancel:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: translateY(-2px);
}

#withdrawal-modal .btn-submit {
    background: linear-gradient(135deg, #00c4b4, #00a094);
    color: white;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 196, 180, 0.3);
}

#withdrawal-modal .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 196, 180, 0.4);
}

#withdrawal-modal .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loader */
#withdrawal-modal .withdrawal-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

#withdrawal-modal .loader-content {
    text-align: center;
    color: white;
}

#withdrawal-modal .loader-spinner {
    font-size: 48px;
    color: #00c4b4;
    margin-bottom: 20px;
    animation: spin 1s linear infinite;
}

#withdrawal-modal .loader-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px;
}

#withdrawal-modal .loader-content p {
    font-size: 16px;
    opacity: 0.8;
    margin: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Success animation */
#withdrawal-modal.withdrawal-success .withdrawal-modal-content {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #withdrawal-modal .withdrawal-modal-content {
        max-width: 95%;
        margin: 10px;
        border-radius: 15px;
    }
    
    #withdrawal-modal .withdrawal-header {
        padding: 25px 20px 15px;
    }
    
    #withdrawal-modal .withdrawal-header h2 {
        font-size: 24px;
    }
    
    #withdrawal-modal .withdrawal-form {
        padding: 0 20px 25px;
    }
    
    #withdrawal-modal .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    #withdrawal-modal .balance-amount {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    #withdrawal-modal {
        padding: 10px;
    }
    
    #withdrawal-modal .withdrawal-header h2 {
        font-size: 22px;
    }
    
    #withdrawal-modal .balance-amount {
        font-size: 24px;
    }
    
    #withdrawal-modal .withdrawal-input,
    #withdrawal-modal .withdrawal-select {
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* ===================== MILESTONE SYSTEM STYLES ===================== */

/* Milestone Card Container */
.milestone-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 24px;
    overflow: hidden;
    border: none;
    transition: all 0.3s ease;
}

.milestone-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.milestone-card .card-header {
    background: linear-gradient(135deg, #00e6d0 0%, #00c4b4 100%);
    color: white;
    padding: 16px 20px;
    border: none;
    font-weight: 600;
}

.milestone-card .card-header h5 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.milestone-card .card-body {
    padding: 20px;
}

/* Milestone Achievement Indicator */
.milestone-achieved {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    animation: zoomIn 0.5s ease;
}

.milestone-achieved i {
    font-size: 24px;
    color: #ffd700;
}

/* Milestone Progress Bar */
.milestone-progress {
    margin-bottom: 16px;
}

.milestone-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.milestone-info span:first-child {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
}

.milestone-reward {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.progress-bar {
    background: #e9ecef;
    height: 12px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: linear-gradient(135deg, #00e6d0 0%, #00c4b4 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.milestone-remaining {
    margin-top: 8px;
    color: #6c757d;
    font-size: 14px;
    text-align: center;
}

/* Total Milestone Rewards */
.total-milestone-rewards {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    margin-top: 16px;
}

.total-milestone-rewards i {
    font-size: 20px;
    color: #ffd700;
}

/* Milestone Celebration Modal */
.milestone-celebration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.milestone-celebration.show {
    opacity: 1;
    visibility: visible;
}

.celebration-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: scale(0.7);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.milestone-celebration.show .celebration-content {
    transform: scale(1);
}

.celebration-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,215,0,0.1), transparent);
    animation: celebrate-rotate 3s linear infinite;
}

@keyframes celebrate-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.celebration-icon {
    font-size: 64px;
    color: #ffd700;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.celebration-content h3 {
    color: #2c3e50;
    margin-bottom: 16px;
    font-size: 28px;
    font-weight: 700;
}

.celebration-content p {
    color: #6c757d;
    margin-bottom: 12px;
    font-size: 16px;
}

.reward-amount {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 20px;
    margin: 20px 0;
    display: inline-block;
}

.celebration-content .btn {
    background: linear-gradient(135deg, #00e6d0 0%, #00c4b4 100%);
    border: none;
    color: white;
    padding: 12px 32px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.celebration-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,196,180,0.3);
}

/* Dark Mode Support for Milestone System */
body.dark-mode .milestone-card {
    background: #2a2a2a !important;
    color: #ffffff !important;
}

body.dark-mode .milestone-card .card-header {
    background: linear-gradient(135deg, #00c4b4 0%, #008b7a 100%) !important;
}

body.dark-mode .milestone-info span:first-child {
    color: #e0e6ed !important;
}

body.dark-mode .milestone-remaining {
    color: #b0b8c1 !important;
}

body.dark-mode .celebration-content {
    background: #2a2a2a !important;
    color: #ffffff !important;
}

body.dark-mode .celebration-content h3 {
    color: #e0e6ed !important;
}

body.dark-mode .celebration-content p {
    color: #b0b8c1 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .milestone-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .milestone-reward {
        align-self: stretch;
        text-align: center;
    }
    
    .celebration-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .celebration-content h3 {
        font-size: 24px;
    }
    
    .celebration-icon {
        font-size: 48px;
    }
}

@media (max-width: 480px) {
    .milestone-card .card-body {
        padding: 16px;
    }
    
    .milestone-achieved,
    .total-milestone-rewards {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .milestone-info span:first-child {
        font-size: 14px;
    }
    
    .reward-amount {
        font-size: 18px;
        padding: 10px 20px;
    }
}

/* Text Gold Color Helper */
.text-gold {
    color: #ffd700 !important;
}

/* No Image Placeholder */
.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #f8f9fa;
    color: #6c757d;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
}

.no-image-placeholder i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.no-image-placeholder p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Dark Mode for No Image Placeholder */
body.dark-mode .no-image-placeholder {
    background: #3a3a3a !important;
    color: #b0b8c1 !important;
    border-color: #555 !important;
}

/* Business Items Without Images */
.user-business-item:not(:has(.business-image)),
.admin-business-item:not(:has(.business-image)),
.business-item:not(:has(.business-image)) {
    border-left: 4px solid #00e6d0;
    padding-left: 16px;
}

body.dark-mode .user-business-item:not(:has(.business-image)),
body.dark-mode .admin-business-item:not(:has(.business-image)),
body.dark-mode .business-item:not(:has(.business-image)) {
    border-left-color: #00c4b4 !important;
}

/* ===================== WITHDRAWAL HISTORY MODAL STYLES ===================== */

/* History Button Styling */
.history-btn {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.2);
    margin-left: 12px;
}

.history-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(111, 66, 193, 0.3);
    text-decoration: none;
    color: white;
}

/* Withdrawal History Modal */
.withdrawal-history-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;

    /* Zui modal isionekane mwanzoni */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.withdrawal-history-modal.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}


.withdrawal-history-modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.05);
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.withdrawal-history-header {
    padding: 32px 32px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.withdrawal-history-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="30" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.withdrawal-history-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.withdrawal-history-header h2 i {
    font-size: 24px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.history-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
    font-weight: 400;
    position: relative;
}

.withdrawal-history-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: absolute;
    top: 50%;
    right: 32px;
    transform: translateY(-50%);
    z-index: 5;
}

.refresh-history {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
}

/* History Filters */
.history-filters {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.filter-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

#history-status-filter {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 14px;
}

.filter-btn {
    background: linear-gradient(135deg, #00e6d0 0%, #00c4b4 100%);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 196, 180, 0.3);
}

/* History Content */
.withdrawal-history-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
}

/* History Loader */
.history-loader {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.history-loader .loader-spinner {
    font-size: 32px;
    margin-bottom: 16px;
    color: #6f42c1;
}

/* History List */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* History Item */
.history-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #6c757d;
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.history-item.status-pending {
    border-left-color: #ffc107;
}

.history-item.status-processing {
    border-left-color: #17a2b8;
}

.history-item.status-completed {
    border-left-color: #28a745;
}

.history-item.status-rejected {
    border-left-color: #dc3545;
}

/* History Item Header */
.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.history-amount .amount {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.history-amount .method {
    font-size: 14px;
    color: #6c757d;
    margin-left: 8px;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-processing {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* History Details */
.history-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.detail-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.detail-value {
    color: #2c3e50;
    font-size: 14px;
    text-align: right;
}

/* No History State */
.no-history {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-history i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-history h3 {
    margin-bottom: 12px;
    color: #495057;
}

/* History Error State */
.history-error {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
}

.history-error i {
    font-size: 48px;
    margin-bottom: 16px;
}

.btn-retry {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* History Actions */
.history-actions {
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

/* =================== WITHDRAWAL SUMMARY SECTION =================== */
/* Main withdrawal summary container - modern card grid layout */
.withdrawal-history-section .withdrawal-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 25px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

/* Animated background overlay */
.withdrawal-history-section .withdrawal-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.withdrawal-history-section .withdrawal-summary:hover::before {
    left: 100%;
}

/* Summary cards inside withdrawal summary */
.withdrawal-history-section .summary-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.withdrawal-history-section .summary-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Card icons with animation */
.withdrawal-history-section .card-icon {
    font-size: 1.8rem;
    opacity: 0.95;
    padding: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.withdrawal-history-section .card-icon.pending {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
}

.withdrawal-history-section .card-icon.paid {
    color: #28a745;
    background: rgba(40, 167, 69, 0.2);
}

.withdrawal-history-section .card-icon.total {
    color: #17a2b8;
    background: rgba(23, 162, 184, 0.2);
}

/* Card info styling */
.withdrawal-history-section .card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.withdrawal-history-section .card-value {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.withdrawal-history-section .card-label {
    font-size: 0.9rem;
    opacity: 0.85;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* History Items */
.history-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.history-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.history-amount {
    display: flex;
    align-items: center;
    gap: 8px;
}

.amount-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #155724;
}

.history-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-pending {
    border-left: 4px solid #ffc107;
}

.status-pending .history-status {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    border-left: 4px solid #17a2b8;
}

.status-processing .history-status {
    background: #d1ecf1;
    color: #0c5460;
}

.status-paid {
    border-left: 4px solid #28a745;
}

.status-paid .history-status {
    background: #d4edda;
    color: #155724;
}

.status-failed {
    border-left: 4px solid #dc3545;
}

.status-failed .history-status {
    background: #f8d7da;
    color: #721c24;
}

.status-cancelled {
    border-left: 4px solid #6c757d;
}

.status-cancelled .history-status {
    background: #e2e3e5;
    color: #383d41;
}

.history-item-body {
    padding: 20px;
}

.history-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-weight: 500;
}

.phone-number {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
    font-family: monospace;
    font-size: 0.9rem;
    margin-left: 8px;
}

.history-dates {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.date-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.history-notes {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    font-style: italic;
    color: #495057;
}

.history-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.withdrawal-id {
    font-family: monospace;
    color: #6c757d;
    font-size: 0.85rem;
}

.btn-cancel-withdrawal {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.btn-cancel-withdrawal:hover {
    background: #c82333;
}

/* Empty State */
.history-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.history-empty i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.history-empty h3 {
    margin-bottom: 10px;
    color: #495057;
}

.history-empty .btn {
    margin-top: 20px;
}

/* Mobile Responsive for Withdrawal Summary */
@media (max-width: 768px) {
    .withdrawal-history-section .withdrawal-summary {
        grid-template-columns: 1fr;
        padding: 20px 15px;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .withdrawal-history-section .summary-card {
        padding: 15px;
        gap: 12px;
    }
    
    .withdrawal-history-section .card-icon {
        font-size: 1.5rem;
        padding: 10px;
    }
    
    .withdrawal-history-section .card-value {
        font-size: 1.2rem;
    }
    
    .withdrawal-history-section .card-label {
        font-size: 0.8rem;
    }
    
    .history-item-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
        padding: 15px;
    }
    
    .history-item-body {
        padding: 15px;
    }
    
    .history-dates {
        flex-direction: column;
    }
    
    .history-item-footer {
        padding: 12px 15px;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .phone-number {
        margin-left: 0;
        margin-top: 5px;
    }
}

.history-actions .btn-secondary,
.history-actions .btn-primary {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    transition: all 0.3s ease;
}

.history-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.history-actions .btn-primary {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
    color: white;
}

/* Dark Mode Support */
body.dark-mode .history-btn {
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.4);
}

body.dark-mode .withdrawal-history-modal-content {
    background: #2a2a2a !important;
    color: #ffffff !important;
}

body.dark-mode .withdrawal-history-header {
    border-bottom-color: #555 !important;
}

body.dark-mode .history-filters {
    background: #3a3a3a !important;
    border-bottom-color: #555 !important;
}

body.dark-mode #history-status-filter {
    background: #2a2a2a !important;
    border-color: #555 !important;
    color: #ffffff !important;
}

body.dark-mode .history-item {
    background: #3a3a3a !important;
    color: #ffffff !important;
}

body.dark-mode .history-amount .amount {
    color: #e0e6ed !important;
}

body.dark-mode .detail-label {
    color: #b0b8c1 !important;
}

body.dark-mode .detail-value {
    color: #e0e6ed !important;
}

body.dark-mode .history-actions {
    background: #3a3a3a !important;
    border-top-color: #555 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .withdrawal-history-modal {
        padding: 10px;
    }
    
    .withdrawal-history-modal-content {
        border-radius: 12px;
        max-height: 95vh;
    }
    
    .withdrawal-history-header {
        padding: 20px;
    }
    
    .withdrawal-history-header h2 {
        font-size: 20px;
    }
    
    .history-filters,
    .withdrawal-history-content,
    .history-actions {
        padding: 15px 20px;
    }
    
    .history-item {
    .history-btn {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        justify-content: center;
    }
}

/* Mobile Creator Balance Card Buttons */
@media (max-width: 480px) {
    #creator-dashboard-content .creator-balance-card .balance-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    #creator-dashboard-content .withdraw-btn,
    #creator-dashboard-content .history-btn {
        flex: none;
        width: 100%;
        min-width: auto;
    }
}

/* ===================== WITHDRAWAL ALERT SYSTEM STYLES ===================== */

/* Withdrawal Alert Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Withdrawal Alert Base Styles */
.withdrawal-alert,
#withdrawal-alert {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    padding: 16px 20px !important;
    border-radius: 12px !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    max-width: 400px !important;
    min-width: 300px !important;
    z-index: 10002 !important;
    cursor: pointer !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    animation: slideInRight 0.4s ease !important;
    transition: all 0.3s ease !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
}

.withdrawal-alert:hover,
#withdrawal-alert:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 35px rgba(0,0,0,0.2) !important;
}

/* Alert Icon Styling */
.withdrawal-alert i,
#withdrawal-alert i {
    margin-right: 10px !important;
    font-size: 16px !important;
    vertical-align: middle !important;
    display: inline-block !important;
}

/* Error Alert */
.withdrawal-alert.error,
#withdrawal-alert[data-type="error"] {
    background: linear-gradient(135deg, #EF4444, #DC2626) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

/* Success Alert */
.withdrawal-alert.success,
#withdrawal-alert[data-type="success"] {
    background: linear-gradient(135deg, #10B981, #059669) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

/* Info Alert */
.withdrawal-alert.info,
#withdrawal-alert[data-type="info"] {
    background: linear-gradient(135deg, #3B82F6, #2563EB) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

/* Warning Alert */
.withdrawal-alert.warning,
#withdrawal-alert[data-type="warning"] {
    background: linear-gradient(135deg, #F59E0B, #D97706) !important;
    border-color: rgba(255,255,255,0.2) !important;
}

/* Dark Mode Adjustments */
body.dark-mode .withdrawal-alert,
body.dark-mode #withdrawal-alert {
    border-color: rgba(255,255,255,0.15) !important;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .withdrawal-alert,
    #withdrawal-alert {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
        min-width: auto !important;
        padding: 14px 16px !important;
        font-size: 13px !important;
    }
    
    .withdrawal-alert i,
    #withdrawal-alert i {
        font-size: 14px !important;
        margin-right: 8px !important;
    }
}
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .detail-value {
        text-align: left;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
    }
    
    .history-actions {
        flex-direction: column;
    }
    
    .history-btn {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        justify-content: center;
    }
}

/* ===========================
   WITHDRAWAL HISTORY MODAL
=========================== */
.withdrawal-history-modal {
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.withdrawal-history-content {
    padding: 0;
}

.withdrawal-history-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--background-on-hover);
    text-align: center;
}

.withdrawal-history-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.history-subtitle {
    color: var(--second-font-color);
    font-size: 0.95rem;
    margin: 0;
}

/* Dark mode theme adjustments for withdrawal section */
.dark-mode .withdrawal-history-section .withdrawal-summary {
    background: linear-gradient(135deg, #2c2c54 0%, #40407a 100%);
    box-shadow: 0 4px 15px rgba(44, 44, 84, 0.4);
}

.dark-mode .withdrawal-history-section .summary-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.dark-mode .withdrawal-history-section .summary-card:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Balance Actions for History Button */
.balance-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.balance-actions .withdraw-btn,
.balance-actions .history-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
}

.history-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.history-btn:hover {
    background: linear-gradient(135deg, #138496 0%, #17a2b8 100%);
    transform: translateY(-2px);
}

/* ========== WITHDRAWAL HISTORY SYSTEM CSS ========== */

/* Withdrawal History Section */
.withdrawal-history-section {
    margin-top: 30px;
    background: rgba(0, 196, 180, 0.05);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(0, 196, 180, 0.15);
}

.withdrawal-history-section h3 {
    color: #00c4b4;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.withdrawal-history-section h3 i {
    font-size: 1.4rem;
    color: #00a094;
}

/* Refresh Button Styling */
.refresh-btn {
    background: linear-gradient(135deg, #00c4b4 0%, #00a094 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 196, 180, 0.2);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.refresh-btn::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: left 0.5s ease;
}

.refresh-btn:hover {
    background: linear-gradient(135deg, #00a094 0%, #008f7a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 196, 180, 0.3);
}

.refresh-btn:hover::before {
    left: 100%;
}

.refresh-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 196, 180, 0.25);
}

.refresh-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.refresh-btn:hover i {
    transform: rotate(45deg);
}

/* Refreshing State */
.refresh-btn.refreshing {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    cursor: not-allowed;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.refresh-btn.refreshing i {
    animation: spin 1s linear infinite;
}

.refresh-btn.refreshing::before {
    display: none;
}

/* Spin animation for refresh icon */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Withdrawal History Container */
.withdrawal-history-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid rgba(0, 196, 180, 0.2);
    border-radius: 12px;
    background: white;
    padding: 0;
}

body.dark-mode .withdrawal-history-container {
    background: #2a2a2a;
    border-color: rgba(0, 196, 180, 0.3);
}

/* Desktop Table View */
.withdrawal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
    color: var(--font-color);
}

.withdrawal-table thead {
    background: linear-gradient(135deg, #00c4b4 0%, #00a094 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.withdrawal-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.withdrawal-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 196, 180, 0.1);
}

.withdrawal-table tbody tr:hover {
    background: rgba(0, 196, 180, 0.05);
    transform: scale(1.01);
}

.withdrawal-table td {
    padding: 16px 12px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0, 196, 180, 0.1);
}

/* Status badges for table */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.status-badge.pending {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #8b5a00;
}

.status-badge.approved {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.status-badge.rejected {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.status-badge i {
    font-size: 10px;
}

/* Mobile List View */
.withdrawal-list {
    display: none;
    padding: 0;
    margin: 0;
}

.withdrawal-item {
    background: white;
    margin-bottom: 15px;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 3px 12px rgba(0, 196, 180, 0.08);
    border: 1px solid rgba(0, 196, 180, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

body.dark-mode .withdrawal-item {
    background: #3a3a3a;
    color: #ffffff;
    border-color: rgba(0, 196, 180, 0.3);
}

.withdrawal-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #00c4b4 0%, #00a094 100%);
}

.withdrawal-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 196, 180, 0.15);
}

.withdrawal-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(0, 196, 180, 0.1);
    padding-bottom: 8px;
}

.withdrawal-amount {
    font-size: 18px;
    font-weight: 700;
    color: #00c4b4;
    display: flex;
    align-items: center;
    gap: 6px;
}

.withdrawal-date {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

body.dark-mode .withdrawal-date {
    color: #ccc;
}

.withdrawal-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.withdrawal-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.withdrawal-detail-label {
    font-size: 11px;
    color: #00a094;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.withdrawal-detail-value {
    font-size: 14px;
    color: var(--font-color);
    font-weight: 500;
    word-break: break-word;
}

/* Error State */
.error-message {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #ef5350;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.1);
}

body.dark-mode .error-message {
    background: linear-gradient(135deg, #3f1a1a 0%, #5a1a1a 100%);
    color: #ff6b6b;
    border-color: #ff4444;
}

.error-message i {
    font-size: 48px;
    color: #e53e3e;
    margin-bottom: 10px;
    animation: shake 0.5s ease-in-out;
}

body.dark-mode .error-message i {
    color: #ff6b6b;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-message h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.error-message p {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.5;
}

.btn-retry {
    background: linear-gradient(135deg, #00c4b4 0%, #00a094 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 196, 180, 0.2);
}

.btn-retry:hover {
    background: linear-gradient(135deg, #00a094 0%, #008f7a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 196, 180, 0.3);
}

.btn-retry i {
    font-size: 14px;
}

/* Loading State */
.loading-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

body.dark-mode .loading-message {
    color: #ccc;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 196, 180, 0.2);
    border-left: 4px solid #00c4b4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: rgba(0, 196, 180, 0.05);
    border-radius: 12px;
    border: 2px dashed rgba(0, 196, 180, 0.2);
}

body.dark-mode .empty-state {
    color: #ccc;
    background: rgba(0, 196, 180, 0.1);
}

.empty-state i {
    font-size: 64px;
    color: rgba(0, 196, 180, 0.3);
    margin-bottom: 20px;
    display: block;
}

.empty-state h4 {
    font-size: 18px;
    color: #00a094;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.empty-state p {
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
    max-width: 300px;
    margin: 0 auto;
}

/* ===================== WITHDRAWAL HISTORY FILTER BUTTONS ===================== */

/* Filter Buttons Container */
.history-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Individual Filter Button */
.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid #dee2e6;
    background: white;
    color: #6c757d;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

/* Filter Button Hover Effect */
.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: #00c4b4;
    color: #00a094;
}

/* Filter Button Active State */
.filter-btn.active {
    background: linear-gradient(135deg, #00c4b4, #00a094);
    color: white;
    border-color: #00a094;
    box-shadow: 0 4px 15px rgba(0, 196, 180, 0.4);
}

/* Filter Button Icons */
.filter-btn i {
    font-size: 16px;
    opacity: 0.8;
}

.filter-btn.active i {
    opacity: 1;
    animation: pulse 1.5s infinite;
}

/* Filter Button Specific Colors */
.filter-btn[data-status="all"]:hover,
.filter-btn[data-status="all"].active {
    background: linear-gradient(135deg, #6f42c1, #5a2d91);
    border-color: #5a2d91;
}

.filter-btn[data-status="pending"]:hover,
.filter-btn[data-status="pending"].active {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    border-color: #e0a800;
    color: #212529;
}

.filter-btn[data-status="paid"]:hover,
.filter-btn[data-status="paid"].active {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border-color: #1e7e34;
}

.filter-btn[data-status="rejected"]:hover,
.filter-btn[data-status="rejected"].active {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-color: #c82333;
}

/* Pulse Animation for Active State */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Filter Button Loading State */
.filter-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.filter-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Filter Buttons Mobile Responsive */
@media (max-width: 768px) {
    .history-filters {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        margin: 15px 0;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 8px;
    }
    
    .filter-btn i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .history-filters {
        padding: 12px;
        gap: 8px;
    }
    
    .filter-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .filter-btn i {
        font-size: 16px;
    }
}

/* Filter Buttons Alternative List Style */
.history-filters.list-style {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.history-filters.list-style .filter-btn {
    border-radius: 8px;
    padding: 16px 20px;
    justify-content: flex-start;
    text-transform: none;
    font-weight: 500;
    font-size: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.history-filters.list-style .filter-btn:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.history-filters.list-style .filter-btn.active {
    background: linear-gradient(135deg, #00c4b4, #00a094);
    color: white;
    border-color: #00a094;
    transform: translateX(0);
}

/* ===================== WITHDRAWAL HISTORY TABLE & RESPONSIVE STYLES ===================== */

/* Desktop Table Styles */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.history-table thead {
    background: linear-gradient(135deg, #00c4b4, #00a094);
    color: white;
}

.history-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    border: none;
}

.history-table th i {
    margin-right: 8px;
    opacity: 0.9;
}

.history-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.history-table tbody tr {
    transition: background-color 0.2s ease;
}

.history-table tbody tr:hover {
    background: #f8f9fa;
}

.history-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table Cell Styles */
.date-cell {
    min-width: 140px;
}

.date-cell .date {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.date-cell .time {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.amount-cell {
    min-width: 120px;
}

.amount-cell .amount {
    font-size: 16px;
    font-weight: 700;
    color: #00a094;
}

.method-cell {
    min-width: 100px;
}

.phone-cell {
    min-width: 130px;
}

.phone-cell .phone {
    font-family: monospace;
    font-size: 13px;
    color: #495057;
}

.status-cell {
    min-width: 110px;
}

.actions-cell {
    min-width: 100px;
}

/* Status badges for table */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.status-paid,
.status-badge.status-completed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.status-rejected,
.status-badge.status-failed,
.status-badge.status-cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-badge.status-processing {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

/* Action buttons in table */
.btn-cancel {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-cancel:hover {
    background: #c82333;
}

.no-actions {
    color: #6c757d;
    font-style: italic;
    font-size: 12px;
}

/* Mobile List View */
.history-list {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    gap: 16px;
}

.history-list-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid #6c757d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.history-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.history-list-item.status-pending {
    border-left-color: #ffc107;
}

.history-list-item.status-paid,
.history-list-item.status-completed {
    border-left-color: #28a745;
}

.history-list-item.status-rejected,
.history-list-item.status-failed,
.history-list-item.status-cancelled {
    border-left-color: #dc3545;
}

.history-list-item.status-processing {
    border-left-color: #17a2b8;
}

/* Mobile List Item Header */
.mobile-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.mobile-amount {
    font-size: 18px;
    font-weight: 700;
    color: #00a094;
}

.mobile-date {
    text-align: right;
    font-size: 12px;
    color: #6c757d;
}

.mobile-date .date {
    display: block;
    font-weight: 600;
    color: #495057;
}

/* Mobile List Item Body */
.mobile-item-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.mobile-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-detail-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.5px;
}

.mobile-detail-value {
    font-size: 13px;
    color: #2c3e50;
    font-weight: 500;
}

.mobile-phone {
    font-family: monospace;
}

/* Mobile List Item Footer */
.mobile-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f1f3f4;
}

.mobile-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.mobile-status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.mobile-status-badge.status-paid,
.mobile-status-badge.status-completed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mobile-status-badge.status-rejected,
.mobile-status-badge.status-failed,
.mobile-status-badge.status-cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mobile-status-badge.status-processing {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

.mobile-actions {
    display: flex;
    gap: 8px;
}

/* Responsive Breakpoints */

/* Desktop View - Show table, hide list */
@media (min-width: 769px) {
    .desktop-view {
        display: block !important;
    }
    
    .mobile-view {
        display: none !important;
    }
    
    .table-responsive {
        display: block;
    }
    
    .history-list {
        display: none;
    }
}

/* Tablet View - Still show table but make it more compact */
@media (min-width: 576px) and (max-width: 768px) {
    .desktop-view {
        display: block !important;
    }
    
    .mobile-view {
        display: none !important;
    }
    
    .table-responsive {
        display: block;
    }
    
    .history-list {
        display: none;
    }
    
    /* Make table more compact on tablets */
    .history-table th,
    .history-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .date-cell .date {
        font-size: 13px;
    }
    
    .date-cell .time {
        font-size: 11px;
    }
    
    .amount-cell .amount {
        font-size: 15px;
    }
}

/* Mobile View - Hide table, show list */
@media (max-width: 575px) {
    .desktop-view {
        display: none !important;
    }
    
    .mobile-view {
        display: block !important;
    }
    
    .table-responsive {
        display: none !important;
    }
    
    .history-list {
        display: flex !important;
    }
    
    /* Mobile adjustments for summary and other elements */
    .withdrawal-history-container {
        max-height: none;
        border-radius: 8px;
        padding: 10px;
    }
    
    .refresh-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .withdrawal-history-section {
        padding: 20px 15px;
        margin-top: 20px;
    }
    
    .withdrawal-history-section h3 {
        font-size: 1.2rem;
        text-align: center;
    }
    
    /* Mobile summary cards - stack vertically */
    .withdrawal-history-section .withdrawal-summary {
        grid-template-columns: 1fr !important;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .withdrawal-history-section .summary-card {
        padding: 12px;
        gap: 10px;
    }
    
    .withdrawal-history-section .card-icon {
        font-size: 1.3rem;
        padding: 8px;
    }
    
    .withdrawal-history-section .card-value {
        font-size: 1.2rem;
    }
    
    .withdrawal-history-section .card-label {
        font-size: 0.8rem;
    }
    
    /* Mobile list single column layout for very small screens */
    .mobile-item-body {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .mobile-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .mobile-amount {
        font-size: 16px;
    }
    
    .mobile-item-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .withdrawal-history-section {
        padding: 15px 10px;
        margin-top: 15px;
    }
    
    .withdrawal-history-section h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .history-list-item {
        padding: 12px;
    }
    
    .mobile-amount {
        font-size: 15px;
    }
    
    .mobile-detail-value {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .withdrawal-history-section {
        padding: 15px 10px;
        margin-top: 15px;
    }
    
    .withdrawal-history-section h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .withdrawal-item {
        padding: 12px;
    }
    
    .withdrawal-amount {
        font-size: 15px;
    }
    
    .withdrawal-detail-value {
        font-size: 13px;
    }
    
    .refresh-btn {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .error-message {
        padding: 15px;
        margin: 15px 0;
    }
    
    .error-message i {
        font-size: 36px;
    }
    
    .error-message h4 {
        font-size: 16px;
    }
    
    .error-message p {
        font-size: 13px;
    }
    
    .btn-retry {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Dark Mode Specific Styles */
body.dark-mode .withdrawal-history-section {
    background: rgba(0, 196, 180, 0.1);
    border-color: rgba(0, 196, 180, 0.3);
}

body.dark-mode .withdrawal-table tbody tr:hover {
    background: rgba(0, 196, 180, 0.1);
}

body.dark-mode .withdrawal-table td {
    border-bottom-color: rgba(0, 196, 180, 0.2);
}

body.dark-mode .status-badge.pending {
    background: linear-gradient(135deg, #b8860b 0%, #daa520 100%);
    color: #fff8dc;
}

body.dark-mode .withdrawal-item-header {
    border-bottom-color: rgba(0, 196, 180, 0.2);
}

body.dark-mode .loading-message {
    color: #aaa;
}

body.dark-mode .empty-state {
    color: #aaa;
    background: rgba(0, 196, 180, 0.05);
    border-color: rgba(0, 196, 180, 0.3);
}

body.dark-mode .empty-state h4 {
    color: #00c4b4;
}

/* ========================================
   ENHANCED CREATOR STATS CARDS STYLING
   ======================================== */

/* Creator Dashboard Container Fix */
#creator-dashboard-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

#creator-dashboard-content .creator-dashboard {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* Improved Stats Grid - DISABLED TO PREVENT CONFLICTS
#creator-dashboard-content .creator-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 15px !important;
    margin-bottom: 32px !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    animation: fadeInUp 0.6s ease-out;
}
*/

/* Beautiful Modern Stats Cards - DISABLED TO PREVENT CONFLICTS
#creator-dashboard-content .stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fcfc 100%) !important;
    border: 1px solid rgba(0, 196, 180, 0.08) !important;
    border-radius: 16px !important;
    padding: 28px 24px !important;
    box-shadow: 0 8px 25px rgba(0, 196, 180, 0.08), 
                0 2px 8px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    position: relative !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
    min-height: 120px;
}
*/

/* Hover Effects */
#creator-dashboard-content .stat-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 40px rgba(0, 196, 180, 0.15), 
                0 8px 20px rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(0, 196, 180, 0.2) !important;
}

/* Loading State Animation */
#creator-dashboard-content .stat-card.stat-loading {
    animation: pulse 2s infinite !important;
    box-shadow: 0 0 0 4px rgba(0, 196, 180, 0.1) !important;
}

/* Gradient Background Accents */
#creator-dashboard-content .stat-card:nth-child(1)::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00c4b4, #00a094);
    border-radius: 0 16px 0 50px;
    opacity: 0.08;
}

#creator-dashboard-content .stat-card:nth-child(2)::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 0 16px 0 50px;
    opacity: 0.08;
}

#creator-dashboard-content .stat-card:nth-child(3)::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f39c12, #d68910);
    border-radius: 0 16px 0 50px;
    opacity: 0.08;
}

#creator-dashboard-content .stat-card:nth-child(4)::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    border-radius: 0 16px 0 50px;
    opacity: 0.08;
}

/* Enhanced Stat Icons */
#creator-dashboard-content .stat-card .stat-icon {
    font-size: 2.8rem !important;
    color: #00c4b4 !important;
    opacity: 1 !important;
    margin-right: 0 !important;
    background: linear-gradient(135deg, rgba(0, 196, 180, 0.1), rgba(0, 196, 180, 0.05));
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Individual Icon Colors */
#creator-dashboard-content .stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, rgba(0, 196, 180, 0.1), rgba(0, 196, 180, 0.05));
    color: #00c4b4 !important;
}

#creator-dashboard-content .stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(231, 76, 60, 0.05));
    color: #e74c3c !important;
}

#creator-dashboard-content .stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1), rgba(243, 156, 18, 0.05));
    color: #f39c12 !important;
}

#creator-dashboard-content .stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.1), rgba(155, 89, 182, 0.05));
    color: #9b59b6 !important;
}

/* Icon Hover Effects */
#creator-dashboard-content .stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(0, 196, 180, 0.2);
}

/* Enhanced Stat Info Container */
#creator-dashboard-content .stat-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    flex: 1;
    gap: 4px;
}

/* Beautiful Stat Values */
#creator-dashboard-content .stat-value {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    color: #2c3e50 !important;
    margin-bottom: 0 !important;
    line-height: 1.2;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Elegant Stat Labels */
#creator-dashboard-content .stat-label {
    font-size: 1.1rem !important;
    color: #7f8c8d !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Number Animation Effect */
@keyframes numberCount {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#creator-dashboard-content .stat-value.counting {
    animation: numberCount 0.5s ease-out;
}

/* Responsive Design - USING EARLIER DEFINITIONS TO PREVENT CONFLICTS
@media (max-width: 1024px) {
    #creator-dashboard-content .creator-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
        gap: 12px !important;
    }
}

@media (max-width: 768px) {
    #creator-dashboard-content {
        padding: 0 15px !important;
    }
    
    #creator-dashboard-content .creator-stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 16px !important;
        margin-bottom: 24px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    #creator-dashboard-content .stat-card {
        padding: 18px 16px !important;
        min-height: 90px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    #creator-dashboard-content {
        padding: 0 10px !important;
    }
    
    #creator-dashboard-content .creator-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }
    
    #creator-dashboard-content .stat-card {
        padding: 16px 12px !important;
        min-height: 80px;
    }
    
    #creator-dashboard-content .stat-card .stat-icon {
        width: 56px;
        height: 56px;
        font-size: 2.4rem !important;
        padding: 12px;
    }
    
    #creator-dashboard-content .stat-value {
        font-size: 2rem !important;
    }
    
    #creator-dashboard-content .stat-label {
        font-size: 0.95rem !important;
    }
}
*/

/* Additional Mobile Responsiveness for Very Small Screens - DISABLED 
@media (max-width: 400px) {
    #creator-dashboard-content {
        padding: 0 8px !important;
    }
    
    #creator-dashboard-content .creator-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
    }
    
    #creator-dashboard-content .stat-card {
        padding: 14px 10px !important;
        min-height: 75px;
        gap: 12px !important;
    }
    
    #creator-dashboard-content .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.6rem !important;
        padding: 8px;
    }
    
    #creator-dashboard-content .stat-value {
        font-size: 1.6rem !important;
    }
    
    #creator-dashboard-content .stat-label {
        font-size: 0.85rem !important;
    }
}
*/

/* Dark Mode Support */
body.dark-mode #creator-dashboard-content .stat-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #1e1e1e 100%) !important;
    border-color: rgba(0, 196, 180, 0.15) !important;
    color: #fff;
}

body.dark-mode #creator-dashboard-content .stat-card:hover {
    background: linear-gradient(135deg, #1e1e1e 0%, #222 100%) !important;
}

body.dark-mode #creator-dashboard-content .stat-value {
    color: #fff !important;
    background: linear-gradient(135deg, #fff, #e1e1e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark-mode #creator-dashboard-content .stat-label {
    color: #bdc3c7 !important;
}

/* =================== WITHDRAWAL SUMMARY FORCE LAYOUT FIX =================== */
/* This ensures withdrawal-summary displays properly despite any conflicts */
.withdrawal-history-section .withdrawal-summary {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Force grid items to display properly */
.withdrawal-history-section .withdrawal-summary > * {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Debug helper for any inline styles that might be hiding the element */
.withdrawal-summary[style*="display: none"],
.withdrawal-summary[style*="visibility: hidden"] {
    display: grid !important;
    visibility: visible !important;
}

/* Ensure proper flexbox alignment within summary cards */
.withdrawal-summary .summary-card,
.withdrawal-summary .card-info {
    display: flex !important;
}

/* Force proper grid template */
.withdrawal-summary:not(.withdrawal-history-section .withdrawal-summary) {
    display: block !important; /* Fallback for any other withdrawal summary */
}

/* =================== CREATOR STATS GRID CONTAINER FIX =================== */
/* Ensure creator-stats-grid never overflows its container */
.creator-stats-grid {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    contain: layout !important;
}

/* Force all stat cards to stay within bounds */
.creator-stats-grid .stat-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Emergency fix for any overflow issues */
.creator-dashboard {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Container wrapper fix */
.content-section {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* =================== INSTAGRAM-STYLE INTERFACE =================== */

/* Instagram-style create form layout */
.instagram-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 70vh;
    gap: 20px;
}

.preview-area {
    flex: 1;
    min-height: 300px;
    background: #000;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.selected-media-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.selected-media-preview img,
.selected-media-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.no-media-placeholder {
    text-align: center;
    color: #666;
}

.no-media-placeholder i {
    margin-bottom: 15px;
    opacity: 0.5;
    color: var(--secondary-font-color);
}

.no-media-placeholder p {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--font-color);
}

.no-media-placeholder span {
    font-size: 0.9rem;
    color: var(--secondary-font-color);
}

.gallery-area {
    background: var(--background-color);
    border-radius: 8px;
    border: 1px solid var(--secondary-font-color);
    padding: 20px;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--font-color);
}

.add-more-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.add-more-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 196, 180, 0.3);
}

/* Drag drop area within Instagram interface */
.drag-drop-area {
    border: 2px dashed var(--secondary-font-color);
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 20px;
    background: rgba(0, 196, 180, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.drag-drop-area:hover {
    border-color: var(--primary-color);
    background: rgba(0, 196, 180, 0.1);
}

.drag-drop-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(0, 196, 180, 0.15);
    transform: scale(1.02);
}

.drag-drop-content {
    color: var(--font-color);
}

.drag-drop-content i {
    color: var(--primary-color);
    margin-bottom: 15px;
    opacity: 0.7;
}

.drag-drop-content p {
    margin: 10px 0 8px 0;
    font-size: 1rem;
    font-weight: 500;
}

.drag-drop-content span {
    display: block;
    margin: 10px 0 15px 0;
    color: var(--secondary-font-color);
    font-size: 0.9rem;
}

.browse-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.browse-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 196, 180, 0.3);
}

.browse-btn i {
    margin-right: 8px;
}

.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 5px;
}

.media-thumbnail {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.media-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.media-thumbnail.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 196, 180, 0.3);
}

.media-thumbnail img,
.media-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-thumbnail .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #dc3545;
    font-weight: bold;
}

.media-thumbnail:hover .remove-btn {
    opacity: 1;
}

.upload-info {
    text-align: center;
    color: var(--secondary-font-color);
    font-size: 0.8rem;
    line-height: 1.5;
    background: rgba(0, 196, 180, 0.05);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid rgba(0, 196, 180, 0.1);
}

.upload-info i {
    color: var(--primary-color);
    margin-right: 5px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .instagram-layout {
        max-height: 65vh;
        gap: 15px;
    }
    
    .preview-area {
        min-height: 250px;
    }
    
    .gallery-area {
        padding: 15px;
    }
    
    .media-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
        gap: 8px;
        max-height: 160px;
    }
    
    .gallery-header {
        font-size: 0.85rem;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .add-more-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
        width: 100%;
    }
    
    .drag-drop-area {
        padding: 25px 15px;
    }
    
    .drag-drop-content p {
        font-size: 0.9rem;
    }
    
    .browse-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

/* Integration with existing modal system */
.create-modal-content .instagram-layout {
    padding: 0;
}

.create-modal-content .step-content {
    padding: 20px 0;
}

/* Smooth transitions for interface switching */
.step-content {
    transition: all 0.3s ease;
}

/* Hide Instagram interface by default, show when active */
.instagram-layout {
    display: flex;
}

/* =========================
   INSTAGRAM-STYLE PREVIEW AREA
========================= */

/* Preview area styling */
.preview-area {
    width: 100%;
    height: 400px;
    background: #000;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    position: relative;
}

.selected-media-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.no-media-placeholder {
    text-align: center;
    color: #fff;
    opacity: 0.7;
}

.no-media-placeholder i {
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-media-placeholder p {
    font-size: 16px;
    margin: 8px 0;
    font-weight: 500;
}

.media-preview-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.edit-media-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.edit-media-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev-btn {
    left: 16px;
}

.next-btn {
    right: 16px;
}

.media-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.preview-error {
    text-align: center;
    color: #ff6b6b;
    padding: 20px;
}

.preview-error i {
    margin-bottom: 12px;
}

.preview-error p {
    margin: 0;
    font-size: 14px;
}

/* Gallery area styling */
.gallery-area {
    background: #fff;
    border-top: 1px solid #dbdbdb;
    padding: 16px;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.gallery-header span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.add-more-btn {
    background: #0095f6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s ease;
}

.add-more-btn:hover {
    background: #005c98;
}

/* Media gallery grid */
.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.media-thumbnail {
    aspect-ratio: 1;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.media-thumbnail.selected {
    border-color: #0095f6;
}

.media-thumbnail img,
.media-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-thumbnail .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.media-thumbnail:hover .remove-btn {
    opacity: 1;
}

/* Upload info */
.upload-info {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.upload-info p {
    margin: 4px 0;
}

/* Drag and drop area */
.drag-drop-area {
    border: 2px dashed #dbdbdb;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #fafafa;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drag-drop-area:hover,
.drag-drop-area.drag-over {
    border-color: #0095f6;
    background: rgba(0, 149, 246, 0.05);
}

.drag-drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.drag-drop-content i {
    color: #0095f6;
    opacity: 0.7;
}

.drag-drop-content p {
    font-size: 16px;
    color: #333;
    margin: 0;
    font-weight: 500;
}

.drag-drop-content span {
    font-size: 14px;
    color: #666;
}

.browse-btn {
    background: #0095f6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.browse-btn:hover {
    background: #005c98;
}

/* Dark mode adjustments for preview */
body.dark-mode .gallery-area {
    background: #1a1a1a;
    border-top-color: #333;
}

body.dark-mode .gallery-header span {
    color: #fff;
}

body.dark-mode .upload-info {
    color: #b3b3b3;
}

body.dark-mode .drag-drop-area {
    background: #262626;
    border-color: #444;
}

body.dark-mode .drag-drop-area:hover,
body.dark-mode .drag-drop-area.drag-over {
    border-color: #0095f6;
    background: rgba(0, 149, 246, 0.1);
}

body.dark-mode .drag-drop-content p {
    color: #fff;
}

body.dark-mode .drag-drop-content span {
    color: #b3b3b3;
}

/* =========================
   INSTAGRAM-STYLE FORM STYLING
========================= */

/* General form container */
.tm-form-container {
    background: #fff;
    max-width: 420px;
    margin: 0 auto;
    border: 1px solid #dbdbdb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* Instagram-like header - now integrated inside modal */
.create-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #dbdbdb;
    font-weight: 600;
    font-size: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1001;
    margin: -20px -20px 20px -20px; /* Extend to modal edges */
    border-radius: 12px 12px 0 0;
}

.create-form-header .header-back-btn,
.create-form-header .header-action-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 20px;
}

.create-form-header .header-back-btn {
    font-size: 20px;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.create-form-header .header-action-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.create-form-header .header-back-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.05);
}

.create-form-header .header-action-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.create-form-header .form-title {
    text-align: center;
    flex: 1;
    margin: 0 16px;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Modal adjustments for integrated header - only when visible */
#create-form[aria-hidden="false"] {
    padding: 0;
    max-height: 90vh;
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
    border-radius: 12px;
}

#create-form[aria-hidden="false"] #create-form-element {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

/* Ensure modal is properly hidden when aria-hidden="true" */
#create-form[aria-hidden="true"] {
    display: none !important;
}

/* Default state - modal should be hidden */
#create-form {
    display: none;
}

/* Hide original form title since header has it */
#create-form #business-form-title {
    display: none !important;
}

/* Ensure header buttons work properly */
.create-form-header .header-back-btn,
.create-form-header .header-action-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: #45ff1f;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
    font-weight: 600;
}

.create-form-header .header-back-btn:hover,
.create-form-header .header-action-btn:hover {
    color: #005c98;
}

/* Responsive adjustments for mobile - only when modal is visible */
@media (max-width: 768px) {
    #create-form[aria-hidden="false"] {
        max-height: 95vh;
        margin: 2.5vh auto;
        width: 95%;
        max-width: none;
    }
    
    #create-form[aria-hidden="false"] .create-form-header {
        border-radius: 12px 12px 0 0;
    }
}

/* Desktop adjustments for better UX */
@media (min-width: 769px) {
    #create-form[aria-hidden="false"] {
        max-height: 85vh;
        margin: 7.5vh auto;
        width: 85%;
        max-width: 650px; /* Reduced from 800px to more balanced width */
        border-radius: 16px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    }
    
    #create-form[aria-hidden="false"] .create-form-header {
        border-radius: 16px 16px 0 0;
        padding: 16px 24px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    #create-form[aria-hidden="false"] .create-form-header .form-title {
        font-size: 20px;
        font-weight: 700;
    }
    
    #create-form[aria-hidden="false"] .create-form-header .header-back-btn,
    #create-form[aria-hidden="false"] .create-form-header .header-action-btn {
        font-size: 18px;
        padding: 10px 12px;
    }
    
    #create-form[aria-hidden="false"] .create-form-header .header-action-btn {
        padding: 10px 20px;
        border-radius: 24px;
        font-weight: 700;
    }
    
    #create-form[aria-hidden="false"] #create-form-element {
        padding: 30px 35px; /* Slightly reduced horizontal padding */
    }
    
    /* Better image preview layout for wider desktop modal */
    #create-form[aria-hidden="false"] .pipo-upload-area {
        min-height: 200px;
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    #create-form[aria-hidden="false"] .preview-gallery {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); /* Slightly smaller for balanced width */
        gap: 15px;
        margin-top: 20px;
    }
    
    #create-form[aria-hidden="false"] .preview-item {
        border-radius: 12px;
        overflow: hidden;
        position: relative;
        aspect-ratio: 1;
        background: #f8f9fa;
    }
    
    #create-form[aria-hidden="false"] .preview-item img,
    #create-form[aria-hidden="false"] .preview-item video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 12px;
    }
    
    /* Two-column layout for desktop form fields */
    #create-form[aria-hidden="false"] .form-row {
        display: flex;
        gap: 20px;
        align-items: flex-start;
    }
    
    #create-form[aria-hidden="false"] .form-row .form-group {
        flex: 1;
    }
    
    #create-form[aria-hidden="false"] .step-content {
        min-height: 400px;
    }
    
    /* Desktop modal backdrop */
    #create-form[aria-hidden="false"]::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: -1;
        backdrop-filter: blur(4px);
    }
    
    /* Better desktop modal positioning */
    .tm-form-container[aria-hidden="false"] {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
}

/* Large desktop screens - Instagram-like wide modal */
@media (min-width: 1200px) {
    #create-form[aria-hidden="false"] {
        max-width: 750px; /* Reduced from 1000px to more moderate width */
        width: 80%;
    }
    
    #create-form[aria-hidden="false"] #create-form-element {
        padding: 35px 40px; /* Slightly reduced padding */
    }
    
    #create-form[aria-hidden="false"] .preview-gallery {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* Reduced from 180px */
        gap: 18px; /* Slightly reduced gap */
    }
    
    /* Instagram-style side-by-side layout for large screens */
    #create-form[aria-hidden="false"] .upload-preview-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        align-items: start;
    }
    
    #create-form[aria-hidden="false"] .upload-section {
        grid-column: 1;
    }
    
    #create-form[aria-hidden="false"] .preview-section {
        grid-column: 2;
        position: sticky;
        top: 20px;
    }
}

/* Add More Media Button Styling */
.add-more-media {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    border: 2px dashed #e0e6ed;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.add-more-media:hover {
    border-color: #667eea;
    background: #f0f3ff;
    transform: translateY(-2px);
}

.add-media-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.add-media-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6b4190 100%);
}

.add-media-btn:active {
    transform: translateY(0);
}

.add-media-btn i {
    font-size: 18px;
}

/* Desktop specific styling for add more button */
@media (min-width: 769px) {
    .add-more-media {
        margin: 25px 0;
        padding: 20px;
    }
    
    .add-media-btn {
        padding: 15px 30px;
        font-size: 17px;
    }
}

/* Hide Bango navigation by default - JavaScript will show for public users */
#landing-nav,
#mobile-landing-link {
    display: none;
}

/* Hide the original step navigation when header is active */
.create-form-header-active .step-navigation {
    display: none !important;
}

/* Adjust form container when header is fixed */
.tm-form-container.header-active {
    padding-top: 60px;
}

/* Hide default h2 title (use header only) */
#business-form-title {
    display: none;
}

/* Upload area */
.pipo-upload-area {
    padding: 40px 20px;
    text-align: center;
    border: 2px dashed #ccc;
    border-radius: 12px;
    margin: 16px;
    background: #fafafa;
    transition: border-color 0.3s ease;
}

.pipo-upload-area:hover {
    border-color: #0095f6;
}

.upload-icon {
    color: #aaa;
    margin-bottom: 12px;
}

.upload-text h3 {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.upload-btn {
    background: #0095f6;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    border: none;
    margin-top: 12px;
    transition: background-color 0.2s ease;
}

.upload-btn:hover {
    background: #005c98;
}

/* Step indicator like Instagram dots */
.step-indicator {
    display: flex;
    justify-content: center;
    margin: 12px 0;
    padding: 0 16px;
}

.step {
    width: 8px;
    height: 8px;
    background: #dbdbdb;
    border-radius: 50%;
    margin: 0 4px;
    transition: background-color 0.2s ease;
}

.step.active {
    background: #0095f6;
}

/* Form groups */
.form-group {
    padding: 0 16px 12px;
}

.form-group label {
    font-size: 13px;
    color: #666;
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #fafafa;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #0095f6;
    background: #fff;
}

/* Step navigation buttons */
.step-navigation {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid #dbdbdb;
    background: #fff;
}

.btn-step-next,
.btn-step-back,
.btn-post-primary {
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.btn-step-next {
    color: #0095f6;
}

.btn-step-next:hover {
    background: rgba(0, 149, 246, 0.1);
}

.btn-step-back {
    color: #262626;
}

.btn-step-back:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-post-primary {
    color: #0095f6;
    background: rgba(0, 149, 246, 0.1);
}

.btn-post-primary:hover {
    background: rgba(0, 149, 246, 0.2);
}

/* Dark mode adjustments for Instagram form */
body.dark-mode .tm-form-container {
    background: #1a1a1a;
    border-color: #333;
}

body.dark-mode .create-form-header {
    background: #1a1a1a;
    border-bottom-color: #333;
    color: #fff;
}

body.dark-mode .create-form-header .back-btn,
body.dark-mode .create-form-header .action-btn {
    color: #0095f6;
}

body.dark-mode .create-form-header .back-btn:hover,
body.dark-mode .create-form-header .action-btn:hover {
    color: #66b3ff;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background: #262626;
    border-color: #333;
    color: #fff;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
    background: #1a1a1a;
    border-color: #0095f6;
}

body.dark-mode .form-group label {
    color: #b3b3b3;
}

body.dark-mode .step-navigation {
    background: #1a1a1a;
    border-top-color: #333;
}

body.dark-mode .pipo-upload-area {
    background: #262626;
    border-color: #444;
}

body.dark-mode .upload-text h3 {
    color: #fff;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .tm-form-container {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .create-form-header {
        max-width: 100%;
        border-radius: 0;
    }
    
    .form-group {
        padding: 0 20px 16px;
    }
    
    .step-navigation {
        padding: 16px 20px;
    }
}

/* =========================
   LANDING PAGE & CONTACT STYLES (Moved from business_view.php)
========================= */

/* Landing Page Styles */
.landing-page-content {
  display: none; /* Hidden by default, shown based on view_type */
}

/* Navigation Styles */
.navbar {
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,196,180,0.2);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #00c4b4;
  font-weight: bold;
  text-decoration: none;
  font-size: 1.5rem;
}

.logo-icon {
  font-size: 2rem;
}

.nav-menu {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.nav-menu a:hover {
  color: #00c4b4;
}

.nav-actions {
  display: flex;
  gap: 15px;
}

.btn-secondary, .btn-primary {
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-secondary {
  background: transparent;
  color: #00c4b4;
  border: 2px solid #00c4b4;
}

.btn-secondary:hover {
  background: #00c4b4;
  color: black;
}

.btn-primary {
  background: linear-gradient(45deg, #00c4b4, #00ff88);
  color: black;
}

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

/* Monetization Hero Styles */
.monetization-hero {
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
  padding: 120px 20px 80px;
  text-align: center;
  border-bottom: 3px solid #00c4b4;
  position: relative;
  overflow: hidden;
}

.monetization-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(0,196,180,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(45deg, #00c4b4, #00ff88);
  color: black;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0,196,180,0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 900;
  color: white;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-title .highlight {
  background: linear-gradient(45deg, #00c4b4, #00ff88);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.3rem;
  color: #cccccc;
  margin-bottom: 50px;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.earnings-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.earning-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,196,180,0.2);
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
}

.earning-item:hover {
  transform: translateY(-5px);
  border-color: #00c4b4;
  box-shadow: 0 10px 30px rgba(0,196,180,0.2);
}

.earning-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.earning-amount {
  font-size: 1.5rem;
  font-weight: bold;
  color: #00c4b4;
  margin-bottom: 5px;
}

.earning-label {
  color: #cccccc;
  font-size: 0.9rem;
}

.hero-cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.cta-primary, .cta-secondary, .cta-skip {
  padding: 18px 35px;
  border-radius: 50px;
  font-weight: bold;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cta-primary {
  background: linear-gradient(45deg, #00c4b4, #00ff88);
  color: black;
  box-shadow: 0 8px 25px rgba(0,196,180,0.4);
}

.cta-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0,196,180,0.6);
}

.cta-secondary {
  background: transparent;
  color: white;
  border: 2px solid #00c4b4;
}

.cta-secondary:hover {
  background: #00c4b4;
  color: black;
  transform: translateY(-3px);
}

.cta-skip {
  background: transparent;
  color: #cccccc;
  border: 2px solid #666;
  font-size: 1rem;
  padding: 15px 30px;
}

.cta-skip:hover {
  background: #666;
  color: white;
  border-color: #999;
  transform: translateY(-2px);
}

.success-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: #00c4b4;
  margin-bottom: 5px;
}

.stat-label {
  color: #cccccc;
  font-size: 1rem;
}

/* Section Styles */
.about-section, .features-section, .contact-section {
  padding: 80px 20px;
  background: #1a1a1a;
}

/* Contact Section */
.contact-section {
  background: #0d1117;
}

.contact-section-main {
  background: #0d1117;
  padding: 80px 20px;
  text-align: center;
}

.contact-wrapper {
  min-height: 100vh;
  background: #0d1117;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  margin-top: 60px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.contact-info h3 {
  color: #00c4b4;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.contact-info p {
  color: #cccccc;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 40px;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 30px;
  text-align: center;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.contact-icon {
  background: linear-gradient(45deg, #00c4b4, #00ff88);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: black;
  flex-shrink: 0;
}

.contact-details h4 {
  color: #00c4b4;
  font-size: 1.2rem;
  margin: 0 0 5px 0;
}

.contact-details p {
  color: white;
  font-size: 1.1rem;
  margin: 0 0 5px 0;
}

.contact-details small {
  color: #999;
  font-size: 0.9rem;
}

.contact-form {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,196,180,0.2);
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  margin: 0 auto;
}

.contact-form h3 {
  color: #00c4b4;
  font-size: 1.8rem;
  margin-bottom: 30px;
  text-align: center;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid rgba(0,196,180,0.3);
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #00c4b4;
  box-shadow: 0 0 10px rgba(0,196,180,0.3);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #999;
}

.submit-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(45deg, #00c4b4, #00ff88);
  color: black;
  border: none;
  border-radius: 50px;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0,196,180,0.6);
}

/* Footer Styles */
.main-footer {
  background: linear-gradient(135deg, #000000 0%, #0d1117 100%);
  border-top: 3px solid #00c4b4;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  padding: 60px 0 40px;
}

.footer-section h4 {
  color: #00c4b4;
  font-size: 1.3rem;
  margin-bottom: 20px;
  font-weight: bold;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.footer-logo img {
  width: 50px;
  height: 50px;
}

.footer-logo h3 {
  color: #00c4b4;
  font-size: 1.5rem;
  margin: 0;
}

.footer-section p {
  color: #cccccc;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section ul li a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: #00c4b4;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  background: rgba(0,196,180,0.1);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00c4b4;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-links a:hover {
  background: #00c4b4;
  color: black;
  transform: translateY(-3px);
}

.contact-quick p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: #cccccc;
}

.contact-quick i {
  color: #00c4b4;
  width: 20px;
}

.footer-bottom {
  border-top: 1px solid rgba(0,196,180,0.2);
  padding: 30px 0;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom p {
  color: #999;
  margin: 0;
}

.footer-badges {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.badge {
  background: rgba(0,196,180,0.1);
  color: #00c4b4;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Desktop layout for contact */
@media (min-width: 1024px) {
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1000px;
    align-items: start;
  }
  
  .contact-info {
    text-align: left;
  }
  
  .contact-items {
    text-align: left;
  }
}

/* Mobile Responsive for Contact & Footer */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .contact-form {
    padding: 30px 20px;
    max-width: 100%;
    margin: 0 auto;
  }
  
  .contact-info {
    text-align: center;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 40px 0 30px;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-badges {
    justify-content: center;
  }
  
  .social-links {
    justify-content: center;
  }
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: #00c4b4;
  margin-bottom: 50px;
  font-weight: 900;
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.step-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,196,180,0.2);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.step-card:hover {
  transform: translateY(-10px);
  border-color: #00c4b4;
  box-shadow: 0 20px 40px rgba(0,196,180,0.2);
}

.step-number {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(45deg, #00c4b4, #00ff88);
  color: black;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.5rem;
}

.step-card h3 {
  color: #00c4b4;
  font-size: 1.5rem;
  margin: 20px 0 15px;
}

.step-card p {
  color: #cccccc;
  line-height: 1.6;
  font-size: 1rem;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0,196,180,0.1);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: #00c4b4;
  box-shadow: 0 15px 30px rgba(0,196,180,0.1);
}

.feature-icon {
  background: linear-gradient(45deg, #00c4b4, #00ff88);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
  color: black;
}

.feature-card h3 {
  color: #00c4b4;
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.feature-card p {
  color: #cccccc;
  line-height: 1.5;
}

/* Mobile Responsive for Landing Page */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 15px;
  }
  
  .nav-menu {
    display: none;
  }
  
  .nav-actions {
    gap: 10px;
  }
  
  .btn-secondary, .btn-primary {
    padding: 8px 15px;
    font-size: 0.9rem;
  }
  
  .logo-text {
    display: none;
  }
  
  .monetization-hero {
    padding: 100px 15px 60px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
  }
  
  .earnings-preview {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 15px;
  }
  
  .cta-primary, .cta-secondary, .cta-skip {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
  
  .success-stats {
    gap: 40px;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .steps-grid, .features-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .section-title {
    font-size: 2rem;
  }
}



/* Desktop Logo */
.biasharayako-logo {
  display: flex;
  justify-content: center;  /* katikati */
  align-items: center;
  padding: 10px 0;
}

.biasharayako-logo img {
  max-width: 220px;   /* ukubwa wa juu wa logo */
  height: auto;       /* hifadhi uwiano */
}
