/* --- SMOOTH SCROLL BEHAVIOR --- */
html {
  scroll-behavior: smooth;
}

/* --- GLOBAL & BASE STYLES --- */

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  color: #eee;
  background: radial-gradient(circle at 50% 0%, rgba(22, 51, 38, 0.4), transparent 60%), #181B24;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  margin-top: 0;
}

.app-wrapper {
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* --- SIDEBAR & NAVIGATION --- */
.sidebar {
  background: #1a2033;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  height: 100vh;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 8px rgba(0,0,0,0.12);
  padding: 1.4rem 0.5rem 1rem 0.5rem;
  font-family: 'Inter', sans-serif;
}
.sidebar-logo {
  width: 180px;
  margin: 0 auto 1.8rem auto;
  display: block;
  border-radius: 6px;
}
.sidebar-nav {
  flex: 1 1 auto;
  padding: 0;
  margin: 0;
  list-style: none;
}
.sidebar-nav li { width: 100%; }

.sidebar-link, .sidebar-dropdown-toggle, .sidebar-link-external {
  display: flex;
  align-items: center;
  gap: 1.0rem;
  padding: 0.95rem 1rem;
  color: #bfe4fa;
  font-size: 1.08em;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  transition: background .15s, color .15s;
  width: 100%;
  text-align: left;
  outline: none;
  border-left: 4px solid transparent;
  text-decoration: none;
  box-sizing: border-box;
}
.sidebar-link.selected,
.sidebar-dropdown-toggle.selected,
.sidebar-link:focus-visible,
.sidebar-dropdown-toggle:focus-visible,
.sidebar-link-external:focus-visible {
  background: #20263c;
  color: #fff;
  border-left: 4px solid #29B6F6;
  font-weight: bold;
}
.sidebar-link:hover,
.sidebar-dropdown-toggle:hover,
.sidebar-link-external:hover {
  background: #232a44;
  color: #fff;
}
.sidebar-link svg,
.sidebar-dropdown-toggle svg,
.sidebar-link-external svg {
  display: inline-block;
  width: 1.35em;
  height: 1.35em;
  vertical-align: middle;
  color: #29B6F6;
  flex-shrink: 0;
}
.sidebar-link-external:active {
  background: #20263c;
  color: #fff;
  border-left: 4px solid #29B6F6;
  font-weight: bold;
}
.dropdown-arrow {
  border: solid #bfe4fa;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  transition: transform 0.2s ease-in-out;
  margin-left: auto;
}
.sidebar-dropdown.is-open > .sidebar-dropdown-toggle .dropdown-arrow {
    transform: rotate(-135deg);
}
.sidebar-submenu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0,0,0,0.1);
}
.sidebar-dropdown.is-open > .sidebar-submenu {
    display: block;
}
.sidebar-submenu .sidebar-link {
    padding-left: 2.5rem;
    font-size: 1em;
}
.sidebar-submenu .sidebar-link.selected {
  color: #fff;
  font-weight: bold;
}
.premium-link {
    color: #FFD700;
}
.premium-link svg {
    color: #FFD700;
}
.premium-link:hover {
    color: #FFFFFF;
    background: #4d3800;
}
.premium-link.selected {
  color: #FFFFFF;
  background: #4d3800;
  border-left: 4px solid #FFD700 !important;
}

/* --- MAIN CONTENT AREA --- */
.main {
  min-width: 0;
  padding: 2rem 2rem 4em 0 !important;
  margin-left: 272px;
  overflow-y: auto;
  height: 100vh;
  transition: margin-left 0.2s;
}
.main h2 {
  margin-left: 0 !important;
  padding-left: 0 !important;
  margin-bottom: 0.5rem;
}
.subheader-note {
    font-size: 0.9em;
    color: #a0a0a0;
    margin-top: 0;
    margin-bottom: 2rem;
    font-style: italic;
}

/* --- HOMEPAGE STYLES --- */
.hero-section { text-align: center; padding: 8rem 2rem 6rem 2rem; }
.hero-section h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 0.5rem; color: #fff; font-weight: 700; }
.hero-section .subtitle { font-size: 1.25rem; color: #b0c4de; max-width: 600px; margin: 0 auto 2.5rem auto; }
.cta-buttons { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.btn { padding: 0.8rem 1.8rem; border-radius: 2rem; text-decoration: none; font-weight: 600; border: none; cursor: pointer; transition: all 0.3s ease; }
.btn-premium { background: #FFD700; color: #181B24; box-shadow: 0 4px 20px rgba(255, 215, 0, 0.2); }
.btn-premium:hover { transform: translateY(-3px); box-shadow: 0 6px 25px rgba(255, 215, 0, 0.4); }
.btn-discord { background-color: #5865F2; color: #fff; box-shadow: 0 4px 20px rgba(88, 101, 242, 0.2); }
.btn-discord:hover { transform: translateY(-3px); box-shadow: 0 6px 25px rgba(88, 101, 242, 0.3); }
.btn-readmore { background-color: transparent; color: #bfe4fa; border: 1px solid #4a4e5e; }
.btn-readmore:hover { background-color: #2e4a3d; border-color: #2e4a3d; }
.features-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; padding: 6rem 2rem; }
.feature-card { padding: 2.5rem 2rem; border-radius: 16px; text-align: center; background: rgba(42, 45, 58, 0.5); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); transition: all 0.3s ease; }
.feature-card:hover { transform: translateY(-8px); background: rgba(50, 53, 70, 0.7); }
.feature-card h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; font-size: 1.1rem; letter-spacing: 1px; }
.feature-card p { color: #a8b2d1; line-height: 1.6; font-size: 0.95rem; }
.feature-card a { color: #61dafb; text-decoration: none; font-weight: 600; margin-top: 1rem; display: inline-block; }
.feature-icon { width: 48px; height: 48px; color: #61dafb; }
.features-section .feature-card:nth-child(1) { background-color: rgba(30, 31, 42, 0.5); }
.features-section .feature-card:nth-child(2) { background-color: rgba(56, 58, 73, 0.5); }
.features-section .feature-card:nth-child(3) { background-color: rgba(220, 220, 220, 0.1); }
.features-section .feature-card:nth-child(4) { background-color: rgba(67, 95, 83, 0.3); }
.performance-section { padding: 6rem 2rem; text-align: center; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4rem; max-width: 1100px; margin: 0 auto 3rem auto; }
.stat-bubble { background: radial-gradient(circle, #2a2d3a, #232633); width: 100%; aspect-ratio: 1 / 1; border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 1rem; box-shadow: 0 10px 30px rgba(0,0,0,0.3); border: 1px solid rgba(255, 255, 255, 0.1); }
.stat-number { font-size: clamp(3rem, 8vw, 5rem); font-weight: 700; color: #4CAF50; }
.stat-label { font-size: 1.25rem; color: #a8b2d1; margin-top: 0.5rem; }
.btn-performance { color: #61dafb; font-size: 1.1rem; text-decoration: none; font-weight: 600; }
.blog-preview-section, .testimonials-section { padding: 6rem 2rem; border-top: 1px solid #2a2d3a; }
.blog-card, .testimonial-card { background-color: #1c1f2a; border-radius: 16px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.blog-card:hover, .testimonial-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.25); }
.blog-preview-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.blog-card { overflow: hidden; text-decoration: none; color: #eee; display: block; }
.blog-card img { width: 100%; height: auto; display: block; }
.blog-info { padding: 1.5rem; }
.blog-info p { font-size: 0.85rem; color: #a8b2d1; margin: 0 0 0.5rem 0; }
.blog-info h4 { margin: 0; font-size: 1.2rem; }
.testimonials-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.testimonial-card { padding: 2.5rem; text-align: center; position: relative; }
.testimonial-avatar { width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 1.5rem auto; border: 4px solid #61dafb; }
.testimonial-card h4 { margin-bottom: 1.5rem; }
.testimonial-card blockquote { margin: 0; padding: 0; font-style: italic; color: #b0b0b0; line-height: 1.7; border: none; }
.testimonial-card strong { color: #FFD700; font-style: normal; }
.quote-icon { font-family: Georgia, serif; font-size: 6rem; color: #61dafb; opacity: 0.05; position: absolute; bottom: 1rem; right: 1.5rem; }

/* --- SCROLL ANIMATION --- */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.show { opacity: 1; transform: translateY(0); }

/* --- TOOL PAGE SPECIFIC STYLES (TABULATOR, ETC.) --- */
.tabulator { background: #232633 !important; border-radius: 16px; box-shadow: 0 4px 24px rgba(41,182,246,0.07); font-size: 1.09em; color: #fff !important; border: none; border-left: none !important; }
.tabulator .tabulator-header { background: #25283a !important; border-bottom: 2px solid #29B6F6; color: #fff !important; font-weight: bold; font-size: 1.11em; }
.tabulator .tabulator-col { background: #25283a !important; color: #fff !important; border: none !important; }
.tabulator .tabulator-row { background: #232633 !important; color: #fff !important; transition: background 0.2s; }
.tabulator .tabulator-row.tabulator-selected, .tabulator .tabulator-row:hover { background: #323750 !important; }
.tabulator .tabulator-row:nth-child(even) { background: #20212a !important; }
.tabulator .tabulator-footer { background: #232633; color: #bfe4fa; border: none; }
.tabulator .tabulator-tableholder { border-radius: 0 0 16px 16px; }
.tabulator .tabulator-header .tabulator-col .tabulator-col-content { border-radius: 12px 12px 0 0; }
.tabulator .tabulator-col-title { color: #fff !important; }
.tabulator .tabulator-cell { border: none !important; color: #fff !important; }
.tabulator-header input, .tabulator-header select { background: #20212a !important; color: #fff !important; border: 1px solid #444; border-radius: 5px; }
.tabulator .tabulator-arrow { border-bottom: 4px solid #29B6F6 !important; }
.ror-ticker-cell { color: #29B6F6 !important; font-weight: bold; }
.rsi-blue { color: #0af !important; font-weight: bold; }
.rsi-red { color: #f65 !important; font-weight: bold; }
.ror-filter-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 1.7em; background: #232633; padding: 1.8em 1.4em; border-radius: 20px; box-shadow: 0 4px 24px rgba(41,182,246,0.11); max-width: 600px; margin: 0 0 2em 0; }
.ror-filter-label { font-size: 1.19em; font-weight: 700; color: #fff; margin-bottom: 0; margin-right: 6px; min-width: 48px; }
.slider-label-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.slider-label-row input[type="number"] { width: 72px; padding: 5px 8px; border-radius: 6px; border: 1px solid #232633; background: #181B24; color: #29B6F6; font-size: 1em; outline: none; }
.slider-label-row input[type="number"]:focus { border: 1.5px solid #29B6F6; background: #232633; }
.ror-filter-expiries { display: flex; flex-wrap: wrap; gap: 0.65em; margin-top: 0.25em; }
.ror-expiry-btn { background: #232633; color: #29B6F6; border: 2px solid #29B6F6; border-radius: 11px; padding: 8px 18px; font-size: 1.08em; font-weight: 500; cursor: pointer; transition: background 0.16s, color 0.16s, border 0.16s; margin-bottom: 3px; min-width: 90px; text-align: center; letter-spacing: 0.01em; }
.ror-expiry-btn.selected, .ror-expiry-btn:active { background: #29B6F6; color: #232633; font-weight: bold; border-color: #29B6F6; }
.ror-load-more-btn { display: block; width: 220px; margin: 2em 0 2.5em 0; padding: 0.9em 0; background: #29B6F6; color: #181B24; font-size: 1.13em; font-weight: 700; border: none; border-radius: 18px; cursor: pointer; transition: background 0.16s, color 0.16s; box-shadow: 0 2px 10px rgba(41,182,246,0.13); text-align: center; margin-left: 0; }
.ror-load-more-btn:hover, .ror-load-more-btn:active { background: #1ca6e3; color: #fff; }
.noUi-target { background: #181B24; border: 2px solid #29B6F6; box-shadow: none; }
.noUi-connect { background: #29B6F6; }
.noUi-handle { background: #29B6F6; border: 2px solid #232633; border-radius: 50%; box-shadow: 0 2px 7px #1115; cursor: pointer; }

/* --- AUTHENTICATION & ACCOUNT PAGE STYLES --- */
.auth-container { max-width: 450px; margin: 2rem auto; padding: 2rem 2.5rem; background-color: #1f2a37; border-radius: 12px; border: 1px solid #374151; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3); }
.auth-tabs { display: flex; margin-bottom: 1.5rem; background-color: #111827; border-radius: 8px; padding: 4px; }
.auth-tab { flex: 1; padding: 0.75rem 1rem; border: none; background-color: transparent; color: #9ca3af; font-size: 1rem; font-weight: 600; border-radius: 6px; cursor: pointer; transition: all 0.2s ease-in-out; }
.auth-tab.active { background-color: #374151; color: #ffffff; box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06); }
.auth-form h2 { text-align: center; margin-bottom: 0.5rem; font-size: 1.75rem; color: #ffffff; }
.auth-form p { text-align: center; color: #9ca3af; margin-bottom: 2rem; font-size: 0.95rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: #d1d5db; }
.form-group input { width: 100%; padding: 0.75rem 1rem; background-color: #374151; border: 1px solid #4b5563; border-radius: 6px; color: #ffffff; font-size: 1rem; box-sizing: border-box; transition: border-color 0.2s, box-shadow 0.2s; }
.form-group input:focus { outline: none; border-color: #facc15; box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.3); }
.auth-button { width: 100%; padding: 0.85rem 1rem; font-size: 1rem; font-weight: 700; color: #ffffff; background-color: #3b82f6; border: none; border-radius: 6px; cursor: pointer; transition: background-color 0.2s ease-in-out; }
.auth-button:hover { background-color: #2563eb; }
.error-message { color: #f87171; font-size: 0.875rem; text-align: center; margin-bottom: 1rem; min-height: 1.25rem; }
.hidden { display: none; }
.google-btn { width: 100%; padding: 0.75rem 1rem; font-size: 1rem; font-weight: 600; color: #ffffff; background-color: #374151; border: 1px solid #4b5563; border-radius: 6px; cursor: pointer; transition: background-color 0.2s; display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
.google-btn:hover { background-color: #4b5563; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.account-card { background-color: #1f2a37; border: 1px solid #374151; border-radius: 12px; padding: 1.5rem 2rem; display: flex; flex-direction: column; }
.account-card h3 { margin-top: 0; margin-bottom: 0.5rem; color: #ffffff; }
.account-card p { color: #9ca3af; margin-bottom: 1rem; }
.account-card .card-description { font-size: 0.9rem; flex-grow: 1; }
.tier-badge { background-color: #374151; color: #facc15; padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; text-transform: capitalize; }
.account-button, .account-button-danger { width: 100%; padding: 0.75rem 1rem; font-size: 0.95rem; font-weight: 600; border: none; border-radius: 6px; cursor: pointer; transition: background-color 0.2s; margin-top: auto; }
.account-button { color: #ffffff; background-color: #3b82f6; }
.account-button:hover { background-color: #2563eb; }
.account-button-danger { color: #ffffff; background-color: #ef4444; }
.account-button-danger:hover { background-color: #dc2626; }

/* --- PREMIUM / PRICING PAGE STYLES --- */
.pricing-toggle {
  display: flex;
  justify-content: center;
  background-color: #111827;
  border-radius: 8px;
  padding: 5px;
  max-width: 500px;
  margin: 0 auto 3rem auto;
}
.toggle-button {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background-color: transparent;
  color: #9ca3af;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}
.toggle-button.active {
  background-color: #374151;
  color: #ffffff;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06);
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  align-items: stretch;
  padding-left: 20px; /* Tweak 1: Add left padding */
}
.pricing-card {
  background-color: #1f2a37;
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease, filter 0.3s ease;
  position: relative;
}
.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.pricing-card h3 {
  color: #ffffff;
  font-size: 1.5rem;
}
.pricing-card .price {
  color: #3b82f6; /* Tweak 3: Default price color set to blue */
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0.5rem 0 0.25rem 0;
  height: 40px;
}
.pricing-card .price-subtext {
  font-size: 0.9rem;
  font-weight: 400;
  color: #9ca3af;
  height: 40px;
  margin: 0 0 1rem 0;
}
.pricing-card .card-description {
  color: #a8b2d1;
  line-height: 1.6;
  font-size: 0.95rem;
}
.subscribe-button {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1.1rem; /* Tweak 2: Increased font size */
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  margin-top: auto;
}
.pricing-card .subscribe-button {
  background-color: #3b82f6;
  color: #ffffff;
}
.pricing-card .subscribe-button:hover {
  background-color: #2563eb;
}
.pricing-card.featured {
  border: 2px solid #FFD700;
  transform: scale(1.03);
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.15);
}
.featured-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #FFD700;
  color: #181B24;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Tweak 3: Override for featured card price to keep it gold */
.pricing-card.featured .price {
  color: #FFD700;
}
.pricing-card.featured .subscribe-button {
  background-color: #FFD700;
  color: #181B24;
}
.pricing-card.featured .subscribe-button:hover {
  background-color: #e6c200;
}
.card-divider {
  border: none;
  border-top: 1px solid #374151;
  margin: 1.5rem 0;
}
.features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  text-align: left;
  flex-grow: 1;
}
.features-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  color: #d1d5db;
}
.features-list li:last-child {
  margin-bottom: 0;
}
.disabled-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(31, 42, 55, 0.8);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  justify-content: center;
  align-items: center;
  border-radius: 14px;
  padding: 2rem;
}
.pricing-card.disabled {
  filter: grayscale(80%);
  opacity: 0.6;
}
.pricing-card.disabled .disabled-overlay {
  display: flex;
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1200px) {
  .stats-grid {
    gap: 2rem;
    max-width: 100%;
    padding: 0 1rem;
  }
}

@media (max-width: 900px) {
  .sidebar { width: 180px; min-width: 180px; max-width: 180px; padding: 1rem 0.2rem 1rem 0.2rem; }
  .sidebar-logo { width: 140px; margin-bottom: 1rem; }
  .main { margin-left: 196px !important; }
  .stats-grid {
    gap: 1.5rem;
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  .stat-bubble {
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 800px) {
  .main { padding: 1rem !important; margin-left: 0 !important;}
  .ror-filter-panel { max-width: 100vw; border-radius: 0; }
  .slider-label-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .slider-label-row label { margin-bottom: 3px; }
  .stats-grid {
    padding: 0 0.5rem;
  }
  .stat-bubble {
    max-width: 280px;
  }
}