/* Centralized Color Palette - DARK MODE (Inspired by WooFi) */
:root {
  --primary-color: #6B5FCF;
  --primary-hover: #8478E5;
  --background-dark: #0a0b0d;
  --background-medium: #151619;
  --background-light: #1c1d22;
  --text-primary: #c5cad3;
  --text-secondary: #b0b8c4;
  --border-color: #2a2b30;
  --success-color: #00d4aa;
  --error-color: #ff5757;
  --warning-color: #ffb800;
  --accent-purple: #8478E5;
  --card-accent: #1e1f26;

  /* Theme-specific variables for compatibility */
  --font-family: 'Quicksand', sans-serif;
  --bg-color: var(--background-dark);
  --bg-gradient-center: #151619;
  --bg-gradient-edge: #0a0b0d;
  --card-bg: var(--background-medium);
  --accent-bg: var(--background-light);
  --text-color: var(--text-primary);
  --button-bg: var(--primary-color);
  --button-hover: var(--primary-hover);
  --button-text: #e6e6e6;
  --underline: var(--border-color);
  --tab-underline: var(--primary-color);
  --note-bg: #1e1f264d;
  --note-text: #e0e7ff;
  --important-note-bg: #2d1a1a;
  --important-note-border: #ff5757;
  --important-note-text: #fef2f2;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --card-padding: 20px 24px;
  --card-margin: 40px;
  --card-radius: 16px;
  --card-border: 1px solid var(--border-color);
  --h1-font-size: 1.5em;
  --h1-font-weight: 600;
  --h1-margin: 0;
  --h1-color: var(--text-primary);
  --h2-font-size: 1.7em;
  --h2-font-weight: 600;
  --h2-margin: 0.5em 0;
  --h2-color: var(--text-primary);
  --h3-font-size: 1.4em;
  --h3-font-weight: 600;
  --h3-margin: 0.5em 0;
  --h3-color: var(--text-primary);
  --h4-font-size: 1.1em;
  --h4-font-weight: 600;
  --h4-margin: 0.5em 0;
  --h4-color: var(--text-primary);
  --p-font-size: 100%;
  --p-font-weight: normal;
  --p-margin: 0 0 1em 0;
  --p-color: var(--text-secondary);
  --p-line-height: 1.6;
}

/* Transition effect for theme switch */
.theme-transition {
  transition: all 0.5s ease;
  /* 0.5-second fade for all animatable properties */
}



/* Global Reset and Base Styles */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

/* Ensure all elements respect their container boundaries */
* {
  max-width: 100%;
  box-sizing: border-box;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

/* Proper word wrapping */
p,
li,
span,
div {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

body {
  background:
    radial-gradient(ellipse 100% 80% at top left, rgba(88, 70, 255, 0.16) 0%, rgba(88, 70, 255, 0.08) 30%, transparent 60%),
    radial-gradient(ellipse 100% 80% at top right, rgba(220, 38, 127, 0.28) 0%, rgba(220, 38, 127, 0.15) 30%, transparent 60%),
    radial-gradient(ellipse 120% 60% at bottom center, rgba(59, 130, 246, 0.14) 0%, rgba(59, 130, 246, 0.07) 30%, transparent 55%),
    radial-gradient(ellipse 80% 50% at center, rgba(147, 51, 234, 0.18) 0%, rgba(220, 38, 127, 0.08) 25%, transparent 50%),
    linear-gradient(135deg, rgba(22, 23, 27, 1) 0%, rgba(16, 17, 20, 1) 50%, rgba(12, 13, 15, 1) 100%),
    #0a0b0d;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: var(--text-color);
  font-family: var(--font-family);
  line-height: 1.6;
  font-size: 100%;
  transition: background 0.5s ease, color 0.5s ease;
  /* Smooth transition for body */
}

/* Scrollbar Styling - Matching FransBotCharts */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 16, 19, 0.5);
}

::-webkit-scrollbar-thumb {
  background: rgba(107, 95, 207, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 95, 207, 0.5);
}

/* Firefox scrollbar styling */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(107, 95, 207, 0.3) rgba(15, 16, 19, 0.5);
}

/* Heading and Paragraph Styles */
h1 {
  font-size: var(--h1-font-size);
  font-weight: var(--h1-font-weight);
  margin: var(--h1-margin);
  color: var(--text-primary);
}

h2 {
  font-size: var(--h2-font-size);
  font-weight: var(--h2-font-weight);
  margin: var(--h2-margin);
  color: var(--text-primary);
}

h3 {
  font-size: var(--h3-font-size);
  font-weight: var(--h3-font-weight);
  margin: var(--h3-margin);
  color: var(--text-primary);
}

h4 {
  font-size: var(--h4-font-size);
  font-weight: var(--h4-font-weight);
  margin: var(--h4-margin);
  color: var(--text-primary);
}

p {
  font-size: var(--p-font-size);
  font-weight: var(--p-font-weight);
  margin: var(--p-margin);
  color: var(--p-color);
  line-height: var(--p-line-height);
}

/* Override for <p> inside .note-card */
.note-card p {
  color: #c5cad3 !important;
  /* Softer white text for regular note cards */
}

/* Override for <p> inside .note-card.important */
.note-card.important p {
  color: #c5cad3 !important;
  /* Softer white text for important note cards */
}

/* Container */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 20px auto;
  padding: 20px;
  box-sizing: border-box;
}

/* Card-Like Elements with Original Selectors */
/* Card-Like Elements with Original Selectors */
/* Main Container Style (Purple Gradient Glass) */
/* Main Container Style (Unified Glass Style) */
.header,
.card,
.tabs,
.note-card,
.sub-card,
.step-card,
.flowcard,
.flowchart,
.my-bot-category-tabs,
.my-bot-sub-tabs,
.account-sub-tabs,
.fee-tabs,
.code-tabs,
.fransbot-content,
.generator-output-card {
  background: rgb(30 26 47 / 40%) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  margin-bottom: 20px;
  box-sizing: border-box;
  overflow: hidden;
  transition: all 0.3s ease;
  color: var(--text-primary);
}

/* Specific Overrides */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Header Element (actual header tag) - All text softer */
/* header.card background handled by unified glass style */

header.card h1 {
  color: #c5cad3 !important;
  font-weight: 500 !important;
}

header.card h3 {
  color: #c5cad3 !important;
}

header.card p {
  color: #b0b8c4 !important;
}

header.card div {
  color: #b0b8c4 !important;
}

header.card strong {
  color: #c5cad3 !important;
}

.header img.header-icon {
  width: 100px;
  height: auto;
  margin-right: 15px;
}

/* Note Cards - Vibrant and Attention-Grabbing */
/* Note Cards - Vibrant and Attention-Grabbing */
.note-card {
  /* Using unified glass style, but keeping border/shadow for distinction */
  border: 2px solid rgba(107, 95, 207, 0.5);
  color: var(--text-primary);
  box-shadow: 0 4px 16px rgba(107, 95, 207, 0.3);
}

.note-card.important {
  /* Using unified glass style */
  border: 1px solid rgba(124, 111, 220, 0.2);
  color: var(--text-primary);
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.15);
}

.header .header-container {
  display: flex;
  align-items: center;
  /* Vertically center the icon and text */
}

.header img.header-icon {
  width: 100px;
  height: auto;
  margin-right: 20px;
}

.header .header-text {
  --vertical-adjust: 15%;
  /* Default: 0% (centered) */
  transform: translateY(var(--vertical-adjust));
  /* Adjust position by percentage */
}

/* Buttons and Links */
.btn,
.nav a.btn,
.auth-links a.btn {
  display: inline-block;
  background: linear-gradient(90deg, #6B5FCF 0%, #8478E5 100%);
  color: #e6e6e6;
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(107, 95, 207, 0.2);
}

.btn:hover,
.nav a.btn:hover,
.auth-links a.btn:hover {
  background: linear-gradient(90deg, #8478E5 0%, #9B8FEE 100%);
  color: #e6e6e6;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(107, 95, 207, 0.4);
}

.btn-delete {
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
  color: #e6e6e6;
}

.btn-delete:hover {
  background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
  color: #e6e6e6;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
  background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%);
  color: #e6e6e6;
}

.btn-secondary:hover {
  background: linear-gradient(90deg, #818cf8 0%, #a5b4fc 100%);
  color: #e6e6e6;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.purchase-btn {
  background: linear-gradient(90deg, #6B5FCF 0%, #8478E5 100%);
  color: #e6e6e6;
  padding: 10px 15px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(107, 95, 207, 0.2);
}

.purchase-btn:hover {
  background: linear-gradient(90deg, #8478E5 0%, #9B8FEE 100%);
  color: #e6e6e6;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(107, 95, 207, 0.4);
}

/* ============================================== 
   GLASS STYLING - Migrated from FransBotCharts
   ============================================== */

/* Glass Button Override */
.btn {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: var(--text-primary) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  transform: translateY(-2px);
  box-shadow:
    0 6px 15px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.btn:active {
  transform: translateY(0);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Glass Primary Button - Purple tint */
.btn-primary {
  background: rgba(107, 95, 207, 0.15) !important;
  border: 1px solid rgba(132, 120, 229, 0.3) !important;
  box-shadow:
    0 4px 12px rgba(107, 95, 207, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  background: rgba(107, 95, 207, 0.25) !important;
  border-color: rgba(132, 120, 229, 0.5) !important;
  box-shadow:
    0 8px 20px rgba(107, 95, 207, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Glass Secondary Button - Pure glass */
.btn-secondary {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: var(--text-secondary) !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: var(--text-primary) !important;
  color: var(--text-primary) !important;
}

/* Glass Success Button - Green tint */
.btn-success {
  background: rgba(0, 212, 170, 0.15) !important;
  border: 1px solid rgba(0, 212, 170, 0.3) !important;
  box-shadow:
    0 4px 12px rgba(0, 212, 170, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-success:hover {
  background: rgba(0, 212, 170, 0.25) !important;
  border-color: rgba(0, 212, 170, 0.5) !important;
}

/* Glass Danger Button - Red tint */
.btn-danger {
  background: rgba(255, 87, 87, 0.15) !important;
  border: 1px solid rgba(255, 87, 87, 0.3) !important;
  box-shadow:
    0 4px 12px rgba(255, 87, 87, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-danger:hover {
  background: rgba(255, 87, 87, 0.25) !important;
  border-color: rgba(255, 87, 87, 0.5) !important;
}

/* Glass Login Button - Purple/Pink gradient with glass blend */
.login-section .btn-login {
  background: linear-gradient(135deg, rgb(24 6 45 / 12%) 0%, rgb(161 32 32 / 15%) 100%) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(180, 130, 200, 0.45) !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}

.login-section .btn-login:hover {
  /* Subtle light effect on hover */
  background: linear-gradient(135deg, rgb(24 6 45 / 16%) 0%, rgb(161 32 32 / 19%) 100%) !important;
  border-color: rgba(180, 130, 200, 0.6) !important;
  box-shadow: none !important;
}

/* Glass Form Inputs */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
textarea,
select {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text-primary) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
textarea:hover,
select:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--primary-color) !important;
  box-shadow:
    0 0 0 3px rgba(107, 95, 207, 0.15),
    inset 0 1px 2px rgba(0, 0, 0, 0.2) !important;
  outline: none !important;
}

/* Glass styling removed - unified at top of file */

/* ============================================== 
   END GLASS STYLING
   ============================================== */

/* Tab Divider */
.tab-divider {
  width: 1px;
  height: 24px;
  background: linear-gradient(180deg, transparent 0%, var(--border-color) 20%, var(--border-color) 80%, transparent 100%);
  margin: 0 5px;
  align-self: center;
  opacity: 0.6;
}

/* Tab Buttons (All Types) */
.tab-button,
.code-tab-button,
.account-tab-button,
.my-bot-tab-button,
.fee-tab-button,
.my-bot-category-button {
  background: none;
  border: none;
  color: var(--text-color);
  /* #333 */
  padding: 15px 30px;
  cursor: pointer;
  font-size: 1.1em;
  transition: color 0.3s, transform 0.3s ease;
  /* Add transform to transition */
}

.tab-button.active,
.code-tab-button.active,
.account-tab-button.active,
.my-bot-tab-button.active,
.fee-tab-button.active,
.my-bot-category-button.active {
  border-bottom: 3px solid var(--tab-underline);
  /* #523489, already set */
  color: var(--button-bg);
  /* #523489, already set */
  font-weight: bold;
  transform: scale(1.1);
  /* Stay slightly bigger */
}

.tab-button:hover,
.code-tab-button:hover,
.account-tab-button:hover,
.my-bot-tab-button:hover,
.fee-tab-button:hover,
.my-bot-category-button:hover {
  color: var(--button-bg);
  /* #523489 */
  transform: scale(1.1);
  /* Slightly bigger */
}

.tab-button i,
.code-tab-button i,
.account-tab-button i,
.my-bot-tab-button i,
.fee-tab-button i,
.my-bot-category-button i {
  margin-right: 8px;
  /* Space between icon and text */
  color: var(--text-color);
  /* #333, default state */
  vertical-align: middle;
  /* Align with text */
  transition: color 0.3s ease;
  /* Smooth color change */
}

/* Hover: Icons turn purple with button */
.tab-button:hover i,
.code-tab-button:hover i,
.account-tab-button:hover i,
.my-bot-tab-button:hover i,
.fee-tab-button:hover i,
.my-bot-category-button:hover i {
  color: var(--button-bg);
  /* #523489 */
}

/* Active: Icons stay purple with button */
.tab-button.active i,
.code-tab-button.active i,
.account-tab-button.active i,
.my-bot-tab-button.active i,
.fee-tab-button.active i,
.my-bot-category-button.active i {
  color: var(--button-bg);
  /* #523489 */
}

/* My Bot Sub-tabs - Button Style (like FransBotCharts) */
.my-bot-sub-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(82, 52, 137, 0.05);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.my-bot-sub-tabs .my-bot-tab-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-color);
  font-size: 0.9em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  transform: none;
  /* Override global transform */
}

.my-bot-sub-tabs .my-bot-tab-button:hover {
  background: rgba(82, 52, 137, 0.1);
  color: var(--button-bg);
  transform: none;
  /* No scale on hover */
  border-color: transparent;
}

.my-bot-sub-tabs .my-bot-tab-button.active {
  background: var(--button-bg) !important;
  color: #e6e6e6;
  border-color: var(--button-bg) !important;
  transform: none;
  /* No scale when active */
  border-bottom: none !important;
  /* Remove underline for button style */
}

.my-bot-sub-tabs .my-bot-tab-button.active i {
  color: #e6e6e6;
  /* Icons white when active */
}

.my-bot-sub-tabs .my-bot-tab-button i {
  font-size: 0.9em;
  color: inherit;
}

/* My Bot Category Tabs Container */
.my-bot-category-tabs {
  display: flex;
  flex-wrap: wrap;
  overflow-x: auto;
  border-bottom: 2px solid var(--border-color);
  width: 100%;
  box-sizing: border-box;
}

/* Tabs Container */
.tabs,
.code-tabs,
.account-sub-tabs,
.my-bot-sub-tabs,
.fee-tabs {
  display: flex;
  flex-wrap: wrap;
  overflow-x: auto;
  border-bottom: 2px solid var(--border-color);
  transition: border-bottom 0.5s ease;
  /* Smooth transition for border */
  width: 100%;
  box-sizing: border-box;
}

/* Forms and Inputs */
.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--text-color);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(124, 111, 220, 0.2);
  border-radius: 12px;
  background: rgba(24, 25, 29, 0.9);
  background: linear-gradient(135deg, rgba(88, 70, 255, 0.04) 0%, rgba(59, 130, 246, 0.02) 100%),
    rgba(24, 25, 29, 0.9);
  color: var(--text-color);
  box-sizing: border-box;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  font-family: inherit;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(124, 111, 220, 0.6);
  background: rgba(24, 25, 29, 0.95);
  background: linear-gradient(135deg, rgba(88, 70, 255, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%),
    rgba(24, 25, 29, 0.95);
  box-shadow: 0 0 0 3px rgba(124, 111, 220, 0.1);
}

/* Readonly textareas (like generator output) */
textarea[readonly] {
  font-family: 'Courier New', monospace;
  resize: none;
}

/* Custom Select Dropdown Styling */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b0b8c4' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

select:hover {
  border-color: rgba(107, 95, 207, 0.4);
}

/* Dropdown Options Styling */
select option {
  background-color: #16171b;
  color: #c5cad3;
  padding: 12px 16px;
}

select option:hover,
select option:focus,
select option:checked {
  background-color: rgba(107, 95, 207, 0.4) !important;
  background: linear-gradient(135deg, rgba(107, 95, 207, 0.4) 0%, rgba(134, 76, 222, 0.35) 100%);
  color: #ffffff !important;
}

select option:disabled {
  color: #5a5f66;
  background: rgba(15, 16, 19, 0.95);
}

/* Filter Select Specific Styling */
.filter-select {
  max-width: 200px;
  font-size: 0.95em;
}


/* Tables */
.credentials-table,
.position-table,
.grand-totals-table,
.output-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(124, 111, 220, 0.2);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  background: rgba(24, 25, 29, 0.9);
  background: linear-gradient(135deg, rgba(88, 70, 255, 0.04) 0%, rgba(59, 130, 246, 0.02) 100%),
    rgba(24, 25, 29, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  table-layout: fixed;
}

th,
td {
  padding: 12px;
  border: 1px solid rgba(124, 111, 220, 0.15);
  text-align: left;
  color: var(--text-color);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

th {
  background: rgba(32, 33, 38, 0.95);
  background: linear-gradient(135deg, rgba(88, 70, 255, 0.06) 0%, rgba(59, 130, 246, 0.03) 100%),
    rgba(32, 33, 38, 0.95);
  font-weight: bold;
  color: var(--accent-purple);
}

.total-row td,
.grand-totals-table td {
  font-weight: bold;
  text-align: right;
}

/* Disclaimers */
.disclaimer {
  border: 2px solid var(--error-color);
  padding: 15px;
  background: rgba(255, 87, 87, 0.1);
  border-radius: 12px;
  color: #fef2f2;
}

.top-disclaimer {
  border-color: var(--primary-color);
  background: rgba(93, 82, 255, 0.1);
  color: #e0e7ff;
}

.disclaimer .big-checkbox input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin-right: 12px;
}

.disclaimer .big-checkbox label {
  font-size: 20px;
  color: inherit;
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: none;
}

/* Code Blocks */
.code-block {
  background: var(--card-accent);
  color: var(--text-primary);
  padding: 15px;
  border-radius: var(--card-radius);
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Flowcard Container */
.flowcard {
  margin-bottom: 40px;
  padding: 24px;
  background: rgba(24, 25, 29, 0.85);
  background: linear-gradient(135deg, rgba(88, 70, 255, 0.05) 0%, rgba(59, 130, 246, 0.03) 100%),
    rgba(24, 25, 29, 0.85);
  border-radius: 12px;
  border: 1px solid rgba(107, 95, 207, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.flowcard h3 {
  margin-top: 0;
  margin-bottom: 24px;
  color: var(--text-primary);
  font-size: 1.3em;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(107, 95, 207, 0.3);
}

/* Flowchart */
.flowchart {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  /* Tighter gap */
  padding: 16px;
  /* Reduced padding */
  border-radius: var(--card-radius);
  background: rgba(24, 25, 29, 0.9);
  background: linear-gradient(135deg, rgba(88, 70, 255, 0.08) 0%, rgba(59, 130, 246, 0.04) 50%, rgba(147, 51, 234, 0.06) 100%),
    rgba(24, 25, 29, 0.9);
  box-shadow: var(--shadow);
  border: var(--card-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-wrap: nowrap;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.flow-group {
  border: 2px dashed var(--button-bg);
  padding: 8px;
  border-radius: 4px;
  display: flex;
  gap: 8px;
}

.flow-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.flow-item {
  text-align: center;
  flex: 1 1 0;
  /* flexible width */
  min-width: 0;
  /* allow shrinking below content size */
  padding: 0 2px;
}

.flow-item img {
  width: 80px;
  height: 80px;
  display: block;
  margin: 0 auto 4px;
}

.flow-item span {
  color: var(--text-color);
  font-size: 0.85em;
  display: block;
  white-space: normal;
  line-height: 1.25;
  margin-top: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  /* Ensure long words break */
  hyphens: auto;
  /* improving text wrap */
}

.flow-plus,
.flow-arrow {
  font-size: 1.2em;
  /* Smaller arrow */
  color: var(--button-bg);
  height: 80px;
  display: flex;
  align-items: center;
  margin: 0 2px;
  /* Minimal margin */
  flex-shrink: 0;
  /* Prevent arrows from squishing */
}

.timeline-image {
  width: 100%;
  /* Makes the image take the full full width of its container */
  height: auto;
  /* Maintains aspect ratio */
  object-fit: contain;
  /* Ensures the image fits within the container without cropping */
  display: block;
  /* Removes any extra spacing below the image */
}

/* Responsive Adjustments */
.position-table,
.grand-totals-table {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
}

.generator-container {
  display: flex;
  gap: 20px;
}

.generator-form,
.generator-output {
  flex: 1;
  min-width: 0;
}

/* Misc Utilities */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--button-bg);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 2s linear infinite;
  display: inline-block;
}

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

  100% {
    transform: rotate(360deg);
  }
}

/* Powered by Layout */
.powered-by-container {
  display: flex;
  gap: 20px;
}

.powered-by-card {
  width: 200px;
  flex-shrink: 0;
}

.welcome-text {
  flex: 1;
}

.powered-by-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.powered-by-card {
  order: 1;
}

.welcome-text {
  order: 0;
}



/* Ensure flow-group aligns items properly */


/* Mini BotFace Icon */
.tab-icon {
  width: 28px;
  /* Mini size */
  height: 28px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  /* Space between icons */
  cursor: pointer;
  padding: 10px;
  background: var(--button-bg);
  /* #523489 */
  color: var(--button-text);
  /* #fff */
  border-radius: 6px;
  transition: background 0.5s ease, color 0.5s ease;
  /* Updated to 0.5s */
}

.theme-toggle:hover {
  background: var(--button-hover);
  /* #422a6e */
}

.theme-toggle i {
  font-size: 1.2em;
  /* Slightly larger icons */
  vertical-align: middle;
}

/* Firefox-friendly fallback when backdrop-filter is unavailable */
@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {

  .header,
  .card,
  .tabs,
  .sub-card,
  .step-card,
  .note-card {
    background: linear-gradient(135deg, rgba(88, 70, 255, 0.12) 0%, rgba(59, 130, 246, 0.06) 50%, rgba(147, 51, 234, 0.10) 100%),
      rgba(32, 33, 38, 0.96);
    border-color: rgba(107, 95, 207, 0.35);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  }

  .note-card.important {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.28) 0%, rgba(107, 95, 207, 0.22) 50%, rgba(88, 70, 255, 0.24) 100%),
      rgba(32, 33, 38, 0.96);
    border-color: rgba(147, 51, 234, 0.7);
    box-shadow: 0 8px 28px rgba(147, 51, 234, 0.5);
  }

  .exchange-header,
  .exchange-content,
  .purchase-card,
  .access-card,
  #paymentOverlay #confirmationContainer,
  #paymentOverlay #confirmationContainer .note-card,
  #paymentOverlay #confirmationContainer .note-card.important {
    background: linear-gradient(135deg, rgba(88, 70, 255, 0.12) 0%, rgba(59, 130, 246, 0.06) 50%, rgba(147, 51, 234, 0.10) 100%),
      rgba(26, 27, 32, 0.96) !important;
    border-color: rgba(107, 95, 207, 0.35) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
  }

  .purchase-card,
  .access-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  }
}

/* New invisible container */
.timeline-wrapper {
  width: 100%;
  max-width: 100%;
  /* Matches card width */
  margin: 0 auto;
  /* Centers within card */
  background: transparent;
  /* Invisible */
  overflow: visible;
  /* Allows vertical expansion */
}

/* Timeline Container */
.timeline-container {
  width: 90%;
  background: transparent;
  padding: 145px 55px;
  /* Space for above/below events */
  overflow-x: visible;
}

/* Timeline Styling */
.timeline {
  position: relative;
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
}

/* Timeline Line */
.timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--button-bg, #523489);
  transform: translateY(-50%);
}

/* Day Styling */
.day {
  position: relative;
  text-align: center;
  flex: 1;
  min-width: 100px;
}

/* Day Label */
.day-label {
  display: block;
  color: var(--text-color, #333);
  font-weight: bold;
  transform: translate(45px, -20px);
}

/* Day Dot */
.day-dot {
  width: 12px;
  height: 12px;
  background: var(--button-bg, #523489);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Event Styling */
.event {
  position: absolute;
  width: 200px;
  padding: 10px;
  background: var(--button-bg, #523489);
  color: #fff;
  border-radius: 5px;
  font-size: 0.9em;
  left: 50%;
  transform: translateX(-50%);
}

.event.above {
  bottom: 60px;
  /* Your specified value */
}

.event.below {
  top: 60px;
  /* Your specified value */
}

.event-time {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.event-connector {
  width: 2px;
  height: 40px;
  /* Matches 60px gap */
  background: var(--button-bg, #523489);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.event.above .event-connector {
  bottom: -40px;
  /* Aligns with bottom: 60px */
}

.event.below .event-connector {
  top: -40px;
  /* Aligns with top: 60px */
}

/* Lock first event to left edge */
.day:first-child .event.above {
  left: 0;
  transform: translateX(0);
}

.purchase-card {
  padding: 30px;
  margin-bottom: 20px;
  border-radius: 16px;
  position: relative;
  min-height: 320px;
  width: 270px;
  max-width: 270px;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(124, 111, 220, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(26, 27, 32, 0.95);
  background: linear-gradient(135deg, rgba(88, 70, 255, 0.10) 0%, rgba(59, 130, 246, 0.05) 50%, rgba(147, 51, 234, 0.08) 100%),
    rgba(26, 27, 32, 0.95);
  border: 1px solid rgba(124, 111, 220, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.purchase-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(124, 111, 220, 0.3);
  border-color: rgba(124, 111, 220, 0.5);
}

/* Make access-card scale when parent purchase-card is hovered */
.purchase-card:hover .access-card {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(124, 111, 220, 0.3);
  border-color: rgba(124, 111, 220, 0.5);
}

/* Make stars pop when parent purchase-card is hovered */
.purchase-card:hover .access-card .fa-star {
  transform: scale(1.2);
  color: #9370db !important;
  /* Purple with subtle red tint */
  filter: drop-shadow(0 0 8px rgba(147, 51, 234, 0.8));
}

.access-card {
  border-radius: 16px;
  border: 1px solid rgba(124, 111, 220, 0.2);
  color: var(--text-primary);
  padding: 20px;
  text-align: center;
  width: 170px;
  max-width: 170px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  background: rgba(26, 27, 32, 0.95);
  background: linear-gradient(135deg, rgba(88, 70, 255, 0.10) 0%, rgba(59, 130, 246, 0.05) 50%, rgba(147, 51, 234, 0.08) 100%),
    rgba(26, 27, 32, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Individual star transition */
.access-card .fa-star {
  transition: transform 0.3s ease, color 0.3s ease, filter 0.3s ease;
}

/* Button Container Styling */
.button-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  width: 100%;
}

/* Left Buttons Styling */
.left-buttons {
  display: flex;
  gap: 10px;
}

/* Ensure Buttons Don’t Wrap and Fit Properly */
.btn,
.btn-secondary {
  padding: 10px 20px;
  font-size: 1em;
  line-height: 1.5;
  text-align: center;
  display: inline-block;
  box-sizing: border-box;
  white-space: nowrap;
}

/* Access Options Container - Desktop default */
.access-options {
  display: flex;
  gap: 25px;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  overflow-x: visible;
}

/* Purchase Button Styling - Ensure it stays within card bounds */
.purchase-btn {
  background: linear-gradient(90deg, #6B5FCF 0%, #8478E5 100%);
  color: #e6e6e6;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05em;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 60px);
  max-width: calc(100% - 60px);
  box-sizing: border-box;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(107, 95, 207, 0.2);
}

.purchase-btn:hover {
  background: linear-gradient(90deg, #8478E5 0%, #9B8FEE 100%);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 20px rgba(107, 95, 207, 0.4);
}

.purchase-btn:active {
  transform: translateX(-50%) translateY(0);
}

#timelineContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.timeline {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 600px;
  /* Adjust as needed to fit the card */
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.timeline-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #ccc;
  background-color: transparent;
  transition: background-color 0.5s ease-in-out, border-color 0.5s ease-in-out;
}

.timeline-step.completed .timeline-circle {
  background-color: var(--button-bg);
  border-color: var(--button-bg);
}

.timeline-line {
  width: 100px;
  /* Adjust length as needed */
  height: 4px;
  background-color: #ccc;
  transition: background-color 1s ease-in-out;
}

.timeline-line.completed {
  background-color: var(--button-bg);
}

.timeline-step i {
  font-size: 24px;
  margin-bottom: 10px;
}

.timeline-step p {
  margin-top: 10px;
  font-size: 14px;
}

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

  100% {
    transform: rotate(360deg);
  }
}

/* Exchange Section Spacing */
.exchange-section {
  margin-bottom: 32px !important;
}

/* Exchange Header Styling with Gradient */
.exchange-header {
  background: rgba(32, 33, 38, 0.9) !important;
  background: linear-gradient(135deg, rgba(88, 70, 255, 0.08) 0%, rgba(59, 130, 246, 0.04) 50%, rgba(147, 51, 234, 0.06) 100%),
    rgba(32, 33, 38, 0.9) !important;
  border: 1px solid rgba(107, 95, 207, 0.3) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.exchange-header:hover {
  background: rgba(32, 33, 38, 0.95) !important;
  background: linear-gradient(135deg, rgba(88, 70, 255, 0.10) 0%, rgba(59, 130, 246, 0.05) 50%, rgba(147, 51, 234, 0.08) 100%),
    rgba(32, 33, 38, 0.95) !important;
  border-color: rgba(107, 95, 207, 0.4) !important;
}

/* Exchange Content Background Fix */
.exchange-content {
  background: rgba(24, 25, 29, 0.9) !important;
  background: linear-gradient(135deg, rgba(88, 70, 255, 0.04) 0%, rgba(59, 130, 246, 0.02) 100%),
    rgba(24, 25, 29, 0.9) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0 0 12px 12px !important;
}

/* Setup Content Spacing and Readability */
.exchange-content h4 {
  margin-top: 32px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(107, 95, 207, 0.3);
  color: var(--text-primary);
  font-size: 1.2em;
}

.exchange-content h4:first-child {
  margin-top: 0;
}

.exchange-content ul,
.exchange-content ol {
  margin: 16px 0;
  padding-left: 24px;
  line-height: 1.8;
}

.exchange-content li {
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.exchange-content li strong {
  color: var(--text-primary);
}

.exchange-content li ul,
.exchange-content li ol {
  margin-top: 8px;
  margin-bottom: 8px;
}

.exchange-content li ul li,
.exchange-content li ol li {
  margin-bottom: 8px;
}

.exchange-content p {
  margin: 16px 0;
  line-height: 1.8;
}

/* Step List Spacing (no background frames) */
.exchange-content>ol>li {
  margin-bottom: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* General Step Card Spacing */
.step-card {
  margin-bottom: 32px;
  overflow: hidden;
}

.step-card h3 {
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(107, 95, 207, 0.3);
}

.step-card p {
  line-height: 1.8;
  margin-bottom: 16px;
}

.step-card ul,
.step-card ol {
  margin: 16px 0;
  padding-left: 28px;
  line-height: 1.8;
}

.step-card li {
  margin-bottom: 14px;
  color: var(--text-secondary);
}

.step-card li strong {
  color: var(--text-primary);
}

.step-card li ul,
.step-card li ol {
  margin-top: 10px;
  margin-bottom: 10px;
}

/* Button Container - Keep Desktop Layout */
.button-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  width: 100%;
}

.left-buttons {
  display: flex;
  gap: 10px;
}

/* Timeline Container - Keep Desktop Layout */
.timeline-container {
  padding: 145px 55px;
}

.event {
  width: 200px;
  font-size: 0.9em;
}

.day {
  min-width: 100px;
}

/* ====================================================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ==================================================================== */

/* Tablet Styles (768px - 1024px) */
@media screen and (max-width: 1024px) {
  .container {
    padding: 15px;
    margin: 15px auto;
  }

  /* Reduce card padding on tablets */
  .header,
  .card,
  .tabs,
  .sub-card,
  .step-card,
  .note-card {
    padding: 16px 20px;
    margin-bottom: 25px;
  }

  /* Make tabs wrap properly */
  .tabs,
  .code-tabs,
  .account-sub-tabs,
  .my-bot-sub-tabs,
  .fee-tabs {
    gap: 8px;
  }

  .tab-button,
  .code-tab-button,
  .account-tab-button,
  .my-bot-tab-button,
  .fee-tab-button {
    padding: 12px 20px;
    font-size: 1em;
  }

  /* Adjust generator layout */
  .generator-container {
    flex-direction: column;
  }

  .generator-form,
  .generator-output {
    width: 100%;
  }

  /* Adjust access options for tablet */
  .access-options {
    gap: 20px !important;
    flex-wrap: nowrap !important;
    justify-content: center;
  }

  .purchase-card {
    width: 230px !important;
    max-width: 230px !important;
    min-height: 300px !important;
  }

  .access-card {
    width: 145px !important;
    max-width: 145px !important;
  }

  /* Adjust flowchart */
  .flowchart {
    gap: 20px;
    padding: 20px;
  }

  .flow-item img {
    width: 60px;
    height: 60px;
  }

  /* Reduce font sizes slightly */
  h2 {
    font-size: 1.5em;
  }

  h3 {
    font-size: 1.3em;
  }
}

/* Mobile Styles (max-width: 768px) */
@media screen and (max-width: 768px) {
  .container {
    padding: 10px;
    margin: 10px auto;
  }

  /* Reduce card margins and padding */
  .header,
  .card,
  .tabs,
  .sub-card,
  .step-card,
  .note-card {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 12px;
  }

  /* Stack header content vertically */
  .header {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .header .header-container {
    flex-direction: column;
  }

  .header img.header-icon {
    width: 80px;
    margin-right: 0;
    margin-bottom: 10px;
  }

  .header .header-text {
    transform: none;
  }

  /* Make tabs stack and be touch-friendly */
  .tabs,
  .code-tabs,
  .account-sub-tabs,
  .fee-tabs {
    flex-direction: column;
    gap: 5px;
    border-bottom: none;
  }

  /* My Bot Sub-tabs mobile - keep button style but stack vertically */
  .my-bot-sub-tabs {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }

  .my-bot-sub-tabs .my-bot-tab-button {
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    justify-content: flex-start;
  }

  /* Category tabs mobile styles */
  .my-bot-category-tabs {
    flex-direction: column;
    gap: 5px;
    border-bottom: none;
  }

  .tab-button,
  .code-tab-button,
  .account-tab-button,
  .fee-tab-button,
  .my-bot-category-button {
    width: 100%;
    padding: 15px;
    font-size: 1em;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    border-left: 3px solid transparent;
  }

  .tab-button.active,
  .code-tab-button.active,
  .account-tab-button.active,
  .my-bot-tab-button.active,
  .fee-tab-button.active,
  .my-bot-category-button.active {
    border-bottom: 1px solid var(--border-color);
    border-left: 3px solid var(--tab-underline);
    transform: none;
    background: rgba(107, 95, 207, 0.1);
  }

  .tab-button:hover,
  .code-tab-button:hover,
  .account-tab-button:hover,
  .my-bot-tab-button:hover,
  .fee-tab-button:hover {
    transform: none;
    background: rgba(107, 95, 207, 0.05);
  }

  /* Make mini bot icon smaller on mobile */
  .tab-icon {
    width: 20px;
    height: 20px;
  }

  /* Stack flowchart vertically */
  .flowchart {
    flex-direction: column;
    gap: 20px;
    padding: 15px;
  }

  .flow-group {
    flex-direction: column;
    width: 100%;
  }

  .flow-arrow {
    transform: rotate(90deg);
    font-size: 28px;
    margin: 10px 0;
    height: auto;
    /* Reset height for vertical stack */
    display: block;
    text-align: center;
  }

  .flow-item {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex-shrink: 0;
  }

  .flow-item img {
    width: 60px;
    height: 60px;
  }

  .flow-item span {
    font-size: 0.85em;
  }

  /* Make generator stack vertically */
  .generator-container {
    flex-direction: column;
    gap: 15px;
  }

  .generator-form,
  .generator-output {
    width: 100%;
  }

  /* Responsive forms */
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="password"],
  select,
  textarea {
    padding: 10px 12px;
    font-size: 16px;
    /* Prevents zoom on iOS */
  }

  label {
    font-size: 0.95em;
  }

  /* Responsive buttons */
  .btn,
  .nav a.btn,
  .auth-links a.btn,
  .btn-delete,
  .btn-secondary,
  .purchase-btn {
    padding: 12px 18px;
    font-size: 0.95em;
    width: 100%;
    text-align: center;
  }

  /* Button containers stack vertically */
  .button-container {
    flex-direction: column;
    gap: 10px;
  }

  .left-buttons {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .left-buttons .btn,
  .left-buttons .btn-secondary {
    width: 100%;
  }

  /* Responsive tables */
  .credentials-table,
  .position-table,
  .grand-totals-table,
  .output-table {
    font-size: 0.85em;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  th,
  td {
    padding: 8px;
    font-size: 0.9em;
  }

  /* Reduce heading sizes */
  h1 {
    font-size: 1.3em;
  }

  h2 {
    font-size: 1.4em;
  }

  h3 {
    font-size: 1.2em;
  }

  h4 {
    font-size: 1em;
  }

  /* Access options container - enable horizontal scroll on mobile */
  .access-options {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 15px;
    gap: 20px !important;
    scroll-snap-type: x mandatory;
    justify-content: flex-start !important;
  }

  /* Adjust purchase cards to be wider and more attractive on mobile */
  .purchase-card {
    min-width: 260px !important;
    width: 260px !important;
    max-width: 260px !important;
    min-height: 360px !important;
    padding: 25px 20px 85px 20px !important;
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  .purchase-card h4 {
    font-size: 1em;
    margin-bottom: 10px !important;
  }

  /* Make access cards proportionally larger with better spacing */
  .access-card {
    width: 160px !important;
    max-width: 160px !important;
    padding: 20px !important;
    margin-bottom: 0 !important;
  }

  .access-card h4 {
    font-size: 1em !important;
    margin-bottom: 10px !important;
  }

  .access-card .fa-star {
    font-size: 0.95em;
  }

  .access-card p {
    font-size: 0.9em !important;
    margin: 10px 0 !important;
  }

  /* Override inline styles for stars container on mobile */
  .access-card>div:first-child {
    margin-bottom: 25px !important;
  }

  /* Ensure purchase button has proper spacing on mobile */
  .purchase-card .purchase-btn {
    bottom: 25px !important;
    font-size: 1em !important;
    padding: 14px 20px !important;
  }

  /* Add scroll hint for mobile purchase cards */
  .access-options::after {
    content: "← Swipe →";
    position: sticky;
    right: 0;
    display: block;
    text-align: center;
    font-size: 0.85em;
    color: var(--text-secondary);
    padding: 10px;
    margin-top: 10px;
    animation: fadeInOut 2s ease-in-out infinite;
  }

  @keyframes fadeInOut {

    0%,
    100% {
      opacity: 0.3;
    }

    50% {
      opacity: 0.8;
    }
  }

  /* Timeline responsive */
  .timeline-container {
    padding: 80px 20px;
  }

  .timeline {
    flex-direction: column;
    gap: 30px;
  }

  .timeline-line {
    display: none;
    /* Hide horizontal line on mobile */
  }

  .day {
    width: 100%;
    min-width: auto;
  }

  .day-label {
    transform: none;
    position: relative;
    margin-bottom: 15px;
  }

  .event {
    position: relative;
    width: 100%;
    max-width: 100%;
    left: 0;
    transform: none;
    top: 0 !important;
    bottom: 0 !important;
    margin: 10px 0;
  }

  .event-connector {
    display: none;
  }

  /* Powered by section */
  .powered-by-container {
    flex-direction: column;
  }

  .powered-by-card {
    width: 100%;
    order: 0;
  }

  .welcome-text {
    order: 1;
  }

  /* Flowcard responsive */
  .flowcard {
    padding: 15px;
  }

  .flowcard h3 {
    font-size: 1.1em;
  }

  /* Exchange content spacing */
  .exchange-content h4 {
    font-size: 1.1em;
    margin-top: 24px;
  }

  .exchange-content ul,
  .exchange-content ol {
    padding-left: 20px;
  }

  /* Step card responsive */
  .step-card ul,
  .step-card ol {
    padding-left: 20px;
  }
}

/* Small Mobile Styles (max-width: 480px) */
@media screen and (max-width: 480px) {
  .container {
    padding: 8px;
    margin: 5px auto;
  }

  .header,
  .card,
  .tabs,
  .sub-card,
  .step-card,
  .note-card {
    padding: 12px;
    margin-bottom: 15px;
  }

  h1 {
    font-size: 1.2em;
  }

  h2 {
    font-size: 1.3em;
  }

  h3 {
    font-size: 1.1em;
  }

  .tab-button,
  .code-tab-button,
  .account-tab-button,
  .my-bot-tab-button,
  .fee-tab-button {
    padding: 12px;
    font-size: 0.95em;
  }

  .btn,
  .nav a.btn,
  .auth-links a.btn,
  .btn-delete,
  .btn-secondary,
  .purchase-btn {
    padding: 10px 15px;
    font-size: 0.9em;
  }

  .flow-item img {
    width: 50px;
    height: 50px;
  }

  .header img.header-icon {
    width: 60px;
  }

  th,
  td {
    padding: 6px;
    font-size: 0.85em;
  }
}

/* Glass Tab Buttons Override */
.my-bot-category-tabs .my-bot-category-button {}

.my-bot-category-tabs .my-bot-category-button.active {}

.my-bot-category-tabs .my-bot-category-button:hover {}

/* Fix for My Bot Sub-Tabs (Positions, PnL, Active Bot Time, etc) */
.my-bot-sub-tabs .my-bot-tab-button {}

.my-bot-sub-tabs .my-bot-tab-button:hover {}

.my-bot-sub-tabs .my-bot-tab-button.active {}

/* Navigation Modal Styles (Frosted Glass) */
.nav-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-modal-card {
  background: linear-gradient(135deg, rgba(32, 28, 45, 0.92) 0%, rgba(22, 20, 35, 0.95) 50%, rgba(45, 35, 65, 0.9) 100%);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(107, 95, 207, 0.3);
  border-radius: 16px;
  padding: 25px;
  width: 90%;
  max-width: 400px;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(107, 95, 207, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.nav-modal-title {
  color: #fff;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.4rem;
  font-weight: 600;
}

.nav-modal-text {
  color: #c5cad3;
  margin-bottom: 25px;
  line-height: 1.5;
  font-size: 1rem;
}

.nav-modal-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.nav-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.nav-btn-cancel {
  background: transparent;
  color: #b0b8c4;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-btn-confirm {
  background: linear-gradient(135deg, #6B5FCF 0%, #8478E5 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(107, 95, 207, 0.3);
}

.nav-btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(107, 95, 207, 0.5);
}

/* Pulldown Element Styling (Global Frost Glass) */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: rgba(15, 16, 19, 0.65) !important;
  /* Dark frost */
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px;
  color: #e6e6e6 !important;
  /* Standard white-ish */
  padding: 8px 30px 8px 12px;
  /* Extra padding for arrow */
  font-family: inherit;
  font-size: 0.95em;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23b0b8c4%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
  transition: all 0.3s ease;
}

select:hover,
select:focus {
  background-color: rgba(20, 21, 25, 0.8) !important;
  border-color: rgba(107, 95, 207, 0.5) !important;
  /* Purple highlight */
  outline: none;
  box-shadow: 0 0 0 2px rgba(107, 95, 207, 0.2);
}

select option {
  background-color: #16171b;
  /* Solid dark background for options (glass not supported in options) */
  color: #c5cad3;
}

select option:hover,
select option:focus,
select option:checked {
  background-color: rgba(107, 95, 207, 0.4) !important;
  background: linear-gradient(135deg, rgba(107, 95, 207, 0.4) 0%, rgba(134, 76, 222, 0.35) 100%);
  color: #ffffff !important;
}

/* Explicit override for Bot Output Filter Selects to ensure Glass Styling */
.filter-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-color: rgba(15, 16, 19, 0.65) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  color: #e6e6e6 !important;
  padding: 8px 30px 8px 12px !important;
  font-family: inherit !important;
  font-size: 0.95em !important;
  cursor: pointer !important;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23b0b8c4%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 10px !important;
  transition: all 0.3s ease !important;
}

.filter-select:hover,
.filter-select:focus {
  background-color: rgba(20, 21, 25, 0.8) !important;
  border-color: rgba(107, 95, 207, 0.5) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(107, 95, 207, 0.2) !important;
}

.filter-select option {
  background-color: #16171b !important;
  color: #c5cad3 !important;
}