/* ===== MODERN STREAMING THEME ===== */

/* Smooth scrolling and performance improvements */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  /* Netflix-inspired color palette */
  --bg-primary: #141414;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --bg-card: #1e293b;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #808080;
  --primary: #e50914;
  --primary-hover: #f40612;
  --secondary: #22c55e;
  --accent: #00d4ff;
  --border: #333333;
  --border-hover: #404040;
  --success: #46d369;
  --warning: #ffa500;
  --error: #e87c03;

  /* Modern gradients - Netflix dark theme compatible */
  --gradient-primary: linear-gradient(135deg, #e50914 0%, #b20710 100%);
  --gradient-secondary: linear-gradient(135deg, #00d4ff 0%, #090b0d 100%);
  --gradient-accent: linear-gradient(135deg, #46d369 0%, #1e293b 100%);
  --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #141414 100%);

  /* Shadows and effects */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(229, 9, 20, 0.3);

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 50px;

  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== AUTH STYLES ===== */
.auth-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-primary);
}

.auth-container {
  max-width: 450px;
  width: 100%;
}

.auth-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.auth-header h1 i {
  color: var(--primary);
  margin-right: 0.5rem;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.form-input {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
  color: var(--text-secondary);
}

.password-input {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: var(--text-primary);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.checkbox-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.forgot-password {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.forgot-password:hover {
  color: var(--accent);
}

.auth-submit {
  width: 100%;
  padding: 0.875rem;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-divider {
  position: relative;
  text-align: center;
  margin: 2rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-secondary);
  padding: 0 1rem;
}

.social-auth {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.social-btn:hover {
  background: var(--bg-card);
  border-color: var(--text-secondary);
  transform: translateY(-1px);
}

.social-btn.google {
  border-color: #4285f4;
  color: #4285f4;
}

.social-btn.google:hover {
  background: rgba(66, 133, 244, 0.1);
  border-color: #4285f4;
}

.social-btn.github {
  border-color: var(--text-secondary);
}

.social-btn.github:hover {
  background: rgba(255, 255, 255, 0.05);
}

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auth-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.auth-link:hover {
  color: var(--accent);
}

.form-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
}

.form-message.success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--secondary);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.form-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.terms-group {
  margin-top: 1rem;
}

.terms-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.terms-link {
  color: var(--primary);
  text-decoration: none;
}

.terms-link:hover {
  color: var(--accent);
}

/* Auth Responsive */
@media (max-width: 768px) {
  .auth-card {
    padding: 2rem 1.5rem;
  }

  .social-auth {
    flex-direction: column;
  }

  .form-options {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Product grid container now stacks category sections vertically */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: 100%;
  align-items: stretch;
}

.category-section {
  display: block;
  width: 100%;
}

.category-section + .category-section {
  margin-top: 1rem;
}

/* Products hero + search */
.products-hero {
  display: grid;
  gap: 1rem;
  padding: 1rem 0 1.25rem 0;
  align-items: center;
}

.hero-heading {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-icon-wrap {
  display: inline-flex;
  align-items: center;
}

.hero-title {
  font-size: 2.15rem;
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #ffd7e9 0%, #ffc7f2 20%, #ffe7fa 45%, #d7f7ff 70%, #c8ffe5 100%);
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: heroGlow 6s ease infinite;
  /* layered sharp shadows for 3D depth without blur */
  text-shadow:
    0.4px 0.4px 0 rgba(255, 214, 242, 0.8),
    1px 1px 2px rgba(255, 214, 242, 0.55),
    2px 2px 6px rgba(200, 255, 229, 0.45);
}

.hero-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(255, 158, 199, 0.45));
  animation: iconFloat 3.5s ease-in-out infinite;
}

.hero-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 0.65rem 0.9rem 0.65rem 2.8rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 8px 28px rgba(229, 9, 20, 0.28);
}

.search-icon {
  position: absolute;
  left: 0.95rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}

@keyframes heroGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

/* grid column settings moved to category-products */

/* Category sections should use the same grid layout as the main products grid */
/* The per-category grid controls the cards layout */
.category-products {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
}

@media (max-width: 991px) {
  .category-products { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
}

@media (max-width: 767px) {
  .category-products { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}

@media (max-width: 575px) {
  .category-products { grid-template-columns: repeat(2, 1fr); }
}

.category-heading {
  font-size: 1.9rem;
  font-weight: 900;
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #ff8a00 0%, #ff2d55 35%, #9b5bff 70%, #52e9ff 100%);
  background-size: 200% 200%;
  animation: categoryGradient 6s ease infinite;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 1px 0 rgba(0,0,0,0.35),
    0 2px 6px rgba(0,0,0,0.4),
    0 6px 18px rgba(82, 233, 255, 0.22);
}

.category-heading::before {
  content: "★";
  color: #ffd166;
  font-size: 1.1em;
  text-shadow: 0 2px 10px rgba(255, 209, 102, 0.55);
}

@keyframes categoryGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== CART STYLES ===== */
.cart-section {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

.cart-header {
  text-align: center;
  margin-bottom: 3rem;
}

.cart-header h1 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.cart-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.cart-content {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-summary-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 100px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.cart-item {
  background-color: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  display: flex;
  gap: 1.5rem;
  align-items: center;
  transition: all 0.3s ease;
}

.cart-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-item-image i {
  font-size: 2rem;
  color: var(--text-secondary);
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.cart-item-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.cart-item-price {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.quantity-input {
  width: 60px;
  text-align: center;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.cart-item-remove {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.cart-item-remove:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Remove/Delete Button Styling */
.remove-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.remove-btn:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.remove-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.remove-btn i {
  font-size: 1rem;
}

.cart-summary {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--border);
  height: fit-content;
}

.promo-section {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}

.promo-section h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.promo-input-group {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.promo-input-group input {
  flex: 1;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.promo-input-group .btn {
  padding: 0.75rem 1.5rem;
}

.promo-message {
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-top: 0.75rem;
  display: none;
}

.promo-message.success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--secondary);
  border: 1px solid rgba(34, 197, 94, 0.3);
  display: block;
}

.promo-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: block;
}

.cart-summary h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.summary-row.total {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}

.checkout-btn {
  width: 100%;
  padding: 1rem;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
  margin-top: 1.5rem;
}

.checkout-btn:hover {
  transform: translateY(-1px);
}

.empty-cart {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.empty-cart i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-cart h2 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-cart p {
  margin-bottom: 2rem;
}

.empty-cart .btn {
  display: inline-block;
}

/* Cart Responsive */
/* ===== PROFILE STYLES ===== */
.profile-section {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

.profile-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  background-color: var(--bg-card);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.profile-avatar {
  text-align: center;
}

.avatar-container {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  border: 3px solid var(--primary);
}

.avatar-initial {
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.change-avatar-btn {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.profile-info {
  text-align: center;
}

.profile-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.profile-email {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.profile-stats {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.stat-item {
  text-align: center;
}

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

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

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

.profile-menu {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.menu-item {
  padding: 0.75rem 1.5rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.menu-item:hover,
.menu-item.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.content-section {
  display: none;
}

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

.section-content {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--border);
}

.section-title {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.purchases-grid,
.recharges-grid {
  display: grid;
  gap: 1rem;
}

.purchase-item,
.recharge-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.purchase-info,
.recharge-info {
  flex: 1;
}

.purchase-info h4,
.recharge-info h4 {
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.purchase-date,
.recharge-date {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.recharge-method {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.purchase-amount,
.recharge-amount {
  text-align: right;
}

.purchase-amount .amount,
.recharge-amount .amount {
  font-weight: 600;
  color: var(--primary);
  font-size: 1.1rem;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.status-badge.active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--secondary);
}

.status-badge.pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent);
}

.empty-message {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

.empty-message i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Profile Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  border: 1px solid var(--border);
  /* allow tall content while keeping actions visible */
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  color: var(--text-primary);
  font-size: 1.5rem;
}

.modal-header h3 i,
.modal-header h2 i {
  margin-right: 0.6rem;
  color: var(--primary);
  font-size: 1.1rem;
  vertical-align: middle;
}

.modal-header h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  margin: 0;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--bg-card);
  border-color: var(--red);
  color: var(--red);
}

.modal-body {
  margin-bottom: 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.payment-method-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.payment-panel {
  margin-top: 1rem;
}

.amount-preview {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.amount-preview p {
  margin: 0;
}

.manual-info {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.manual-name {
  margin: 0 0 0.4rem 0;
  color: var(--text-primary);
  font-weight: 600;
}

.manual-qr {
  display: flex;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.manual-qr img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}

.manual-amount {
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
}

.manual-steps {
  margin: 0.5rem 0 0 1.25rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

.modal-actions .btn {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
}

/* Profile Responsive */
/* ===== ADMIN STYLES ===== */
.admin-section {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

.admin-header {
  text-align: center;
  margin-bottom: 3rem;
}

.admin-header h1 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.admin-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

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

.stat-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.3s ease;
}

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

.stat-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.stat-card h3 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.stat-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.admin-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.admin-tab {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
}

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

.admin-content {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid var(--border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.admin-table th,
.admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
}

.admin-table td {
  color: var(--text-secondary);
}

.admin-table tr:hover {
  background: var(--bg-tertiary);
}

.status-active {
  color: var(--secondary);
  font-weight: 500;
}

.status-inactive {
  color: var(--error);
  font-weight: 500;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
}

.admin-btn {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

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

.admin-btn.danger:hover {
  background: var(--error);
}

.admin-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.admin-pagination .btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Admin Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-container {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  border: 1px solid var(--border);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* Admin Responsive */
@media (max-width: 768px) {
  .admin-stats {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    flex-wrap: wrap;
  }

  .admin-table {
    font-size: 0.8rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-container {
    padding: 1rem;
  }
}

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

/* Prevent overflow on small screens */
img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Navigation */
.navbar {
  background-color: var(--bg-secondary);
  padding: 0.75rem 2rem;
  position: relative;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 6px var(--shadow);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.nav-logo:hover {
  transform: scale(1.05);
}

.logo-image {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--red);
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.3);
  transition: all 0.3s ease;
  background: white;
}

.logo-image:hover {
  box-shadow: 0 4px 20px rgba(229, 9, 20, 0.5);
  border-color: var(--accent);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.nav-link.active {
  background-color: var(--primary);
  color: white;
}

/* Coins Display */
.coins-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-card);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.coins-icon {
  color: var(--accent);
  font-size: 1.2rem;
}

.coins-amount {
  font-weight: bold;
  color: var(--text-primary);
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.5);
}

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

.btn-secondary:hover {
  background-color: #1ea847;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

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

.btn-accent:hover {
  background-color: #e5940b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

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

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px var(--shadow);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 12px var(--shadow);
}

/* Product Grid */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: 100%;
  align-items: stretch;
  margin-top: 2rem;
}

.product-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px var(--shadow);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: var(--bg-secondary);
}

.product-info {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.product-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex: 1;
}

/* Respect newline characters in product descriptions */
.product-description {
  white-space: pre-line;
}

.product-price {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.product-discount {
  color: var(--secondary);
  font-size: 0.9rem;
  text-decoration: line-through;
}

.product-stock {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Mobile: force two product cards per row and scale down elements */
@media (max-width: 767px) {
  .products-grid {
    /* Force exactly two columns on mobile */
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.9rem;
    margin-top: 1rem;
  }

  .product-card {
    border-radius: 8px;
    padding: 0;
  }

  .product-image {
    height: 130px;
  }

  .product-title {
    font-size: 0.98rem;
  }

  .product-description {
    font-size: 0.78rem;
    margin-bottom: 0.4rem;
  }

  .product-price {
    font-size: 0.98rem;
  }

  .product-info .btn {
    padding: 0.55rem;
    font-size: 0.88rem;
  }
}

/* Very small screens: slightly smaller images to keep layout compact */
@media (max-width: 360px) {
  .product-image { height: 110px; }
  .product-title { font-size: 0.9rem; }
  .product-description { font-size: 0.72rem; }
  .product-info .btn { font-size: 0.82rem; padding: 0.45rem; }
}

/* Improve mobile card proportions and force equal heights across rows */
.products-grid,
.category-products {
  /* make each grid row share available height so items can stretch uniformly */
  grid-auto-rows: 1fr;
  align-items: stretch;
}

.products-grid > .product-card,
.category-products > .product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Tighter image heights on small screens to avoid tall skinny cards */
@media (max-width: 767px) {
  .product-image { height: 100px; }
  .product-description { font-size: 0.75rem; }
  .products-grid { gap: 0.8rem; }
}

@media (max-width: 420px) {
  .product-image { height: 88px; }
  /* ensure columns don't become too narrow on very small devices */
  .products-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)) !important; }
}

/* Strong mobile override: force exactly 2 equal columns that fill the row */
@media (max-width: 767px) {
  .products-grid,
  .category-products {
    grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
    grid-auto-rows: auto;
    gap: 0.55rem;
    width: 100%;
    justify-content: stretch;
  }

  .products-grid > .product-card,
  .category-products > .product-card {
    height: 100%;
    box-sizing: border-box;
    max-width: 100%;
  }

  .product-image { height: 96px; }
  .product-description { font-size: 0.78rem; }

  .products-hero { gap: 0.75rem; }
  .hero-title-row { flex-wrap: nowrap; gap: 0.4rem; }
  .hero-title { font-size: 1.2rem; letter-spacing: 0.04em; line-height: 1.1; }
  .hero-icon { width: 40px; height: 40px; }
  .hero-subtitle { font-size: 0.95rem; }
  .search-bar { padding: 0.6rem 0.8rem 0.6rem 2.6rem; }
}

/* Reduce container padding on small screens so grid has more usable width */
@media (max-width: 767px) {
  .container { padding-left: 0.6rem; padding-right: 0.6rem; }
}

@media (max-width: 420px) {
  .container { padding-left: 0.4rem; padding-right: 0.4rem; }
  .products-grid { gap: 0.6rem; }
}



/* Carousel */
.carousel {
  position: relative;
  width: 100%;
  height: 400px;
  background-color: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.carousel-inner {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
}

.carousel-item {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.carousel-control:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel-control.prev {
  left: 1rem;
}

.carousel-control.next {
  right: 1rem;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 2000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  max-width: 300px;
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  background-color: var(--secondary);
}

.toast-error {
  background-color: #ef4444;
}

.toast-warning {
  background-color: var(--accent);
}

/* Loader */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.loader {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
  color: var(--text-secondary);
}

/* Cart */
.cart-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background-color: var(--bg-card);
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 1rem;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  color: var(--primary);
  font-weight: bold;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-btn {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 30px;
  height: 30px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    padding: 0.65rem 1rem;
  }
  
  /* Removed conflicting nav-container rules - handled in 767px media query below */
  
  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .container {
    padding: 1rem;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .carousel {
    height: 250px;
  }
  
  .toast {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .nav-menu {
    flex-direction: column;
    width: 100%;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }

.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

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

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-1 {
  gap: 1rem;
}

.gap-2 {
  gap: 2rem;
}

/* Additional styles for index.html */
.hero {
  background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
  padding: 4rem 0;
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.features {
  padding: 4rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

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

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-align: center;
}

.products {
  padding: 3rem 0 2rem 0;
}

.products-filter {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.about {
  padding: 4rem 0;
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat {
  text-align: center;
}

.stat h3 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat p {
  color: var(--text-secondary);
}

.about-image {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer {
  background-color: var(--bg-secondary);
  padding: 3rem 0 1rem;
  border-top: 1px solid var(--border);
}

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

.footer-section h3,
.footer-section h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-section p,
.footer-section ul {
  color: var(--text-secondary);
}

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

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

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  font-size: 1.5rem;
  text-decoration: none;
  transition: transform 0.3s ease;
}

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

.text-primary {
  color: var(--primary);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-stats {
    justify-content: center;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: center;
  }

  .footer-section {
    padding: 1.75rem 1rem;
    border-bottom: 1px solid var(--border);
  }

  .footer-section:last-child {
    border-bottom: none;
  }

  .footer-section h3,
  .footer-section h4 {
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
  }

  .footer-section ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
  }

  .footer-section ul li {
    margin-bottom: 0;
  }

  .social-links {
    justify-content: center;
  }
}

/* ===== ADMIN PASSWORD PROTECTION ===== */
.admin-password-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(26, 26, 26, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.admin-password-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 2rem;
}

.admin-password-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  border: 2px solid var(--border);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  max-width: 450px;
  width: 100%;
  animation: slideInDown 0.5s ease-out;
}

.admin-password-card.shake {
  animation: shake 0.5s ease-in-out;
}

.admin-password-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.admin-password-header i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
  display: block;
  text-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
}

.admin-password-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.admin-password-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.admin-password-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-password-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-password-form .form-group label {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.admin-password-form .form-input {
  padding: 0.85rem 1.2rem;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.admin-password-form .form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
  background: var(--bg-secondary);
}

.admin-password-form .form-input::placeholder {
  color: var(--text-muted);
}

.password-error {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #ef4444;
  font-size: 0.9rem;
  animation: slideDown 0.3s ease-out;
}

.password-error i {
  font-size: 1.1rem;
}

.admin-password-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.admin-password-actions .btn {
  flex: 1;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.admin-password-actions .btn-outline {
  color: var(--text-secondary);
  border-color: var(--border);
}

.admin-password-actions .btn-outline:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.admin-password-actions .btn-primary {
  background: var(--gradient-primary);
}

.admin-password-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.5);
}

/* Animations */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

/* Responsive */

/* ===== MOBILE FIRST - Extra Small Devices (Portrait phones, less than 576px) ===== */
@media (max-width: 575px) {
  /* Base typography */
  html {
    font-size: 14px; /* Scale down base font size */
  }

  /* Prevent iOS zoom on input focus */
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Container */
  .container {
    padding: 1rem;
  }

  /* Navbar */
  .navbar {
    padding: 0.6rem 0;
  }

  /* Removed nav-container column - keep horizontal for navbar */

  .nav-menu {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    width: 100%;
    text-align: center;
    border-radius: 8px;
    background: var(--bg-secondary);
  }

  .coins-display {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
  }

  /* Hero Section */
  .hero-section {
    padding: 3rem 0;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  /* Products Grid */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Cart */
  .cart-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cart-item {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .cart-item-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 0 auto;
  }

  .cart-item-info {
    width: 100%;
  }

  .cart-item-actions {
    width: 100%;
    margin-top: 1rem;
  }

  .remove-btn {
    width: 100%;
    justify-content: center;
  }

  /* Cart Summary */
  .cart-summary {
    padding: 1.5rem;
  }

  .checkout-btn {
    width: 100%;
  }

  /* Admin Panel */
  .admin-menu {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .menu-btn {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-card {
    padding: 1.25rem;
  }

  .admin-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }

  .admin-table {
    font-size: 0.85rem;
    min-width: 600px; /* Ensure table doesn't collapse */
  }

  .admin-table th,
  .admin-table td {
    padding: 0.5rem 0.25rem;
    white-space: nowrap;
  }

  .admin-table img {
    width: 40px;
    height: 40px;
  }

  /* Modal */
  .modal-content {
    width: 95%;
    margin: 1rem;
    padding: 1.5rem;
  }

  .modal-header h2 {
    font-size: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column;
  }

  .modal-actions button {
    width: 100%;
  }

  /* Profile */
  .profile-card {
    padding: 1.5rem;
  }

  .profile-header h1 {
    font-size: 1.75rem;
  }

  .coins-display-large {
    font-size: 2rem;
  }

  .profile-info p {
    font-size: 0.95rem;
  }

  /* Buttons */
  .btn {
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
  }

  /* Spacing adjustments */
  section {
    padding: 2rem 0;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  /* Admin Password Modal */
  .admin-password-card {
    padding: 2rem 1.5rem;
    width: 95%;
  }

  .admin-password-header i {
    font-size: 2.5rem;
  }

  .admin-password-header h2 {
    font-size: 1.5rem;
  }

  .admin-password-actions {
    flex-direction: column;
  }

  .admin-password-actions .btn {
    width: 100%;
  }
}

/* ===== Small Devices (Landscape phones, 576px and up) ===== */
@media (min-width: 576px) and (max-width: 767px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-menu {
    grid-template-columns: repeat(2, 1fr);
  }

  .cart-content {
    grid-template-columns: 1fr;
  }
}

/* ===== Medium Devices (Tablets, 768px and up) ===== */
@media (min-width: 768px) and (max-width: 991px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-menu {
    grid-template-columns: repeat(3, 1fr);
  }

  .cart-content {
    grid-template-columns: 1fr 350px;
  }

  .nav-menu {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* ===== Large Devices (Desktops, 992px and up) ===== */
@media (min-width: 992px) and (max-width: 1199px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .admin-menu {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ===== Extra Large Devices (Large desktops, 1200px and up) ===== */
@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .container {
    max-width: 1200px;
  }
}

/* ===== Landscape Orientation Fixes ===== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    padding: 2rem 0;
  }

  .modal-content {
    max-height: 90vh;
    overflow-y: auto;
  }

  .admin-password-modal {
    align-items: flex-start;
    padding-top: 2rem;
  }
}

/* ===== Touch Device Optimizations ===== */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch target sizes */
  .btn,
  .product-card,
  .menu-btn,
  .nav-link,
  button {
    min-height: 44px; /* Minimum touch target size (Apple's guideline) */
    min-width: 44px;
  }

  .quantity-btn {
    min-width: 44px;
    min-height: 44px;
    font-size: 1.25rem;
  }

  /* Remove hover effects on touch devices */
  .product-card:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }

  .remove-btn:hover {
    transform: none;
  }

  /* Improve tap highlighting */
  * {
    -webkit-tap-highlight-color: rgba(229, 9, 20, 0.2);
  }

  /* Disable double-tap zoom */
  button,
  a {
    touch-action: manipulation;
  }
}

/* ===== Print Styles ===== */
@media print {
  .navbar,
  .admin-menu,
  .modal,
  .btn {
    display: none !important;
  }

  .container {
    max-width: 100%;
  }

  body {
    background: white;
    color: black;
  }
}

/* ========================= */
/* === PROFILE PAGE STYLES === */
/* ========================= */

/* Nav Right Section */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

#loggedInNav {
  display: flex;
}

#loggedOutNav {
  display: flex;
}

.nav-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.2);
}

/* User Menu Button */
.user-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  font-size: 1.5rem;
  position: relative;
}

.user-menu-btn:hover {
  background: var(--red);
  border-color: var(--red);
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.user-menu-btn.active {
  background: var(--red);
  border-color: var(--red);
  transform: scale(1.05);
}

/* Dropdown Menu */
.user-dropdown {
  position: absolute;
  top: 70px;
  right: 20px;
  width: 280px;
  background: linear-gradient(180deg, #232323 0%, #0f0f0f 100%);
  border-radius: 15px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(229, 9, 20, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 1000;
  overflow: hidden;
}

.user-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 35px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #232323;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.15), rgba(229, 9, 20, 0.05));
  border-bottom: 1px solid rgba(229, 9, 20, 0.2);
}

.user-avatar {
  font-size: 2.5rem;
  color: var(--red);
  filter: drop-shadow(0 2px 8px rgba(229, 9, 20, 0.4));
}

.user-info-dropdown {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.greeting {
  font-size: 0.813rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.username {
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.02em;
}

.dropdown-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin: 0.25rem 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.938rem 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  font-size: 0.938rem;
  font-weight: 500;
}

.dropdown-item:hover {
  background: rgba(229, 9, 20, 0.08);
  color: white;
  border-left-color: var(--red);
  padding-left: 1.75rem;
}

.dropdown-item i {
  width: 20px;
  font-size: 1.125rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.dropdown-item:hover i {
  color: var(--red);
}

.logout-item {
  background: linear-gradient(90deg, rgba(229, 9, 20, 0.25), rgba(229, 9, 20, 0.15));
  color: var(--red);
  font-weight: 700;
  margin-top: 0.25rem;
  border-left: 3px solid var(--red);
}

.logout-item:hover {
  background: linear-gradient(90deg, var(--red), #c41017);
  color: white;
  border-left-color: white;
}

.logout-item i {
  color: var(--red);
}

.logout-item:hover i {
  color: white;
}

/* Desktop Menu */
.desktop-menu {
  display: none; /* Hidden as menu is now in dropdown */
}

/* Profile Section */
.profile-section {
  min-height: calc(100vh - 80px);
  padding: 2rem 0;
  background: var(--dark);
}

.profile-header {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.1), rgba(0, 0, 0, 0.3));
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.profile-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.avatar-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), #d81f26);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: bold;
  color: white;
  box-shadow: 0 8px 20px rgba(229, 9, 20, 0.4);
  transition: transform 0.3s ease;
}

.avatar-circle:hover {
  transform: scale(1.05);
}

.profile-info h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: white;
}

.profile-info p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.profile-stats {
  display: flex;
  gap: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Profile Content */
.profile-content {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.profile-menu {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 1rem;
  height: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 100px;
}

.menu-item {
  width: 100%;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.menu-item i {
  font-size: 1.125rem;
  width: 20px;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.menu-item.active {
  background: linear-gradient(90deg, var(--red), #d81f26);
  color: white;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.profile-content-main {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.content-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.content-section h2 i {
  color: var(--red);
}

/* Purchases List */
.purchases-list,
.recharges-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.purchase-item,
.recharge-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.purchase-item:hover,
.recharge-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--red);
  transform: translateX(5px);
}

.purchase-info h4,
.recharge-info h4 {
  color: white;
  margin-bottom: 0.5rem;
}

.purchase-date,
.recharge-date,
.recharge-method {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.purchase-amount,
.recharge-amount {
  text-align: right;
}

.amount {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.status-badge.active {
  background: rgba(0, 255, 0, 0.2);
  color: #00ff00;
  border: 1px solid rgba(0, 255, 0, 0.3);
}

.status-badge.pending {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Settings */
.settings-grid {
  display: grid;
  gap: 2rem;
}

.setting-group {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
}

.setting-group h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notification-settings {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.checkbox-label:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--red);
}

/* Recharge Modal */
#rechargeModal {
  align-items: flex-start;
  overflow-y: auto;
  padding: 1rem 0;
}

#rechargeModal .modal-content {
  max-height: 90vh;
  overflow-y: auto;
}

.recharge-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.recharge-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.recharge-btn:hover {
  border-color: var(--red);
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.2), rgba(229, 9, 20, 0.1));
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(229, 9, 20, 0.3);
}

.recharge-btn .coins-amount {
  font-size: 2rem;
  font-weight: bold;
  color: var(--red);
}

.recharge-btn .coins-price {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Custom Recharge Amount */
.recharge-custom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.divider-text {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.custom-input-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-wrapper label {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.input-with-icon {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 1rem;
  transition: all 0.3s ease;
}

.input-with-icon:focus-within {
  border-color: var(--red);
  background: rgba(229, 9, 20, 0.05);
}

.currency-prefix {
  color: var(--red);
  font-weight: 600;
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

#customAmount {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 0.75rem 0;
  font-size: 1rem;
  outline: none;
}

#customAmount::placeholder {
  color: var(--text-muted);
}

#customAmount::-webkit-outer-spin-button,
#customAmount::-webkit-inner-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

#customAmount[type=number] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.input-wrapper small {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: -0.25rem;
}

.loading-placeholder {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.empty-message {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablets and below (991px) */
@media (max-width: 991px) {
  .profile-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-avatar {
    margin: 0 auto;
  }

  .profile-info {
    text-align: center;
  }

  .profile-stats {
    justify-content: center;
  }

  .profile-actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .profile-content {
    grid-template-columns: 1fr;
  }

  .profile-menu {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .menu-item {
    margin-bottom: 0;
  }
}

/* Mobile devices (767px) */
@media (max-width: 767px) {
  .navbar {
    padding: 0.5rem 1rem;
  }

  .nav-container {
    gap: 0;
    flex-direction: row !important;
  }

  /* Logo size for mobile */
  .nav-logo {
    flex-shrink: 0;
  }

  .logo-image {
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--red);
  }

  /* Hide desktop menu on mobile */
  .desktop-menu {
    display: none !important;
  }

  /* Keep nav-right visible with better spacing */
  .nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
  }

  #loggedInNav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  #loggedOutNav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  #loggedOutNav .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  .coins-display {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .coins-display i {
    font-size: 1rem;
  }

  .nav-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
  }

  .user-menu-btn {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
    flex-shrink: 0;
  }

  /* Adjust dropdown position for mobile */
  .user-dropdown {
    right: 0.5rem;
    top: 60px;
    width: calc(100vw - 1rem);
    max-width: 300px;
  }

  .user-dropdown::before {
    right: 27px;
  }

  /* Profile Section Mobile */
  .profile-section {
    padding: 1rem 0;
  }

  .profile-header {
    padding: 1.5rem;
    gap: 1rem;
  }

  .avatar-circle {
    width: 90px;
    height: 90px;
    font-size: 2rem;
  }

  .profile-info h1 {
    font-size: 1.5rem;
  }

  .profile-stats {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .stat-item {
    padding: 0.75rem 1rem;
    min-width: calc(50% - 0.5rem);
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .profile-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .profile-actions .btn {
    width: 100%;
  }

  .profile-content-main {
    padding: 1.5rem;
  }

  .profile-menu {
    grid-template-columns: 1fr;
    padding: 0.75rem;
  }

  .menu-item {
    padding: 0.875rem 1rem;
    font-size: 0.938rem;
  }

  .content-section h2 {
    font-size: 1.5rem;
  }

  .purchase-item,
  .recharge-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
  }

  .purchase-amount,
  .recharge-amount {
    text-align: left;
    width: 100%;
  }

  .amount {
    font-size: 1.25rem;
  }

  .settings-grid {
    gap: 1rem;
  }

  .setting-group {
    padding: 1.25rem;
  }

  .recharge-options {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
    max-width: none;
    margin: 1rem;
  }

  /* Custom recharge responsive */
  .recharge-custom {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }

  .input-with-icon {
    padding: 0 0.75rem;
  }

  .currency-prefix {
    font-size: 1rem;
    margin-right: 0.25rem;
  }

  #customAmount {
    padding: 0.65rem 0;
    font-size: 1rem;
  }
}

/* Small mobile (575px) */
@media (max-width: 575px) {
  .nav-menu {
    width: 100%;
  }

  .profile-stats {
    flex-direction: column;
    width: 100%;
  }

  .stat-item {
    width: 100%;
    min-width: 100%;
  }

  .avatar-circle {
    width: 75px;
    height: 75px;
    font-size: 1.75rem;
  }

  .profile-info h1 {
    font-size: 1.25rem;
  }

  .profile-content-main {
    padding: 1rem;
  }

  .btn {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
  }
}
