/**
 * Bot4Trade Signal Page Styles
 * Optimized for performance, accessibility, and modern design
 * Version: 2.0
 */

/* ============================================
   CSS Variables & Design Tokens
   ============================================ */
:root {
  /* Colors */
  --color-primary: #0b6b3a;
  --color-primary-dark: #094d2a;
  --color-accent: #d4af37;
  --color-accent-dark: #b89525;
  --color-text: #1a1a1a;
  --color-text-muted: #6b7280;
  --color-surface: #ffffff;
  --color-surface-alt: #f9fafb;
  --color-border: #e5e7eb;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  
  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-surface);
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ============================================
   Layout Components
   ============================================ */
.btf-root {
  min-height: 100vh;
  padding: var(--space-lg);
}

.btf-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.btf-container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ============================================
   Hero Section
   ============================================ */
.btf-hero {
  padding: var(--space-3xl) 0;
  background: linear-gradient(
    135deg,
    rgba(11, 107, 58, 0.03) 0%,
    rgba(249, 250, 251, 1) 100%
  );
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3xl);
  position: relative;
  overflow: hidden;
}

.btf-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(11, 107, 58, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.btf-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.btf-hero-content {
  text-align: center;
}

.btf-badge {
  display: inline-block;
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(
    90deg,
    rgba(11, 107, 58, 0.1),
    rgba(212, 175, 55, 0.05)
  );
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: 700;
  border-radius: 999px;
  margin-bottom: var(--space-md);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btf-hero-title {
  font-size: clamp(var(--font-size-2xl), 5vw, var(--font-size-4xl));
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1.1;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.btf-hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

.btf-hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.btf-disclaimer-badge {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  background: rgba(0, 0, 0, 0.03);
  border-radius: 999px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Hero Visual */
.btf-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.btf-visual-card {
  width: 100%;
  max-width: 400px;
  height: 200px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98),
    rgba(249, 250, 251, 0.95)
  );
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.btf-chart-icon {
  width: 80%;
  height: auto;
  opacity: 0.9;
}

/* ============================================
   Buttons
   ============================================ */
.btf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-base);
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  transition: all var(--transition-base);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  min-height: 44px; /* Touch target */
}

.btf-btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: white;
  box-shadow: var(--shadow-md);
}

.btf-btn-primary:hover,
.btf-btn-primary:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btf-btn-accent {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: white;
  box-shadow: var(--shadow-md);
}

.btf-btn-accent:hover,
.btf-btn-accent:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btf-btn-ghost {
  background: white;
  color: var(--color-primary);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.btf-btn-ghost:hover,
.btf-btn-ghost:focus {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

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

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

.btf-btn-block {
  width: 100%;
}

.btf-btn:focus-visible {
  outline: 3px solid rgba(11, 107, 58, 0.3);
  outline-offset: 2px;
}

/* ============================================
   Section Styling
   ============================================ */
.btf-signal-section,
.btf-plans-section,
.btf-faq-section,
.btf-legal-section {
  padding: var(--space-3xl) 0;
}

.btf-section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.btf-section-title {
  font-size: clamp(var(--font-size-xl), 4vw, var(--font-size-3xl));
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

.btf-section-lead {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Signal Card
   ============================================ */
.btf-signal-card {
  max-width: 800px;
  margin: 0 auto var(--space-2xl);
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.btf-signal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.btf-signal-header {
  padding: var(--space-lg);
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.btf-signal-header h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-primary);
}

.btf-signal-header time {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.btf-signal-body {
  padding: var(--space-xl);
  display: grid;
  gap: var(--space-lg);
}

.btf-signal-pair,
.btf-signal-decision {
  text-align: center;
}

.btf-label {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.btf-signal-pair strong {
  display: block;
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--color-text);
}

.btf-decision-value {
  display: inline-block;
  font-size: var(--font-size-3xl);
  font-weight: 900;
  color: var(--color-primary);
  padding: var(--space-sm) var(--space-xl);
  background: linear-gradient(
    135deg,
    rgba(11, 107, 58, 0.1),
    rgba(11, 107, 58, 0.05)
  );
  border-radius: var(--radius);
}

/* Confidence Bar */
.btf-signal-confidence {
  text-align: center;
}

.btf-confidence-bar {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 40px;
  background: var(--color-surface-alt);
  border-radius: var(--radius);
  overflow: hidden;
  margin: var(--space-sm) auto 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.btf-confidence-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-success)
  );
  transition: width var(--transition-slow);
  border-radius: var(--radius);
}

.btf-confidence-text {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-weight: 700;
  color: white;
  mix-blend-mode: difference;
  font-size: var(--font-size-lg);
}

.btf-signal-note {
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--space-md);
  background: var(--color-surface-alt);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
}

/* Important Notice */
.btf-important-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(16, 185, 129, 0.05);
  border-left: 4px solid var(--color-success);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

.btf-important-notice svg {
  flex-shrink: 0;
  color: var(--color-success);
  margin-top: 2px;
}

.btf-signal-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  padding-top: var(--space-md);
}

/* ============================================
   Packs
   ============================================ */
.btf-packs-wrapper {
  max-width: 500px;
  margin: 0 auto;
}

.btf-pack {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

.btf-pack:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.btf-pack-featured {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1), var(--shadow-lg);
}

.btf-pack-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.btf-pack-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--font-size-sm);
}

.btf-status-dot {
  width: 10px;
  height: 10px;
  background: var(--color-success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.btf-pack-meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-surface-alt);
  border-radius: var(--radius-sm);
}

.btf-pack-body {
  margin-bottom: var(--space-lg);
}

.btf-pack-price {
  font-size: var(--font-size-3xl);
  font-weight: 900;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.btf-pack-desc {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

/* Mini Chart */
.btf-mini-chart {
  height: 40px;
  width: 100%;
  color: var(--color-primary);
  opacity: 0.8;
  margin-top: var(--space-md);
}

.btf-mini-chart svg {
  width: 100%;
  height: 100%;
}

.btf-pack-actions {
  display: grid;
  gap: var(--space-sm);
}

/* ============================================
   Plans Grid
   ============================================ */
.btf-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto var(--space-xl);
}

.btf-plan {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  position: relative;
}

.btf-plan:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.btf-plan-featured {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1), var(--shadow-lg);
}

.btf-featured-badge {
  position: absolute;
  top: -12px;
  right: var(--space-lg);
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: 999px;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
}

.btf-plan-header {
  margin-bottom: var(--space-xl);
}

.btf-plan-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.btf-plan-pricing {
  text-align: left;
}

.btf-price-main {
  font-size: var(--font-size-2xl);
  font-weight: 900;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.btf-price-main span {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text-muted);
}

.btf-price-strike {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.btf-price-annual {
  font-size: var(--font-size-sm);
  color: var(--color-primary);
  font-weight: 600;
}

.btf-plan-features {
  list-style: none;
  margin-bottom: var(--space-xl);
}

.btf-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  color: var(--color-text);
  font-size: var(--font-size-sm);
}

.btf-plan-features svg {
  flex-shrink: 0;
  color: var(--color-success);
  margin-top: 2px;
}

.btf-plans-note {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   FAQ Section
   ============================================ */
.btf-faq-list {
  display: grid;
  gap: var(--space-md);
  max-width: 800px;
  margin: 0 auto;
}

.btf-faq-item {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}

.btf-faq-item:hover {
  box-shadow: var(--shadow-md);
}

.btf-faq-item[open] {
  box-shadow: var(--shadow-md);
}

.btf-faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  cursor: pointer;
  font-weight: 600;
  color: var(--color-primary);
  list-style: none;
  user-select: none;
}

.btf-faq-question::-webkit-details-marker {
  display: none;
}

.btf-faq-question:hover {
  background: var(--color-surface-alt);
}

.btf-faq-icon {
  flex-shrink: 0;
  transition: transform var(--transition-base);
  color: var(--color-primary);
}

.btf-faq-item[open] .btf-faq-icon {
  transform: rotate(45deg);
}

.btf-faq-answer {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--color-text);
  line-height: 1.7;
}

.btf-faq-answer p {
  margin: 0;
}

/* ============================================
   Legal Section
   ============================================ */
.btf-legal-section {
  background: var(--color-surface-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  margin-top: var(--space-3xl);
}

.btf-legal-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
  text-align: center;
}

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

.btf-legal-content p {
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-primary);
}

.btf-legal-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.btf-legal-links a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.btf-legal-links a:hover,
.btf-legal-links a:focus {
  color: var(--color-primary-dark);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (min-width: 768px) {
  .btf-hero-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .btf-hero-content {
    text-align: left;
  }
  
  .btf-hero-actions {
    justify-content: flex-start;
  }
  
  .btf-signal-body {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .btf-signal-confidence {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .btf-root {
    padding: var(--space-md);
  }
  
  .btf-container,
  .btf-container-narrow {
    padding: 0 var(--space-md);
  }
  
  .btf-hero {
    padding: var(--space-xl) 0;
  }
  
  .btf-signal-section,
  .btf-plans-section,
  .btf-faq-section,
  .btf-legal-section {
    padding: var(--space-xl) 0;
  }
  
  .btf-btn {
    width: 100%;
  }
  
  .btf-signal-actions,
  .btf-hero-actions {
    flex-direction: column;
  }
  
  .btf-pack-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible styles */
*:focus-visible {
  outline: 3px solid rgba(11, 107, 58, 0.5);
  outline-offset: 2px;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .btf-hero-visual,
  .btf-hero-actions,
  .btf-signal-actions,
  .btf-pack-actions,
  .btf-btn {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  .btf-signal-card,
  .btf-plan,
  .btf-pack {
    box-shadow: none;
    border: 1px solid #000;
  }
}