/* ================================
   🌍 Global & Theme
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', 'Segoe UI', 'Open Sans', Arial, sans-serif;
  background: #0F172A;
  color: #F1F5F9;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

body.light {
  background: #FFFFFF;
  color: #1E293B;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* ✅ ADD THIS */
  width: 100%;
  padding: 0 20px;
  margin: 0 auto; /* ✅ ADD THIS */
}

/* Form Controls */
input, textarea, select {
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0F172A;
  color: #F1F5F9;
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

body.light input,
body.light textarea,
body.light select {
  background: #FFFFFF;
  color: #1E293B;
  border: 1px solid #CBD5E1;
}

body.light input:focus,
body.light textarea:focus,
body.light select:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ================================
   🧭 Header
================================ */
header {
  width: 100%;
  padding: 20px;
  background: #0F172A;
  border-bottom: 1px solid #1E293B;
  transition: background 0.3s ease, border-color 0.3s ease;
}

body.light header {
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
}

.header-bar {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  height: 60px;
}

.header-left {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 15px; /* space between Docs and News */
}


.site-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 50%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  white-space: nowrap;
  z-index: 5;
}

.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  position: relative;
  z-index: 10;
}

.docs-btn, .profile-btn, .theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.docs-btn:hover, .profile-btn:hover, .theme-toggle:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.icon-btn {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease, transform 0.2s ease;
}

body.light .icon-btn {
  filter: brightness(0);
}

/* ================================
   💳 Swap Card
================================ */
.swap-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 40px auto;
  flex: 1;
}

.swap-card {
  background: #1E293B;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid #334155;
  transition: all 0.3s ease;
  margin: 0 auto; /* ✅ ADD THIS */
}

.swap-card:hover {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
  border-color: #475569;
}

body.light .swap-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
}

body.light .swap-card:hover {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
}

.swap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.swap-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.settings-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #94A3B8;
  transition: transform 0.2s ease, color 0.2s ease;
}

.settings-btn:hover {
  transform: rotate(20deg);
  color: #3B82F6;
}

/* Input Groups */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #CBD5E1;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.light .input-group label {
  color: #64748B;
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-row input {
  flex: 1;
  min-height: 44px;
}

.currency-select {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0F172A;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 0 12px;
  height: 44px;
  min-width: 140px;
}

body.light .currency-select {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
}

.flag-icon {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

.currency-select select {
  border: none;
  background: transparent;
  color: #F1F5F9;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0 6px;
  flex: 1;
  height: 100%;
  font-family: inherit;
}

body.light .currency-select select {
  color: #1E293B;
}

/* ✅ CRITICAL: Style the SELECT options dropdown itself */
.currency-select select option {
  background: #1E293B;
  color: #F1F5F9;
  padding: 10px;
  font-size: 0.95rem;
}

body.light .currency-select select option {
  background: #FFFFFF;
  color: #1E293B;
}

/* ✅ For Firefox */
.currency-select select option:checked {
  background: #3B82F6;
  color: #FFFFFF;
}

body.light .currency-select select option:checked {
  background: #2563EB;
  color: #FFFFFF;
}

/* ✅ For Chrome/Edge - option styling */
.currency-select select option:hover {
  background: #334155;
}

body.light .currency-select select option:hover {
  background: #E2E8F0;
}

.swap-btn {
  margin: 20px auto;
  display: block;
  background: none;
  border: none;
  color: #3B82F6;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.swap-btn:hover {
  color: #2563EB;
  transform: scale(1.2) rotate(180deg);
}

.rate-info {
  font-size: 0.875rem;
  color: #94A3B8;
  text-align: center;
  margin: 16px 0;
  min-height: 20px;
}

body.light .rate-info {
  color: #64748B;
}

.confirm-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  color: white;
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 16px;
}

.confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.confirm-btn:active {
  transform: translateY(0);
}

#message {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
  min-height: 20px;
}

#message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #FCA5A5;
}

#message.success {
  background: rgba(34, 197, 94, 0.1);
  color: #86EFAC;
}

/* ================================
   📊 History Section
================================ */
#history-section {
  width: 100%;
  max-width: 800px;
  margin: 40px auto; /* ✅ CHANGE FROM "40px 0" TO "40px auto" */
  background: #1E293B;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid #334155;
}

body.light #history-section {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
}

#history-section h3 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 1.3rem;
  font-weight: 600;
}

#history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

#history-table th {
  background: #0F172A;
  padding: 14px;
  text-align: left;
  font-weight: 600;
  color: #CBD5E1;
  border-bottom: 2px solid #334155;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

body.light #history-table th {
  background: #F8FAFC;
  color: #475569;
  border-bottom: 2px solid #E2E8F0;
}

#history-table td {
  padding: 14px;
  border-bottom: 1px solid #334155;
  color: #CBD5E1;
}

body.light #history-table td {
  border-bottom: 1px solid #E2E8F0;
  color: #1E293B;
}

#history-table tbody tr {
  transition: background-color 0.2s ease;
}

#history-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.1);
}

body.light #history-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.05);
}

#history-table tbody tr:last-child td {
  border-bottom: none;
}

/* ================================
   🌙 Splash Screen
================================ */
#splash-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splash-logo {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 50%, #3B82F6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.loader {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top: 4px solid #3B82F6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

/* ================================
   🔐 Auth Containers
================================ */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 70vh;
  padding: 20px;
  margin: 0 auto; /* ✅ ADD THIS */
}

.auth-card {
  background: #1E293B;
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 16px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid #334155;
  animation: fadeInAuth 0.4s ease;
  margin: 0 auto; /* ✅ ADD THIS */
}

body.light .auth-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
}

.auth-tabs {
  display: flex;
  justify-content: space-around;
  margin-bottom: 24px;
  border-bottom: 2px solid #334155;
}

body.light .auth-tabs {
  border-bottom: 2px solid #E2E8F0;
}

.auth-tab {
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
  color: #94A3B8;
  font-size: 0.95rem;
  flex: 1;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 3px solid transparent;
}

.auth-tab.active {
  color: #3B82F6;
  border-bottom: 3px solid #3B82F6;
}

body.light .auth-tab {
  color: #64748B;
}

body.light .auth-tab.active {
  color: #2563EB;
  border-bottom: 3px solid #2563EB;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form input {
  width: 100%;
  padding: 12px;
  min-height: 44px;
}

.auth-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: #FFF;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.form-msg {
  font-size: 0.8rem;
  margin-top: 4px;
  transition: color 0.3s ease;
  text-align: left;
}

.form-msg.error { color: #FCA5A5; }
.form-msg.success { color: #86EFAC; }
.password-weak { color: #FCA5A5; }
.password-medium { color: #FBBF24; }
.password-strong { color: #86EFAC; }

@keyframes fadeInAuth {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================
   👤 Profile Dashboard
================================ */
.profile-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 70vh;
  padding: 40px 20px;
  margin: 0 auto; /* ✅ ADD THIS */
}

.profile-card {
  background: #1E293B;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid #334155;
  margin: 0 auto; /* ✅ ADD THIS */
}

body.light .profile-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #334155;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #94A3B8;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border: 2px solid #3B82F6;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#changeAvatarBtn {
  display: block;
  margin: 0 auto 24px;
  background: #3B82F6;
  color: #FFF;
  padding: 10px 16px;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

#changeAvatarBtn:hover {
  background: #2563EB;
  transform: translateY(-2px);
}

.profile-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 24px 0;
  padding: 16px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 12px;
  border: 1px solid #334155;
  width: 100%;
  box-sizing: border-box;
}

body.light .profile-stats {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}

.stat {
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.stat:last-child {
  border-bottom: none;
}

body.light .stat {
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.stat-value {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  color: #3B82F6;
  min-width: 60px;
}

body.light .stat-value {
  color: #2563EB;
}

.stat-label {
  font-size: 0.8rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex: 1;
  text-align: right;
}

body.light .stat-label {
  color: #64748B;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .profile-stats {
    gap: 6px;
    padding: 12px;
  }
  
  .stat {
    padding: 6px 0;
  }
  
  .stat-value {
    font-size: 0.9rem;
    min-width: 50px;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .profile-stats {
    gap: 5px;
    padding: 10px;
  }
  
  .stat {
    padding: 5px 0;
  }
  
  .stat-value {
    font-size: 0.85rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
}

.xp-bar {
  position: relative;
  width: 100%;
  height: 12px;
  background: #334155;
  border-radius: 10px;
  overflow: hidden;
  margin: 16px 0 24px;
  border: 1px solid #475569;
}

body.light .xp-bar {
  background: #E2E8F0;
  border: 1px solid #CBD5E1;
}

.xp-progress {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6 0%, #06B6D4 100%);
  width: 0%;
  transition: width 0.4s ease;
}

.xp-progress.gain {
  box-shadow: 0 0 12px #3B82F6;
}

.level-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  background: #3B82F6;
  color: #FFF;
  font-weight: 700;
  font-size: 0.9rem;
}

.level-badge.level-up {
  animation: pulse 1.5s ease;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.tasks-btn {
  display: block;
  width: 100%;
  margin: 24px 0;
  padding: 12px;
  border-radius: 10px;
  background: #3B82F6;
  color: #FFF;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tasks-btn:hover {
  background: #2563EB;
  transform: translateY(-2px);
}

.profile-info {
  margin-top: 24px;
}

.profile-info label {
  display: block;
  font-weight: 600;
  margin: 16px 0 8px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #CBD5E1;
}

body.light .profile-info label {
  color: #475569;
}

.profile-info input,
.profile-info textarea {
  width: 100%;
  margin-bottom: 16px;
}

.profile-info textarea {
  min-height: 80px;
  resize: vertical;
}

.social-links {
  margin-top: 24px;
}

.social-links h3 {
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 600;
}

.social-field {
  margin-bottom: 16px;
}

.social-field label {
  display: block;
  margin-bottom: 8px;
}

.social-links-view a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.1);
  color: #3B82F6;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.social-links-view a:hover {
  background: rgba(59, 130, 246, 0.2);
  transform: translateY(-2px);
}

.accent-picker {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 10px;
}

body.light .accent-picker {
  background: #F8FAFC;
}

.accent-picker label {
  font-weight: 600;
  color: #CBD5E1;
  margin: 0;
}

body.light .accent-picker label {
  color: #475569;
}

#accentColor {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

#saveProfile {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: #FFF;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#saveProfile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.logout-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #EF4444;
  color: #FFF;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.logout-btn:hover {
  background: #DC2626;
  transform: translateY(-2px);
}

/* ================================
   📋 Modal
================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card {
  background: #1E293B;
  padding: 32px;
  border-radius: 16px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid #334155;
  animation: fadeInModal 0.3s ease;
}

body.light .modal-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
}

.modal-card h2 {
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.tasks-list {
  list-style: none;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tasks-list li {
  background: #0F172A;
  border: 1px solid #334155;
  padding: 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

body.light .tasks-list li {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}

.tasks-list li.completed {
  opacity: 0.6;
  text-decoration: line-through;
  color: #86EFAC;
}

.close-btn {
  display: block;
  margin: 0 auto;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: #475569;
  color: #FFF;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.close-btn:hover {
  background: #64748B;
  transform: translateY(-2px);
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ================================
   🔐 Auth Modal
================================ */
.auth-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  z-index: 2001;
  justify-content: center;
  align-items: center;
}

.auth-modal-card {
  background: #1E293B;
  padding: 32px;
  border-radius: 16px;
  width: 95%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid #334155;
  animation: fadeInModal 0.3s ease;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-modal-content {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;  /* Smooth scroll on iOS */
}

.auth-modal-buttons-fixed {
  padding: 20px 32px;
  background: #1E293B;
  border-top: 1px solid #334155;
  display: flex;
  gap: 10px;
  flex-shrink: 0;  /* Don't shrink */
  position: sticky;
  bottom: 0;
}

body.light .auth-modal-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
}

.auth-modal-card h3 {
  margin-bottom: 16px;
  font-size: 1.3rem;
  font-weight: 600;
}

.auth-modal-card p {
  margin-bottom: 20px;
  color: #CBD5E1;
  font-size: 0.9rem;
}

body.light .auth-modal-card p {
  color: #64748B;
}

.auth-modal-card input {
  width: 100%;
  margin-bottom: 14px;
  min-height: 44px;
}

.auth-modal-card .auth-btn {
  width: 100%;
  margin-bottom: 12px;
}

.auth-modal-card a {
  color: #3B82F6;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-modal-card a:hover {
  color: #2563EB;
  text-decoration: underline;
}

/* ✅ Improve scrollbar styling */
.auth-modal-content::-webkit-scrollbar {
  width: 6px;
}

.auth-modal-content::-webkit-scrollbar-track {
  background: rgba(59, 130, 246, 0.1);
}

.auth-modal-content::-webkit-scrollbar-thumb {
  background: #3B82F6;
  border-radius: 3px;
}

.auth-modal-content::-webkit-scrollbar-thumb:hover {
  background: #2563EB;
}

body.light .auth-modal-content::-webkit-scrollbar-track {
  background: rgba(37, 99, 235, 0.1);
}

/* ================================
   💳 PAYMENT METHOD SELECTION CARDS
================================ */

.payment-method-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.payment-method-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #3B82F6;
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.payment-method-card:hover::before {
  transform: scaleY(1);
}

body.light .payment-method-card::before {
  background: #2563EB;
}

.payment-method-card:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

body.light .payment-method-card:hover {
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}

.payment-method-card:active {
  transform: translateX(4px) scale(0.98);
}

/* Payment Method Card Content */
.payment-method-card img {
  transition: transform 0.3s ease;
}

.payment-method-card:hover img {
  transform: scale(1.1);
}

.payment-method-card h4 {
  transition: color 0.2s ease;
}

.payment-method-card:hover h4 {
  color: #3B82F6;
}

body.light .payment-method-card:hover h4 {
  color: #2563EB;
}

/* ================================
   📱 PAYMENT MODAL RESPONSIVE
================================ */

/* Tablets (768px - 1023px) */
@media (max-width: 1023px) {
  .payment-method-card {
    padding: 18px;
    gap: 16px;
  }

  .payment-method-card img {
    width: 44px !important;
    height: 44px !important;
  }

  .payment-method-card h4 {
    font-size: 1.05rem !important;
  }

  .payment-method-card p {
    font-size: 0.8rem !important;
  }
}

/* Large Phones (481px - 767px) */
@media (max-width: 767px) {
  .auth-modal-card {
    padding: 24px;
    max-width: 90%;
  }

  .payment-method-card {
    padding: 16px;
    gap: 14px;
  }

  .payment-method-card img {
    width: 40px !important;
    height: 40px !important;
  }

  .payment-method-card h4 {
    font-size: 1rem !important;
    margin-bottom: 6px !important;
  }

  .payment-method-card p {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
  }

  .payment-method-card > div:last-child {
    font-size: 1.3rem !important;
  }
}

/* Medium Phones (375px - 480px) */
@media (max-width: 480px) {
  .auth-modal-card {
    padding: 20px;
    border-radius: 14px;
  }

  .auth-modal-card h3 {
    font-size: 1.1rem !important;
    margin-bottom: 10px !important;
  }

  .auth-modal-card > p {
    font-size: 0.85rem !important;
    margin-bottom: 20px !important;
  }

  .payment-method-card {
    padding: 14px;
    gap: 12px;
    border-radius: 10px;
  }

  .payment-method-card img {
    width: 36px !important;
    height: 36px !important;
  }

  .payment-method-card h4 {
    font-size: 0.95rem !important;
    margin-bottom: 4px !important;
  }

  .payment-method-card p {
    font-size: 0.75rem !important;
    line-height: 1.3 !important;
  }

  .payment-method-card > div:last-child {
    font-size: 1.2rem !important;
  }

  .payment-method-card:hover {
    transform: translateX(2px);
  }
}

/* Small Phones (320px - 374px) */
@media (max-width: 374px) {
  .auth-modal-card {
    padding: 16px;
    max-width: 95%;
  }

  .auth-modal-card h3 {
    font-size: 1rem !important;
  }

  .auth-modal-card > p {
    font-size: 0.8rem !important;
    margin-bottom: 16px !important;
  }

  .payment-method-card {
    padding: 12px;
    gap: 10px;
    flex-direction: column;
    text-align: center;
  }

  .payment-method-card img {
    width: 40px !important;
    height: 40px !important;
    margin: 0 auto;
  }

  .payment-method-card h4 {
    font-size: 0.9rem !important;
  }

  .payment-method-card p {
    font-size: 0.7rem !important;
  }

  .payment-method-card > div:last-child {
    display: none;
  }

  .auth-modal-card .auth-btn {
    padding: 10px !important;
    font-size: 0.85rem !important;
  }
}

/* Very Small Phones (< 320px) */
@media (max-width: 319px) {
  .payment-method-card {
    padding: 10px;
  }

  .payment-method-card h4 {
    font-size: 0.85rem !important;
  }

  .payment-method-card p {
    font-size: 0.65rem !important;
  }
}

/* ================================
   🔗 Footer
================================ */
footer {
  width: 100%;
  margin-top: auto;
  background: #0F172A;
  border-top: 1px solid #1E293B;
  padding: 32px 20px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

body.light footer {
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.footer-left, .footer-right, .footer-center {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: #CBD5E1;
  white-space: nowrap;
}

body.light .footer-left,
body.light .footer-right,
body.light .footer-center {
  color: #64748B;
}

.footer-left {
  justify-content: flex-start;
}

.footer-center {
  justify-content: center;
  text-align: center;
  font-weight: 500;
}

.footer-right {
  justify-content: flex-end;
}

.footer-left a, .footer-right a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-left a:hover, .footer-right a:hover {
  color: #3B82F6;
}

body.light .footer-left a:hover, 
body.light .footer-right a:hover {
  color: #2563EB;
}

.footer-badge {
  height: 24px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

body.light .footer-badge {
  filter: brightness(0);
}

.footer-logo {
  height: 22px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

body.light .footer-logo {
  filter: brightness(0);
}

/* ================================
   📱 RESPONSIVE DESIGN
================================ */

/* Large Screens (1200px+) */
@media (min-width: 1200px) {
  .header-bar {
    max-width: 1400px;
  }
  
  main {
    padding: 0 40px;
  }
}

/* Tablets & Medium Screens (768px - 1199px) */
@media (max-width: 1199px) {
  .site-title {
    font-size: 1.8rem;
  }
  
  .swap-card {
    padding: 28px;
    max-width: 380px;
  }
  
  .profile-card {
    max-width: 420px;
    padding: 32px;
  }
  
  #history-section {
    padding: 24px;
  }
  
  .footer-container {
    gap: 24px;
  }
}

@media (max-width: 1024px) {
  .site-title {
    font-size: 1.5rem;
  }
  
  .header-bar {
    padding: 0 20px;
  }
  
  main {
    padding: 0 20px;
  }
  
  .swap-card {
    max-width: 95%;
    padding: 24px;
  }
  
  .profile-card {
    max-width: 90%;
    padding: 28px;
  }
  
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  #history-section {
    max-width: 95%;
    padding: 20px;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: center;
  }
  
  .footer-left, .footer-right, .footer-center {
    justify-content: center;
  }
}

/* Tablets (768px - 1023px) */
@media (max-width: 1023px) {
  header {
    padding: 16px 20px;
  }
  
  .header-bar {
    height: 56px;
  }
  
  .site-title {
    font-size: 1.4rem;
  }
  
  .swap-container {
    margin: 30px 0;
  }
  
  .swap-card {
    padding: 24px;
    max-width: 100%;
  }
  
  .auth-card {
    padding: 32px 24px;
    max-width: 100%;
  }
  
  .profile-avatar {
    width: 100px;
    height: 100px;
  }
  
  #history-section {
    margin: 30px 0;
  }
  
  #history-table {
    font-size: 0.9rem;
  }
  
  #history-table th,
  #history-table td {
    padding: 12px;
  }
}

/* Large Phones (481px - 767px) */
@media (max-width: 767px) {
  header {
    padding: 14px 16px;
  }
  
  .header-bar {
    height: 52px;
  }
  
  .site-title {
    font-size: 1.3rem;
    white-space: normal;
  }
  
  .header-actions {
    gap: 12px;
  }
  
  .icon-btn {
    width: 22px;
    height: 22px;
  }
  
  main {
    padding: 0 16px;
  }
  
  .swap-container {
    margin: 24px 0;
  }
  
  .swap-card {
    padding: 20px;
    max-width: 100%;
  }
  
  .swap-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }
  
  .input-group label {
    font-size: 0.8rem;
  }
  
  .input-row {
    gap: 8px;
  }
  
  .input-row input,
  .currency-select {
    min-height: 42px;
  }
  
  .swap-btn {
    font-size: 1.8rem;
    margin: 16px auto;
  }
  
  .confirm-btn {
    padding: 12px;
    font-size: 0.95rem;
  }
  
  .rate-info {
    font-size: 0.8rem;
  }
  
  .auth-container {
    min-height: 60vh;
    padding: 20px;
  }
  
  .auth-card {
    padding: 24px;
    max-width: 100%;
  }
  
  .auth-tab {
    padding: 10px 0;
    font-size: 0.85rem;
  }
  
  .profile-container {
    min-height: 60vh;
    padding: 30px 16px;
  }
  
  .profile-card {
    padding: 24px;
    max-width: 100%;
  }
  
  .profile-avatar {
    width: 90px;
    height: 90px;
    font-size: 2rem;
  }
  
  #changeAvatarBtn {
    margin-bottom: 16px;
  }
  
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
    padding: 14px;
    gap: 10px;
  }
  
  .stat-value {
    font-size: 1.1rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  .xp-bar {
    height: 10px;
    margin: 12px 0 16px;
  }
  
  .tasks-btn {
    padding: 11px;
    font-size: 0.85rem;
  }
  
  .profile-info label {
    font-size: 0.85rem;
    margin: 12px 0 6px;
  }
  
  .profile-info input,
  .profile-info textarea,
  .social-field input {
    font-size: 1rem;
  }
  
  .accent-picker {
    padding: 12px;
    gap: 12px;
  }
  
  .profile-actions {
    gap: 10px;
  }
  
  #history-section {
    max-width: 100%;
    padding: 16px;
    margin: 24px 0;
  }
  
  #history-section h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
  }
  
  #history-table {
    font-size: 0.85rem;
  }
  
  #history-table th,
  #history-table td {
    padding: 10px;
  }
  
  .modal-card {
    max-width: 90%;
    padding: 24px;
  }
  
  .modal-card h2 {
    font-size: 1.2rem;
  }
  
  .tasks-list li {
    padding: 12px;
    font-size: 0.9rem;
  }
  
  .auth-modal-card {
    max-width: 90%;
    padding: 24px;
  }
  
  .auth-modal-card h3 {
    font-size: 1.2rem;
  }
  
  footer {
    padding: 24px 16px;
  }
  
  .footer-container {
    gap: 12px;
  }
  
  .footer-left, .footer-right, .footer-center {
    font-size: 0.85rem;
    gap: 8px;
  }
  
  .footer-badge,
  .footer-logo {
    height: 20px;
  }
}

/* Medium Phones (375px - 480px) */
@media (max-width: 480px) {
  body {
    padding: 0;
  }
  
  header {
    padding: 12px 12px;
  }
  
  .header-bar {
    height: 48px;
    padding: 0;
  }
  
  .site-title {
    font-size: 1.15rem;
    margin-top: 0;
  }
  
  .header-left {
    position: static;
  }
  
  .header-actions {
    gap: 10px;
  }
  
  .icon-btn {
    width: 20px;
    height: 20px;
  }
  
  main {
    padding: 0 12px;
  }
  
  .swap-container {
    margin: 20px 0;
  }
  
  .swap-card {
    padding: 16px;
    border-radius: 14px;
  }
  
  .swap-header h2 {
    font-size: 1.3rem;
  }
  
  .input-group {
    margin-bottom: 16px;
  }
  
  .input-group label {
    font-size: 0.75rem;
  }
  
  .input-row {
    gap: 6px;
  }
  
  .input-row input,
  .currency-select {
    min-height: 40px;
    font-size: 0.95rem;
  }
  
  .flag-icon {
    width: 20px;
    height: 15px;
  }
  
  .currency-select {
    min-width: 120px;
  }
  
  .confirm-btn {
    padding: 11px;
  }
  
  .auth-card {
    padding: 20px;
    border-radius: 14px;
  }
  
  .auth-card h3 {
    font-size: 1.2rem;
  }
  
  .profile-avatar {
    width: 80px;
    height: 80px;
    font-size: 1.8rem;
  }
  
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
    padding: 12px;
    gap: 8px;
  }
  
  .stat-value {
    font-size: 1rem;
  }
  
  .profile-info label {
    font-size: 0.8rem;
  }
  
  #history-section {
    padding: 14px;
    border-radius: 14px;
  }
  
  #history-table {
    font-size: 0.8rem;
  }
  
  #history-table th,
  #history-table td {
    padding: 8px 6px;
  }
  
  .modal-card,
  .auth-modal-card {
    border-radius: 14px;
  }
  
  footer {
    padding: 20px 12px;
  }
  
  .footer-container {
    gap: 10px;
  }
  
  .footer-left, .footer-right, .footer-center {
    font-size: 0.8rem;
    gap: 6px;
    flex-wrap: wrap;
  }
  
  .footer-badge,
  .footer-logo {
    height: 18px;
  }
}

/* Small Phones (320px - 374px) */
@media (max-width: 374px) {
  header {
    padding: 10px 8px;
  }
  
  .header-bar {
    height: 44px;
  }
  
  .site-title {
    font-size: 1rem;
    letter-spacing: 0;
  }
  
  .icon-btn {
    width: 18px;
    height: 18px;
  }
  
  main {
    padding: 0 8px;
  }
  
  .swap-card {
    padding: 14px;
  }
  
  .swap-header h2 {
    font-size: 1.2rem;
  }
  
  .input-group label {
    font-size: 0.7rem;
  }
  
  .input-row input,
  .currency-select {
    min-height: 38px;
    font-size: 0.9rem;
  }
  
  .currency-select {
    min-width: 110px;
    padding: 0 8px;
  }
  
  .currency-select select {
    padding: 0 4px;
    font-size: 0.85rem;
  }
  
  .flag-icon {
    width: 18px;
    height: 13px;
  }
  
  .swap-btn {
    font-size: 1.6rem;
    margin: 12px auto;
  }
  
  .confirm-btn {
    padding: 10px;
    font-size: 0.9rem;
  }
  
  .auth-card {
    padding: 16px;
  }
  
  .profile-avatar {
    width: 70px;
    height: 70px;
    font-size: 1.5rem;
  }
  
  .profile-stats {
    padding: 10px;
  }
  
  .profile-card {
    padding: 16px;
  }
  
  #history-section {
    padding: 12px;
  }
  
  #history-table th,
  #history-table td {
    padding: 6px 4px;
  }
  
  footer {
    padding: 16px 8px;
  }
  
  .footer-left, .footer-right, .footer-center {
    font-size: 0.75rem;
    gap: 4px;
  }
  
  .footer-badge,
  .footer-logo {
    height: 16px;
  }
}

/* ================================
   🏦 BANKING SECTION STYLES
================================ */

.banking-section {
  margin-top: 32px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 12px;
  border: 1px solid #334155;
}

body.light .banking-section {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}

.banking-section h3 {
  margin-bottom: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #F1F5F9;
}

body.light .banking-section h3 {
  color: #1E293B;
}

.bank-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: #1E293B;
  border-radius: 12px;
  border: 1px solid #334155;
}

body.light .bank-form {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 500;
  font-size: 0.9rem;
  color: #CBD5E1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.light .form-group label {
  color: #475569;
}

.form-group input,
.form-group select {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0F172A;
  color: #F1F5F9;
  font-size: 0.95rem;
  font-family: 'Courier New', monospace;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.light .form-group input,
body.light .form-group select {
  background: #F1F5F9;
  color: #1E293B;
  border: 1px solid #CBD5E1;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

body.light .form-group input:focus,
body.light .form-group select:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ✨ Card Input with Logo */
.card-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.card-input-wrapper input {
  flex: 1;
  padding-right: 50px;
}

.card-type-logo {
  position: absolute;
  right: 12px;
  width: 40px;
  height: 25px;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.card-type-logo[src]:not([src=""]) {
  opacity: 1;
}

/* Card Account List */
.accounts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-card {
  background: #0F172A;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #334155;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

body.light .account-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}

.account-card:hover {
  border-color: #3B82F6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.account-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.account-logo {
  width: 32px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  flex-shrink: 0;
}

.account-details h4 {
  margin: 0 0 4px 0;
  font-size: 0.95rem;
  color: #F1F5F9;
}

body.light .account-details h4 {
  color: #1E293B;
}

.account-details p {
  margin: 0;
  font-size: 0.85rem;
  color: #94A3B8;
}

body.light .account-details p {
  color: #64748B;
}

.remove-account-btn {
  background: #EF4444;
  color: #FFF;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.remove-account-btn:hover {
  background: #DC2626;
  transform: translateY(-2px);
}

.add-bank-btn {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: #FFF;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.add-bank-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.add-bank-btn:active {
  transform: translateY(0);
}

#cardFields {
  transition: all 0.3s ease;
}

/* ================================
   📱 Banking Section Responsive
================================ */

@media (max-width: 1024px) {
  .banking-section {
    padding: 20px;
  }

  .bank-form {
    padding: 16px;
    gap: 14px;
  }

  .account-card {
    padding: 14px;
    flex-direction: column;
    align-items: flex-start;
  }

  .account-info {
    width: 100%;
    margin-bottom: 12px;
  }

  .remove-account-btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .banking-section {
    margin-top: 24px;
    padding: 16px;
    border-radius: 10px;
  }

  .banking-section h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
  }

  .bank-form {
    padding: 14px;
    gap: 12px;
  }

  .form-group {
    gap: 6px;
  }

  .form-group label {
    font-size: 0.8rem;
  }

  .form-group input,
  .form-group select {
    padding: 10px;
    font-size: 1rem;
    min-height: 44px;
  }

  .card-input-wrapper input {
    padding-right: 45px;
  }

  .card-type-logo {
    width: 35px;
    height: 22px;
    right: 10px;
  }

  .account-card {
    padding: 12px;
    gap: 10px;
  }

  .account-logo {
    width: 28px;
    height: 18px;
  }

  .account-details h4 {
    font-size: 0.9rem;
  }

  .account-details p {
    font-size: 0.8rem;
  }

  .remove-account-btn {
    width: 100%;
    padding: 8px;
  }

  .add-bank-btn {
    padding: 11px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .banking-section {
    padding: 12px;
    border-radius: 8px;
  }

  .banking-section h3 {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .bank-form {
    padding: 12px;
    gap: 10px;
  }

  .form-group label {
    font-size: 0.75rem;
  }

  .form-group input,
  .form-group select {
    padding: 10px;
    font-size: 0.95rem;
  }

  .account-card {
    padding: 10px;
    border-radius: 8px;
  }

  .account-logo {
    width: 24px;
    height: 16px;
  }

  .account-details h4 {
    font-size: 0.85rem;
  }

  .account-details p {
    font-size: 0.75rem;
  }

  .remove-account-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .add-bank-btn {
    padding: 10px;
    font-size: 0.85rem;
  }
}

/* ================================
   📍 EXACT LOCATION IN YOUR style.css
================================ */

/*
Looking at your CSS file (document 14), I don't see 
.docs-section or .docs-links styles defined!

This means the docs.html, terms.html, privacy.html, contact.html pages
are using DEFAULT HTML styling without custom CSS.

SOLUTION: Add these NEW CSS rules to your style.css
*/

/* ================================
   ✅ ADD THIS SECTION TO END OF YOUR style.css
================================ */

/* ================================
   📄 Documentation & Legal Pages
================================ */

.docs-section {
  width: 100%;
  max-width: 900px;
  margin: 30px auto;
  padding: 30px 20px;
  background: rgba(15, 23, 42, 0.3);
  border-radius: 12px;
  border: 1px solid #334155;
}

body.light .docs-section {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}

.docs-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: #F1F5F9;
}

body.light .docs-section h2 {
  color: #1E293B;
}

.docs-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: #CBD5E1;
}

body.light .docs-section h3 {
  color: #475569;
}

.docs-section p {
  line-height: 1.6;
  color: #CBD5E1;
  margin-bottom: 16px;
}

body.light .docs-section p {
  color: #64748B;
}

/* Legal Links Section */
.docs-links {
  width: 100%;
  max-width: 900px;
  margin: 30px auto;
  padding: 30px 20px;
  text-align: center;
}

.docs-links h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: #F1F5F9;
}

body.light .docs-links h2 {
  color: #1E293B;
}

.docs-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.docs-links li {
  margin: 0;
}

.docs-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  color: #3B82F6;
  transition: all 0.2s ease;
  padding: 8px 16px;
  border-radius: 8px;
}

.docs-links a:hover {
  color: #2563EB;
  background: rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

body.light .docs-links a {
  color: #2563EB;
}

body.light .docs-links a:hover {
  color: #1E40AF;
  background: rgba(37, 99, 235, 0.1);
}

/* ================================
   📱 Documentation Responsive
================================ */

@media (max-width: 1024px) {
  .docs-section {
    max-width: 95%;
    padding: 24px 16px;
  }

  .docs-links {
    max-width: 95%;
    padding: 24px 16px;
  }

  .docs-section h2,
  .docs-links h2 {
    font-size: 1.3rem;
  }

  .docs-section h3 {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .docs-section {
    max-width: 100%;
    padding: 20px 12px;
    margin: 20px auto;
  }

  .docs-links {
    max-width: 100%;
    padding: 20px 12px;
    margin: 20px auto;
  }

  .docs-section h2,
  .docs-links h2 {
    font-size: 1.2rem;
  }

  .docs-section h3 {
    font-size: 1rem;
  }

  .docs-section p {
    font-size: 0.95rem;
  }

  .docs-links ul {
    gap: 12px;
  }

  .docs-links a {
    font-size: 0.95rem;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .docs-section {
    max-width: 100%;
    padding: 16px 8px;
    margin: 16px auto;
  }

  .docs-links {
    max-width: 100%;
    padding: 16px 8px;
    margin: 16px auto;
  }

  .docs-section h2,
  .docs-links h2 {
    font-size: 1.1rem;
  }

  .docs-section h3 {
    font-size: 0.95rem;
    margin-top: 16px;
  }

  .docs-section p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .docs-links ul {
    gap: 10px;
  }

  .docs-links a {
    font-size: 0.9rem;
    padding: 6px 10px;
  }
}

#live-rates-ticker {
  width: 100%;
  background: linear-gradient(90deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);
  border-bottom: 2px solid #334155;
  padding: 12px 0;
  overflow: visible;
  transition: background 0.3s ease, border-color 0.3s ease;
}

body.light #live-rates-ticker {
  background: linear-gradient(90deg, #FFFFFF 0%, #F1F5F9 50%, #FFFFFF 100%);
  border-bottom: 2px solid #E2E8F0;
}

.rates-container {
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}

.rates-scroll {
  display: flex;
  gap: 24px;
  animation: scroll-left 30s linear infinite;
  padding: 0 20px;
  white-space: nowrap;
}

.rates-scroll:hover {
  animation-play-state: paused;
}

.rate-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  border: 1px solid #334155;
  flex-shrink: 0;
  transition: all 0.3s ease;
  cursor: pointer;
}

body.light .rate-item {
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid #CBD5E1;
}

.rate-item:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3B82F6;
  transform: translateY(-2px);
}

body.light .rate-item:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: #2563EB;
}

.rate-pair {
  font-weight: 600;
  color: #3B82F6;
  font-size: 0.95rem;
  min-width: 65px;
}

body.light .rate-pair {
  color: #2563EB;
}

.rate-price {
  font-weight: 500;
  color: #F1F5F9;
  font-size: 0.9rem;
  min-width: 75px;
  font-family: 'Courier New', monospace;
}

body.light .rate-price {
  color: #1E293B;
}

.rate-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.rate-change.up {
  color: #22C55E;
}

.rate-change.down {
  color: #EF4444;
}

.rate-arrow {
  font-size: 1rem;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .rates-scroll {
    gap: 16px;
    padding: 0 16px;
  }

  .rate-item {
    padding: 6px 12px;
  }

  .rate-pair {
    font-size: 0.9rem;
    min-width: 60px;
  }

  .rate-price {
    font-size: 0.85rem;
    min-width: 70px;
  }

  .rate-change {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  #live-rates-ticker {
    padding: 10px 0;
  }

  .rates-scroll {
    gap: 12px;
    padding: 0 12px;
  }

  .rate-item {
    padding: 5px 10px;
  }

  .rate-pair {
    font-size: 0.85rem;
    min-width: 55px;
  }

  .rate-price {
    font-size: 0.8rem;
    min-width: 65px;
  }

  .rate-change {
    font-size: 0.75rem;
  }

  .rate-arrow {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  #live-rates-ticker {
    padding: 8px 0;
  }

  .rates-scroll {
    gap: 10px;
    padding: 0 8px;
  }

  .rate-item {
    padding: 4px 8px;
  }

  .rate-pair {
    font-size: 0.8rem;
    min-width: 50px;
  }

  .rate-price {
    font-size: 0.75rem;
    min-width: 60px;
  }

  .rate-change {
    font-size: 0.7rem;
  }

  .rate-arrow {
    font-size: 0.8rem;
  }
}

@media (max-width: 374px) {
  .rates-scroll {
    gap: 8px;
    padding: 0 6px;
  }

  .rate-item {
    padding: 3px 6px;
  }

  .rate-pair {
    font-size: 0.75rem;
    min-width: 45px;
  }

  .rate-price {
    font-size: 0.7rem;
    min-width: 55px;
  }

  .rate-change {
    font-size: 0.65rem;
  }
}

.auth-modal-card {
  background: #1E293B;
  padding: 32px;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid #334155;
  animation: fadeInModal 0.3s ease;
}

body.light .auth-modal-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.auth-modal-card h3 {
  margin-bottom: 16px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #F1F5F9;
}

body.light .auth-modal-card h3 {
  color: #1E293B;
}

.auth-modal-card p {
  margin-bottom: 20px;
  color: #CBD5E1;
  font-size: 0.9rem;
}

body.light .auth-modal-card p {
  color: #64748B;
}

.auth-modal-card input {
  width: 100%;
  margin-bottom: 14px;
  min-height: 44px;
}

.auth-modal-card .auth-btn {
  width: 100%;
  margin-bottom: 12px;
}

.auth-modal-card a {
  color: #3B82F6;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-modal-card a:hover {
  color: #2563EB;
  text-decoration: underline;
}

/* ✅ Transaction Account Selection Box */
.transaction-account-option {
  padding: 14px;
  margin-bottom: 10px;
  background: #0F172A;
  border: 2px solid #334155;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #F1F5F9;
}

body.light .transaction-account-option {
  background: #FFFFFF;
  border: 2px solid #CBD5E1;
  color: #1E293B;
}

.transaction-account-option:hover {
  border-color: #3B82F6;
}

body.light .transaction-account-option:hover {
  border-color: #2563EB;
  background: rgba(37, 99, 235, 0.02);
}

.transaction-account-option div div {
  color: inherit;
}

.transaction-account-option div div div:first-child {
  font-weight: 600;
  color: inherit;
}

body.light .transaction-account-option div div div:first-child {
  color: #1E293B;
}

.transaction-account-option div div div:last-child {
  color: inherit;
  opacity: 0.8;
}

body.light .transaction-account-option div div div:last-child {
  color: #64748B;
}

.referral-section {
  margin-top: 32px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

body.light .referral-section {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.referral-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(59, 130, 246, 0.2);
}

body.light .referral-header {
  border-bottom: 2px solid rgba(37, 99, 235, 0.1);
}

.referral-icon {
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
}

.referral-header h3 {
  margin: 0 0 4px 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: #F1F5F9;
}

body.light .referral-header h3 {
  color: #1E293B;
}

.referral-header p {
  margin: 0;
  font-size: 0.9rem;
  color: #94A3B8;
}

body.light .referral-header p {
  color: #64748B;
}

/* Benefits Cards */
.referral-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.benefit-card {
  padding: 14px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  text-align: center;
  transition: all 0.3s ease;
}

body.light .benefit-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.benefit-card:hover {
  border-color: #3B82F6;
  background: rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

body.light .benefit-card:hover {
  border-color: #2563EB;
  background: rgba(37, 99, 235, 0.1);
}

.benefit-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #3B82F6;
  margin-bottom: 6px;
}

body.light .benefit-number {
  color: #2563EB;
}

.benefit-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.benefit-text strong {
  font-size: 0.85rem;
  color: #F1F5F9;
  font-weight: 600;
}

body.light .benefit-text strong {
  color: #1E293B;
}

.benefit-text span {
  font-size: 0.75rem;
  color: #94A3B8;
}

body.light .benefit-text span {
  color: #64748B;
}

/* Referral Code & Link Boxes */
.referral-code-box,
.referral-link-box {
  margin-bottom: 16px;
}

.referral-code-box label,
.referral-link-box label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #CBD5E1;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.light .referral-code-box label,
body.light .referral-link-box label {
  color: #475569;
}

.referral-code-display,
.referral-link-display {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  padding: 2px;
  border-radius: 10px;
  border: 1px solid #334155;
}

body.light .referral-code-display,
body.light .referral-link-display {
  background: rgba(248, 250, 252, 0.5);
  border: 1px solid #CBD5E1;
}

.referral-code-input,
.referral-link-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #F1F5F9;
  padding: 12px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  font-weight: 500;
}

body.light .referral-code-input,
body.light .referral-link-input {
  color: #1E293B;
}

.referral-code-input:focus,
.referral-link-input:focus {
  outline: none;
}

.copy-btn {
  background: #3B82F6;
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-right: 4px;
}

body.light .copy-btn {
  background: #2563EB;
}

.copy-btn:hover {
  background: #2563EB;
  transform: scale(1.05);
}

body.light .copy-btn:hover {
  background: #1E40AF;
}

.copy-btn:active {
  transform: scale(0.95);
}

.referral-note {
  margin: 6px 0 0 0;
  font-size: 0.75rem;
  color: #94A3B8;
}

body.light .referral-note {
  color: #64748B;
}

/* Referral Stats */
.referral-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 24px 0;
  padding: 16px;
  background: rgba(15, 23, 42, 0.3);
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.15);
  justify-content: space-around;
  align-items: center;
}

body.light .referral-stats {
  background: rgba(248, 250, 252, 0.3);
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 120px;
}

.stat-label {
  font-size: 0.75rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
  display: block;
}

body.light .stat-label {
  color: #64748B;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3B82F6;
}

body.light .stat-value {
  color: #2563EB;
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  font-size: 0.85rem;
}

body.light .status-badge {
  background: rgba(37, 99, 235, 0.15);
}

/* How It Works */
.how-it-works {
  margin-top: 20px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 10px;
  border-left: 4px solid #3B82F6;
}

body.light .how-it-works {
  background: rgba(248, 250, 252, 0.4);
  border-left: 4px solid #2563EB;
}

.how-it-works h4 {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #F1F5F9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.light .how-it-works h4 {
  color: #1E293B;
}

.how-it-works-list {
  margin: 0;
  padding-left: 20px;
  list-style: decimal;
}

.how-it-works-list li {
  font-size: 0.85rem;
  color: #CBD5E1;
  margin-bottom: 6px;
  line-height: 1.4;
}

body.light .how-it-works-list li {
  color: #64748B;
}

/* Responsive */
@media (max-width: 768px) {
  .referral-section {
    padding: 16px;
  }

  .referral-header {
    gap: 12px;
  }

  .referral-icon {
    font-size: 2rem;
    min-width: 50px;
  }

  .referral-header h3 {
    font-size: 1.1rem;
  }

  .referral-benefits {
    gap: 10px;
  }

  .benefit-card {
    padding: 12px;
  }

  .benefit-number {
    font-size: 1.5rem;
  }

  .referral-stats {
    gap: 10px;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .referral-section {
    padding: 12px;
  }

  .referral-header {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .referral-benefits {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }

  .benefit-card {
    padding: 10px;
  }

  .referral-code-display,
  .referral-link-display {
    flex-direction: column;
  }

  .copy-btn {
    width: 100%;
  }

  .referral-stats {
    grid-template-columns: 1fr;
  }
}

/* Hide left header on profile page only */
body:has(main > .profile-container) .header-left {
  display: none !important;
}

/* Profile Header - Full Width Centered Title */
body:has(.profile-container) .header-bar,
body:has(.auth-container) .header-bar {
  justify-content: space-between;
  position: relative;
}

body:has(.profile-container) .site-title,
body:has(.auth-container) .site-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}

body:has(.profile-container) .header-actions,
body:has(.auth-container) .header-actions {
  margin-left: auto;
  position: relative;
  z-index: 10;
}

/* ================================
   📰 NEWS PAGE STYLES
================================ */

.news-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* News Header */
.news-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.3);
  border-radius: 12px;
  border: 1px solid #334155;
}

body.light .news-header {
  background: rgba(248, 250, 252, 0.3);
  border: 1px solid #E2E8F0;
}

.news-header-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #F1F5F9;
}

body.light .news-header-content h2 {
  color: #1E293B;
}

.news-header-content p {
  font-size: 0.95rem;
  color: #94A3B8;
  margin: 0;
}

body.light .news-header-content p {
  color: #64748B;
}

.news-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}

.refresh-btn {
  padding: 10px 16px;
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.refresh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.refresh-btn:active {
  transform: translateY(0);
}

.last-updated {
  font-size: 0.8rem;
  color: #94A3B8;
}

body.light .last-updated {
  color: #64748B;
}

/* News Filters */
.news-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 2px solid #334155;
  border-radius: 8px;
  color: #CBD5E1;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.light .filter-btn {
  background: rgba(37, 99, 235, 0.05);
  border: 2px solid #CBD5E1;
  color: #475569;
}

.filter-btn:hover {
  border-color: #3B82F6;
  color: #3B82F6;
}

body.light .filter-btn:hover {
  border-color: #2563EB;
  color: #2563EB;
}

.filter-btn.active {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  border-color: #3B82F6;
  color: white;
}

body.light .filter-btn.active {
  border-color: #2563EB;
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 60px 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(59, 130, 246, 0.2);
  border-top: 4px solid #3B82F6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner p {
  color: #94A3B8;
  font-size: 1rem;
  font-weight: 500;
}

body.light .loading-spinner p {
  color: #64748B;
}

/* Error Message */
.error-message {
  padding: 24px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  text-align: center;
  margin: 40px 0;
}

.error-message p {
  color: #FCA5A5;
  margin: 0;
  font-size: 1rem;
}

body.light .error-message {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

body.light .error-message p {
  color: #DC2626;
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.no-articles {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #94A3B8;
}

body.light .no-articles {
  color: #64748B;
}

/* News Card */
.news-card {
  display: flex;
  flex-direction: column;
  background: #1E293B;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #334155;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.light .news-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.2);
  border-color: #3B82F6;
}

body.light .news-card:hover {
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.1);
  border-color: #2563EB;
}

.news-card-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #0F172A;
}

body.light .news-card-image {
  background: #F1F5F9;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

/* Category Badge */
.category-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
}

.category-markets {
  background: rgba(59, 130, 246, 0.9);
  color: white;
}

.category-crypto {
  background: rgba(168, 85, 247, 0.9);
  color: white;
}

.category-economy {
  background: rgba(34, 197, 94, 0.9);
  color: white;
}

.category-all {
  background: rgba(241, 245, 249, 0.9);
  color: #1E293B;
}

/* News Card Content */
.news-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}

.news-card-content h3 {
  margin: 0 0 12px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #F1F5F9;
  line-height: 1.4;
}

body.light .news-card-content h3 {
  color: #1E293B;
}

.news-description {
  margin: 0 0 auto 0;
  font-size: 0.9rem;
  color: #94A3B8;
  line-height: 1.5;
}

body.light .news-description {
  color: #64748B;
}

.news-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #334155;
}

body.light .news-card-footer {
  border-top: 1px solid #E2E8F0;
}

.news-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
}

.news-source {
  font-weight: 600;
  color: #3B82F6;
}

body.light .news-source {
  color: #2563EB;
}

.news-date {
  color: #94A3B8;
}

body.light .news-date {
  color: #64748B;
}

.read-more-btn {
  padding: 8px 12px;
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.read-more-btn:hover {
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ================================
   📱 NEWS PAGE RESPONSIVE
================================ */

@media (max-width: 1024px) {
  .news-container {
    padding: 30px 16px;
  }

  .news-header {
    flex-direction: column;
    gap: 16px;
  }

  .news-controls {
    align-items: flex-start;
    width: 100%;
  }

  .news-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
  }

  .news-header-content h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .news-container {
    padding: 20px 12px;
  }

  .news-header {
    padding: 16px;
    gap: 12px;
  }

  .news-header-content h2 {
    font-size: 1.3rem;
    margin-bottom: 6px;
  }

  .news-header-content p {
    font-size: 0.9rem;
  }

  .refresh-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .last-updated {
    font-size: 0.75rem;
  }

  .news-filters {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .news-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
  }

  .news-card-image {
    height: 160px;
  }

  .news-card-content {
    padding: 16px;
  }

  .news-card-content h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .news-description {
    font-size: 0.85rem;
  }

  .read-more-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .news-container {
    padding: 16px 8px;
  }

  .news-header {
    padding: 12px;
    margin-bottom: 20px;
  }

  .news-header-content h2 {
    font-size: 1.2rem;
  }

  .news-header-content p {
    font-size: 0.85rem;
  }

  .news-controls {
    width: 100%;
  }

  .refresh-btn {
    width: 100%;
    padding: 10px;
  }

  .news-filters {
    flex-direction: column;
    gap: 8px;
  }

  .filter-btn {
    width: 100%;
    padding: 10px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .news-card-image {
    height: 180px;
  }

  .news-card-content {
    padding: 14px;
  }

  .news-card-content h3 {
    font-size: 0.95rem;
  }

  .news-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .read-more-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 374px) {
  .news-container {
    padding: 12px 6px;
  }

  .news-header {
    padding: 10px;
  }

  .news-header-content h2 {
    font-size: 1.1rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-card-image {
    height: 150px;
  }

  .news-card-content {
    padding: 12px;
  }

  .news-card-content h3 {
    font-size: 0.9rem;
  }
}

.news-btn{
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.news-btn:hover{
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.header-bar button {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}

/* ✅ Card Details Row (Expiry + CVV side by side) */
.card-details-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card-detail-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-detail-field label {
  font-weight: 500;
  font-size: 0.9rem;
  color: #CBD5E1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.light .card-detail-field label {
  color: #475569;
}

.card-detail-field input {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0F172A;
  color: #F1F5F9;
  font-size: 0.95rem;
  font-family: 'Courier New', monospace;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.light .card-detail-field input {
  background: #F1F5F9;
  color: #1E293B;
  border: 1px solid #CBD5E1;
}

.card-detail-field input:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

body.light .card-detail-field input:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Responsive: Stack on mobile */
@media (max-width: 480px) {
  .card-details-row {
    grid-template-columns: 1fr;
  }
}
