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

:root {
  --primary-color: #1877f2;
  --primary-dark: #166fe5;
  --secondary-color: #36b9f0;
  --text-dark: #1c1e21;
  --text-medium: #65676b;
  --text-light: #8e9092;
  --bg-light: #f0f2f5;
  --white: #ffffff;
  --success: #42b72a;
  --danger: #fa383e;
  --warning: #faa026;
  --border-radius: 8px;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background-color: var(--white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
}

.navbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar-brand .brand-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.4px;
}

.navbar-menu {
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

.navbar-menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

.navbar-menu a:hover {
  color: var(--primary-color);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* User Navbar Badges & Buttons */
.user-nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.86rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-family: inherit;
  outline: none;
}

.nav-balance-btn {
  background: #e7f3ff;
  color: #1877f2;
  border-color: #cbe3fc;
}
.nav-balance-btn:hover {
  background: #d5e9fd;
}

.btn-deposit-nav {
  background: #42b72a;
  color: #fff;
  border-color: #3aa225;
}
.btn-deposit-nav:hover {
  background: #369c22;
}

.btn-dashboard-nav {
  background: #f0f2f5;
  color: #1c1e21;
  border-color: #dadce0;
}
.btn-dashboard-nav:hover {
  background: #e4e6eb;
  color: #1877f2;
}

.btn-logout-nav {
  background: #ffffff;
  color: #65676b;
  border-color: #dadce0;
  padding: 6px 9px;
}
.btn-logout-nav:hover {
  color: #fa383e;
  border-color: #fa383e;
  background: #fff5f5;
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: #f0f2f5;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-dark);
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.mobile-menu-toggle:hover {
  background: #e4e6eb;
  color: var(--primary-color);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

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

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

.btn-secondary {
  background-color: var(--text-dark);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: var(--text-medium);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

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

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-login {
  padding: 0.6rem 1.2rem;
}

.btn-google {
  background-color: #ffffff;
  color: var(--text-dark);
  border: 1px solid #dadce0;
}

.btn-google:hover {
  background-color: #f8f9fa;
}

.btn-login i, .btn-google i {
  margin-right: 0.5rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  padding: 5rem 0;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Section Styles */
section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.section-subtitle {
  text-align: center;
  color: var(--text-medium);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

/* Packages Section */
.packages {
  background-color: var(--bg-light);
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.package-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.package-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.package-card.featured {
  border: 2px solid var(--primary-color);
}

.package-badge {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.package-header {
  padding: 1.5rem;
  text-align: center;
  background-color: var(--bg-light);
}

.package-name {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.package-price {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
}

.package-body {
  padding: 1.5rem;
}

.package-features {
  list-style: none;
}

.package-features li {
  padding: 0.5rem 0;
  color: var(--text-medium);
}

.package-features li i {
  color: var(--success);
  margin-right: 0.5rem;
}

.package-footer {
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid #e1e4e8;
}

/* How It Works Section */
.how-it-works {
  background-color: var(--white);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.step-card {
  text-align: center;
  padding: 2rem;
  background-color: var(--white);
}

.step-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.step-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.step-description {
  color: var(--text-medium);
}

/* Why Choose Us Section */
.why-choose-us {
  background-color: var(--bg-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.feature-description {
  color: var(--text-medium);
}

/* FAQ Section */
.faq {
  background-color: var(--white);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid #e1e4e8;
  padding: 1.5rem 0;
}

.faq-question {
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.faq-question i {
  transition: var(--transition);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 1.5rem;
  color: var(--text-medium);
}

.faq-item.active .faq-answer {
  max-height: 200px;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

/* Contact Section */
.contact {
  background-color: var(--bg-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.contact-item h4 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.contact-item a {
  color: var(--primary-color);
  text-decoration: none;
}

.contact-form {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #dadce0;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1);
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-logo p {
  color: var(--text-light);
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-column h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 0.5rem;
}

.footer-column a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}

.footer-column a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #5f6368;
  color: var(--text-light);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--white);
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-content.modal-lg {
  max-width: 900px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e1e4e8;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

.close-btn {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
  padding: 0.25rem;
}

.close-btn:hover {
  color: var(--text-dark);
}

.modal-body {
  padding: 1.5rem;
}

/* Dashboard Modal */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e1e4e8;
}

.dashboard-balance h4 {
  margin: 0 0 0.25rem;
  color: var(--text-medium);
}

.balance-amount {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: var(--border-radius);
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
}

/* Dashboard Actions */
.dashboard-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Deposit Modal */
#depositMethod {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #dadce0;
  border-radius: var(--border-radius);
  font-size: 1rem;
}

/* ============================================
   Responsive Design — Mobile First
   ============================================ */

@media (max-width: 992px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-content {
    flex-direction: column;
    gap: 2rem;
  }
  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

/* --- Tablet & Mobile (≤768px) --- */
@media (max-width: 768px) {

  /* Navbar: show hamburger, hide desktop menu */
  .mobile-menu-toggle {
    display: flex;
  }

  .navbar-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    flex-direction: column;
    gap: 0;
    z-index: 999;
    padding: 8px 0;
    border-top: 1px solid #eee;
  }
  .navbar-menu.active {
    display: flex;
  }
  .navbar-menu a {
    padding: 12px 20px;
    font-size: 0.97rem;
    border-radius: 0;
    width: 100%;
    box-sizing: border-box;
  }
  .navbar-menu a:hover {
    background: #f0f4f8;
  }

  /* Nav buttons: hide text labels, show icons only */
  .nav-btn .btn-text {
    display: none;
  }
  .nav-btn {
    padding: 6px 9px;
    gap: 0;
  }
  .nav-btn.nav-balance-btn {
    gap: 4px;
    padding: 5px 8px;
  }
  .nav-btn.nav-balance-btn .currency-label {
    display: none;
  }
  /* Hide "Login with Google" text, show short label */
  .btn-login .login-text {
    display: none;
  }

  /* Hero */
  .hero-title {
    font-size: 2rem;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-buttons .btn {
    text-align: center;
  }
  .section-title {
    font-size: 2rem;
  }
  .packages-grid,
  .steps-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  /* Modals */
  .modal.active {
    align-items: flex-end;
  }
  .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 92vh;
  }
  .modal-content.modal-lg {
    max-width: 100% !important;
  }

  /* Dashboard Modal Tabs */
  .user-panel-tabs {
    padding: 0 0.75rem;
  }
  .user-nav-tab {
    font-size: 0.82rem !important;
    padding: 0.75rem 0.6rem !important;
    gap: 5px !important;
  }

  /* Table: horizontal scroll */
  .user-table-hint {
    display: flex !important;
  }
  .user-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: inset -4px 0 6px -4px rgba(0,0,0,0.1);
  }
  .user-data-table {
    min-width: 580px;
  }
  .user-data-table th, .user-data-table td {
    padding: 10px 10px;
    font-size: 0.82rem;
    white-space: nowrap;
  }
}

/* --- Small Mobile (≤576px) --- */
@media (max-width: 576px) {
  .container {
    padding: 0 14px;
  }
  .hero {
    padding: 2.5rem 0;
  }
  .section-title {
    font-size: 1.6rem;
  }
  .hero-title {
    font-size: 1.7rem;
  }
  .dashboard-actions {
    flex-direction: column;
  }
  .dashboard-actions .btn-lg {
    width: 100%;
  }

  /* Dashboard overview grid → single column */
  .dashboard-stats {
    grid-template-columns: 1fr 1fr;
  }

  /* Order/deposit tab header wraps */
  .tab-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Deposit form */
  .modal-body {
    padding: 1rem;
  }
  .modal-header {
    padding: 1rem 1.1rem;
  }

  /* Login modal */
  #loginModal .modal-content {
    border-radius: 20px 20px 0 0 !important;
  }
}

/* --- Extra Small (≤420px — Samsung Galaxy A55, etc.) --- */
@media (max-width: 420px) {
  .navbar-brand .brand-text {
    font-size: 1.2rem;
  }
  .balance-num {
    font-size: 0.82rem;
  }
  .nav-btn {
    padding: 5px 8px;
    font-size: 0.82rem;
  }
  .section-title {
    font-size: 1.45rem;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
  .packages-grid {
    gap: 1rem;
  }
  .package-card {
    padding: 1rem;
  }
}

/* User Dashboard Tabs & History Styling */
.user-panel-tabs {
  scrollbar-width: thin;
}
.user-nav-tab {
  transition: all 0.2s ease;
  outline: none;
}
.user-nav-tab:hover {
  color: var(--primary-color) !important;
  background: rgba(24, 119, 242, 0.05) !important;
}
.user-nav-tab.active {
  color: var(--primary-color) !important;
  border-bottom: 3px solid var(--primary-color) !important;
  background: #ffffff !important;
}

.history-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px;
}
.order-filter-btn, .deposit-filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #dcdfe6;
  background: #fff;
  color: #555;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.order-filter-btn:hover, .deposit-filter-btn:hover {
  border-color: #1877f2;
  color: #1877f2;
}
.order-filter-btn.active, .deposit-filter-btn.active {
  background: #1877f2;
  color: #fff;
  border-color: #1877f2;
}

/* User Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.2px;
}
.status-badge.status-pending {
  background-color: #fff8e1;
  color: #b78103;
  border: 1px solid #ffe082;
}
.status-badge.status-reviewing {
  background-color: #e3f2fd;
  color: #0d47a1;
  border: 1px solid #90caf9;
}
.status-badge.status-accepted {
  background-color: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}
.status-badge.status-running {
  background-color: #e0f7fa;
  color: #006064;
  border: 1px solid #80deea;
}
.status-badge.status-completed {
  background-color: #e8f8f0;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}
.status-badge.status-cancelled {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}
.status-badge.status-approved {
  background-color: #e8f8f0;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}
.status-badge.status-rejected {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

/* User Data Table */
.user-data-table th, .user-data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f6;
}
.user-data-table tr:hover td {
  background-color: #f8fafc;
}
.user-data-table tr:last-child td {
  border-bottom: none;
}

.empty-history-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #777;
}
.empty-history-state i {
  font-size: 3rem;
  color: #ccd2db;
  margin-bottom: 1rem;
}