/* ============================================
   Polymarket AI Quantitative Agent Landing Page
   Dark Hacker / Cyberpunk Terminal Theme
   ============================================ */

/* --- CSS Variables / Design Tokens --- */
:root {
  --bg-primary: #0B0E14;
  --bg-card: #161B22;
  --bg-card-hover: #1C2129;
  --border-color: #30363D;
  --border-glow: #30363D;
  --neon-green: #00FF88;
  --neon-green-dim: rgba(0, 255, 136, 0.15);
  --neon-green-glow: rgba(0, 255, 136, 0.4);
  --crypto-gold: #F0B90B;
  --crypto-gold-dim: rgba(240, 185, 11, 0.2);
  --crypto-gold-glow: rgba(240, 185, 11, 0.5);
  --text-primary: #E6EDF3;
  --text-secondary: #8B949E;
  --text-muted: #6E7681;
  --error-red: #F85149;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-card: 12px;
  --radius-btn: 8px;
  --radius-input: 6px;
  --shadow-neon: 0 0 20px rgba(0, 255, 136, 0.15);
  --shadow-gold: 0 0 20px rgba(240, 185, 11, 0.2);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.6);
  --transition-base: cubic-bezier(0.4, 0, 0.2, 1);
  --section-gap: 80px;
  --card-padding: 24px;
  --element-gap: 16px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Background grid pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--neon-green);
  text-decoration: none;
}

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

/* --- Utility --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.section {
  padding: var(--section-gap) 0;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-title span {
  color: var(--neon-green);
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--neon-green);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo .accent {
  color: var(--crypto-gold);
}

.api-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.api-status .status-item {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.api-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon-green);
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--neon-green); }
  50% { opacity: 0.5; box-shadow: 0 0 8px var(--neon-green); }
}

.header-right {
  display: flex;
  align-items: center;
}

.lang-toggle {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 0.2s var(--transition-base);
  white-space: nowrap;
}

.lang-toggle:hover {
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: var(--shadow-neon);
}

.lang-toggle.active {
  background: rgba(0, 255, 136, 0.1);
  border-color: var(--neon-green);
  color: var(--neon-green);
}

/* --- Hero Section --- */
.hero {
  padding-top: 120px;
  padding-bottom: var(--section-gap);
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--neon-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title .gold {
  background: linear-gradient(135deg, var(--crypto-gold) 0%, #FFD54F 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-weight: 400;
}

.hero-subtitle .highlight {
  color: var(--neon-green);
  font-weight: 600;
}

/* Video Player */
.video-wrapper {
  position: relative;
  max-width: 800px;
  margin: 0 auto 24px;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow:
    0 0 30px rgba(0, 255, 136, 0.1),
    0 0 60px rgba(0, 255, 136, 0.05),
    var(--shadow-card);
  transition: box-shadow 0.3s var(--transition-base);
}

.video-wrapper:hover {
  box-shadow:
    0 0 40px rgba(0, 255, 136, 0.2),
    0 0 80px rgba(0, 255, 136, 0.08),
    var(--shadow-card-hover);
}

.video-container {
  position: relative;
  width: 100%;
  background: #0D1117;
  line-height: 0;
}

.hero-video {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 1256 / 720;
  position: relative;
  z-index: 1;
}

.video-container .scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 136, 0.02) 2px,
    rgba(0, 255, 136, 0.02) 4px
  );
  pointer-events: none;
  z-index: 2;
}

/* Video Countdown Overlay */
.video-countdown {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  background: rgba(11, 14, 20, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--neon-green);
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.video-countdown .countdown-label {
  letter-spacing: 0.05em;
}

.video-countdown .countdown-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-green);
  animation: pulse-dot 1.5s infinite;
}

/* Progress bar at bottom of video */
.video-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--neon-green);
  z-index: 3;
  transition: width 0.25s linear;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.video-hint {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-input);
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: not-allowed;
  transition: all 0.4s var(--transition-base);
  position: relative;
  outline: none;
}

.video-hint .hint-text {
  flex: 1;
  text-align: center;
}

.video-hint .hint-timer {
  font-weight: 700;
  color: var(--text-muted);
  min-width: 42px;
  text-align: right;
  transition: color 0.3s;
}

.video-hint .hint-arrow {
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.3s var(--transition-base);
  color: var(--neon-green);
  font-size: 1rem;
}

/* Unlocked / ready state */
.video-hint.unlocked {
  cursor: pointer;
  border-color: var(--neon-green);
  color: var(--neon-green);
  background: rgba(0, 255, 136, 0.06);
  box-shadow:
    0 0 20px rgba(0, 255, 136, 0.15),
    0 0 40px rgba(0, 255, 136, 0.08);
  animation: hint-glow 2s infinite;
}

.video-hint.unlocked .hint-timer {
  color: var(--neon-green);
}

.video-hint.unlocked .hint-arrow {
  opacity: 1;
  transform: translateX(0);
  animation: arrow-bounce 1.2s infinite;
}

.video-hint.unlocked:hover {
  background: rgba(0, 255, 136, 0.12);
  box-shadow:
    0 0 28px rgba(0, 255, 136, 0.25),
    0 0 56px rgba(0, 255, 136, 0.1);
  transform: translateY(-1px);
}

@keyframes hint-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.15), 0 0 40px rgba(0, 255, 136, 0.08); }
  50% { box-shadow: 0 0 28px rgba(0, 255, 136, 0.25), 0 0 56px rgba(0, 255, 136, 0.12); }
}

@keyframes arrow-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}
}

.video-hint .icon {
  color: var(--crypto-gold);
}

/* --- Terminal Section --- */
.terminal-section {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 255, 136, 0.02) 50%, transparent 100%);
}

.terminal-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 32px;
  max-width: 700px;
  margin: 0 auto;
}

.terminal-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.terminal-panel-header .dot-row {
  display: flex;
  gap: 6px;
}

.terminal-panel-header .dot-row span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-panel-header .dot-row span:nth-child(1) { background: #F85149; }
.terminal-panel-header .dot-row span:nth-child(2) { background: #F0B90B; }
.terminal-panel-header .dot-row span:nth-child(3) { background: #00FF88; }

.terminal-panel-header .title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-left: 8px;
}

/* Strategy Selector */
.strategy-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.strategy-btn {
  flex: 1;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s var(--transition-base);
  text-align: center;
}

.strategy-btn:hover {
  border-color: var(--neon-green);
  color: var(--text-primary);
}

.strategy-btn.active {
  background: rgba(0, 255, 136, 0.08);
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: var(--shadow-neon);
}

/* Sliders */
.slider-group {
  margin-bottom: 20px;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.slider-label .name {
  color: var(--text-secondary);
}

.slider-label .value {
  color: var(--neon-green);
  font-weight: 600;
  min-width: 50px;
  text-align: right;
}

.slider-track {
  position: relative;
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--neon-green);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
  transition: all 0.15s var(--transition-base);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300FF88' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.5);
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--neon-green);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

/* Deploy Button */
.deploy-btn {
  width: 100%;
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid var(--neon-green);
  border-radius: var(--radius-btn);
  color: var(--neon-green);
  cursor: pointer;
  transition: all 0.2s var(--transition-base);
  margin-top: 8px;
}

.deploy-btn:hover {
  background: rgba(0, 255, 136, 0.18);
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.25);
  transform: translateY(-1px);
}

.deploy-btn:active {
  transform: translateY(0);
}

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

/* Terminal Console */
.terminal-console {
  margin-top: 24px;
  background: #0D1117;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-input);
  padding: 20px;
  min-height: 180px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.8;
  color: var(--neon-green);
  display: none;
  overflow: hidden;
}

.terminal-console.visible {
  display: block;
  animation: fadeInUp 0.3s var(--transition-base);
}

.terminal-line {
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.2s var(--transition-base);
}

.terminal-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.terminal-line .prefix {
  color: var(--text-muted);
}

.terminal-line .ok {
  color: var(--neon-green);
  font-weight: 700;
}

.terminal-line .warn {
  color: var(--crypto-gold);
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--neon-green);
  animation: blink-cursor 0.8s infinite;
  vertical-align: middle;
  margin-left: 2px;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.visible {
  display: flex;
  animation: fadeIn 0.3s var(--transition-base);
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--neon-green);
  border-radius: var(--radius-card);
  padding: 40px 32px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 0 40px rgba(0, 255, 136, 0.15),
    var(--shadow-card);
  animation: scaleIn 0.3s var(--transition-base);
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--neon-green);
}

.modal-rewards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.modal-reward-item {
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: var(--radius-input);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.modal-reward-item .reward-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.modal-reward-item .reward-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.modal-reward-item .reward-amount {
  color: var(--crypto-gold);
  font-weight: 700;
  font-size: 1rem;
}

.modal-reward-item .reward-desc {
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.modal-cta {
  width: 100%;
  padding: 14px 24px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  background: var(--crypto-gold);
  border: none;
  border-radius: var(--radius-btn);
  color: #0B0E14;
  cursor: pointer;
  transition: all 0.2s var(--transition-base);
  margin-top: 8px;
}

.modal-cta:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}

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

/* --- Claim Form Modal --- */
.modal-form {
  max-width: 440px;
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

.claim-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s var(--transition-base), box-shadow 0.2s var(--transition-base);
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.form-input:focus {
  border-color: var(--neon-green);
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.form-input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.1);
}

.form-error {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--error);
  min-height: 16px;
}

.claim-submit-btn {
  width: 100%;
  padding: 14px 24px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  background: var(--crypto-gold);
  border: none;
  border-radius: var(--radius-btn);
  color: #0B0E14;
  cursor: pointer;
  transition: all 0.2s var(--transition-base);
  margin-top: 8px;
}

.claim-submit-btn:hover {
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.claim-submit-btn:active {
  transform: translateY(0);
}

/* --- Strategy Cards --- */
.cards-section {
  /* inherits section styles */
}

.strategy-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.strategy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: all 0.3s var(--transition-base);
}

.strategy-card:hover {
  border-color: rgba(0, 255, 136, 0.3);
  box-shadow: var(--shadow-neon);
}

.strategy-card.expanded {
  border-color: var(--neon-green);
  box-shadow: 0 0 25px rgba(0, 255, 136, 0.12);
}

.card-header {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  user-select: none;
}

.card-header-left {
  flex: 1;
  min-width: 0;
}

.card-engine-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 8px;
}

.card-engine-tag.rust {
  background: rgba(0, 255, 136, 0.1);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.card-engine-tag.python {
  background: rgba(240, 185, 11, 0.1);
  color: var(--crypto-gold);
  border: 1px solid rgba(240, 185, 11, 0.3);
}

.card-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.card-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.card-preview .stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-preview .stat-value {
  color: var(--neon-green);
  font-weight: 600;
}

.card-preview .stat-value.gold {
  color: var(--crypto-gold);
}

.card-arrow {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  transition: all 0.3s var(--transition-base);
  flex-shrink: 0;
}

.strategy-card.expanded .card-arrow {
  transform: rotate(180deg);
  color: var(--neon-green);
  background: rgba(0, 255, 136, 0.1);
}

.card-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--transition-base), opacity 0.3s var(--transition-base);
}

.strategy-card.expanded .card-body {
  max-height: 800px;
  opacity: 1;
}

.card-body-inner {
  padding: 0 24px 24px;
  border-top: 1px solid var(--border-color);
}

.card-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.card-detail-item {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-input);
  padding: 14px;
}

.card-detail-item .detail-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.card-detail-item .detail-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.card-detail-item .detail-value .highlight {
  color: var(--neon-green);
}

.card-detail-item .detail-value .gold {
  color: var(--crypto-gold);
}

/* Trade log */
.trade-log {
  margin-top: 16px;
  background: #0D1117;
  border-radius: var(--radius-input);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--text-secondary);
  overflow-x: auto;
}

.trade-log .log-line {
  white-space: nowrap;
}

.trade-log .log-line .profit {
  color: var(--neon-green);
  font-weight: 600;
}

.trade-log .log-line .time {
  color: var(--text-muted);
}

/* Chart placeholder */
.mini-chart {
  margin-top: 16px;
  background: #0D1117;
  border-radius: var(--radius-input);
  padding: 16px;
  position: relative;
  height: 120px;
  overflow: hidden;
}

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

/* --- Security Section --- */
.security-section {
  text-align: center;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.security-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 28px 20px;
  transition: all 0.3s var(--transition-base);
}

.security-item:hover {
  border-color: rgba(0, 255, 136, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-neon);
}

.security-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: rgba(0, 255, 136, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.security-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--neon-green);
  margin-bottom: 8px;
}

.security-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Bottom CTA --- */
.bottom-cta {
  text-align: center;
  padding-bottom: 100px;
}

.cta-btn {
  display: inline-block;
  padding: 18px 40px;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--crypto-gold);
  border: none;
  border-radius: var(--radius-btn);
  color: #0B0E14;
  cursor: pointer;
  transition: all 0.2s var(--transition-base);
  text-decoration: none;
}

.cta-btn:hover {
  box-shadow: 0 0 30px rgba(240, 185, 11, 0.35);
  transform: translateY(-2px);
}

.cta-subtext {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cta-subtext span {
  margin: 0 6px;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 24px 20px;
  border-top: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --section-gap: 48px;
    --card-padding: 16px;
  }

  .hero-title {
    font-size: 1.65rem;
  }

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

  .api-status {
    display: none;
  }

  .strategy-selector {
    flex-direction: column;
  }

  .security-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card-detail-grid {
    grid-template-columns: 1fr;
  }

  .card-preview {
    flex-direction: column;
    gap: 6px;
  }

  .terminal-panel {
    padding: 20px 16px;
  }

  .modal-content {
    padding: 28px 20px;
  }

  .cta-btn {
    padding: 16px 28px;
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .play-btn {
    width: 56px;
    height: 56px;
  }

  .play-btn svg {
    width: 22px;
    height: 22px;
  }
}

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

  .header-inner {
    gap: 8px;
  }

  .logo {
    font-size: 1rem;
  }

  .lang-toggle {
    font-size: 0.72rem;
    padding: 5px 10px;
  }
}
