:root {
  --bg-primary: #070b13;
  --bg-secondary: #0d1525;
  --bg-card: #121c31;
  --bg-card-alt: #17243e;
  --bg-hover: #1e2e4f;
  --border-color: #1f3050;
  --border-light: #2c426e;
  --border-glow: rgba(6, 182, 212, 0.4);
  
  --accent-cyan: #06b6d4;
  --accent-cyan-light: #67e8f9;
  --accent-green: #10b981;
  --accent-green-light: #34d399;
  --accent-purple: #8b5cf6;
  --accent-purple-light: #a78bfa;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  padding: 20px 16px 40px;
  min-height: 100vh;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(6, 182, 212, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(139, 92, 246, 0.08), transparent);
  background-attachment: fixed;
}

/* Required CSS rules */
input, select, textarea {
  min-width: 0;
}

.lang-switcher {
  flex-shrink: 0;
  display: flex;
  gap: 4px;
  background-color: var(--bg-hover);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #f8fafc 30%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* App Container */
.app-container {
  max-width: 1240px;
  margin: 0 auto;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

.brand-text {
  min-width: 0;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan-light);
  background: rgba(6, 182, 212, 0.08);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(6, 182, 212, 0.25);
  white-space: nowrap;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* Hero Banner */
.hero-banner {
  background: linear-gradient(135deg, rgba(13, 21, 37, 0.9) 0%, rgba(18, 28, 49, 0.8) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green), var(--accent-purple));
}

.hero-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-green-light);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.hero-title .glow-cyan {
  color: var(--accent-cyan-light);
  text-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}

.hero-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 980px;
}

/* Stats Row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.stat-value.green { color: var(--accent-green-light); }
.stat-value.cyan { color: var(--accent-cyan-light); }
.stat-value.purple { color: var(--accent-purple-light); }
.stat-value.amber { color: var(--accent-amber); }

/* Affiliate Recommendations Bar */
.affiliate-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.affiliate-card {
  background: linear-gradient(135deg, rgba(18, 28, 49, 0.9) 0%, rgba(23, 36, 62, 0.8) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.affiliate-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow);
}

.affiliate-card.card-vpn {
  border-left: 4px solid var(--accent-cyan);
}

.affiliate-card.card-bybit {
  border-left: 4px solid var(--accent-green);
}

.aff-content {
  min-width: 0;
}

.aff-tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan-light);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.aff-tag.tag-bybit {
  color: var(--accent-green-light);
}

.aff-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.aff-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.aff-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-aff {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #2563eb 100%);
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-aff:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

.btn-aff-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-aff-green:hover {
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.btn-aff-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

.btn-aff-outline:hover {
  background: var(--bg-hover);
  border-color: var(--accent-cyan);
}

/* Navigation Tabs */
.mode-tabs {
  display: flex;
  gap: 8px;
  background-color: var(--bg-secondary);
  padding: 6px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 22px;
  overflow-x: auto;
}

.mode-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mode-tab:hover {
  color: var(--text-primary);
  background-color: var(--bg-card);
}

.mode-tab.active {
  background: linear-gradient(135deg, var(--bg-card-alt) 0%, #1e293b 100%);
  color: var(--accent-cyan-light);
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tab-icon {
  font-size: 1.1rem;
}

/* Controls Bar */
.controls-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.controls-row-top {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.search-box:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.search-icon {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.search-box input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
}

.select-filter {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.select-filter:focus {
  border-color: var(--accent-cyan);
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pill {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.pill:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
}

.pill.active {
  background-color: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan-light);
}

/* Grid & Cards for Matrix */
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.service-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
}

.service-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.service-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-card-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.service-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.service-cat-badge {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.discount-badge {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-green-light);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.pricing-comparison-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.price-row:last-child {
  margin-bottom: 0;
}

.price-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-value-bench {
  font-size: 0.9rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-value-hacked {
  font-size: 1.15rem;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--accent-green-light);
}

.hacked-country-tag {
  font-size: 0.72rem;
  color: var(--accent-cyan-light);
  font-family: var(--font-mono);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.savings-highlight {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px dashed var(--border-color);
  font-size: 0.78rem;
}

.savings-highlight .annual-save {
  color: var(--accent-amber);
  font-weight: 700;
  font-family: var(--font-mono);
}

/* Regional matrix popover / drawer inside card */
.card-details-box {
  background: rgba(10, 15, 26, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 14px;
  font-size: 0.8rem;
}

.detail-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.detail-line:last-child {
  margin-bottom: 0;
}

.difficulty-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.diff-easy {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.diff-med {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.diff-hard {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.bypass-tip {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.bypass-tip strong {
  color: var(--accent-cyan-light);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.btn-card-action {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-card-action.btn-subscribe {
  background: var(--bg-hover);
  color: var(--accent-cyan-light);
  border: 1px solid var(--border-light);
}

.btn-card-action.btn-subscribe:hover {
  background: var(--border-light);
  color: #fff;
}

.btn-card-action.btn-add-calc {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #2563eb 100%);
  color: #fff;
}

.btn-card-action.btn-add-calc:hover {
  filter: brightness(1.15);
}

/* Matrix Table View */
.table-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.table-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.table-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  white-space: nowrap;
}

.matrix-table th {
  background-color: var(--bg-card);
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.matrix-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(31, 48, 80, 0.5);
  font-family: var(--font-mono);
}

.matrix-table tr:hover td {
  background-color: rgba(6, 182, 212, 0.04);
}

.matrix-table .col-name {
  font-family: var(--font-sans);
  font-weight: 600;
  color: #fff;
}

.matrix-table .col-best {
  color: var(--accent-green-light);
  font-weight: 700;
}

/* Calculator View */
.calc-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.calc-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.calc-tile {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.calc-tile::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.calc-tile.tile-home::after { background: var(--accent-red); }
.calc-tile.tile-hacked::after { background: var(--accent-cyan); }
.calc-tile.tile-saved::after { background: var(--accent-green); }
.calc-tile.tile-compound::after { background: var(--accent-purple); }

.tile-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.tile-value {
  font-size: 1.55rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1.2;
}

.tile-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Student Exemption Bar in Calculator */
.student-toggle-bar {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.student-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.student-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.student-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-purple-light);
  margin-bottom: 2px;
}

.student-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.switch-label {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

.switch-label input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-hover);
  border: 1px solid var(--border-light);
  transition: 0.3s;
  border-radius: 26px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
  border-color: var(--accent-cyan);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* Calculator Checklist Grid */
.checklist-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.checklist-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist-actions {
  display: flex;
  gap: 8px;
}

.btn-mini {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-mini:hover {
  background: var(--bg-hover);
  color: #fff;
  border-color: var(--border-light);
}

.calc-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.calc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.calc-item:hover {
  border-color: var(--border-light);
  background: var(--bg-card-alt);
}

.calc-item.selected {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
}

.calc-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.calc-item-info {
  flex: 1;
  min-width: 0;
}

.calc-item-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calc-item-prices {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  margin-top: 2px;
}

.calc-price-orig {
  color: var(--text-muted);
  text-decoration: line-through;
}

.calc-price-hacked {
  color: var(--accent-green-light);
  font-weight: 700;
}

/* Selected Breakdown Table */
.breakdown-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

/* Playbook / Guides View */
.playbook-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.playbook-hero {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.playbook-hero h2 {
  font-size: 1.25rem;
  color: var(--accent-cyan-light);
  margin-bottom: 6px;
}

.playbook-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.playbook-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
  transition: all 0.25s ease;
}

.playbook-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-cyan-light);
  background: rgba(6, 182, 212, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(6, 182, 212, 0.25);
  margin-bottom: 12px;
}

.playbook-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.playbook-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.playbook-code-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-green-light);
  line-height: 1.5;
  margin-bottom: 12px;
  overflow-x: auto;
}

.playbook-checklist {
  list-style: none;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.playbook-checklist li {
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.playbook-checklist li span.icon {
  color: var(--accent-cyan-light);
  font-weight: bold;
}

/* Student Exemption Vault View */
.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.student-perk-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.perk-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.perk-badge-free {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--accent-green-light);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
}

.perk-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.perk-value {
  font-size: 0.82rem;
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-weight: 600;
  margin-bottom: 8px;
}

.perk-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.perk-req {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--accent-purple-light);
  margin-bottom: 14px;
}

/* Defense Card Callout */
.defense-box {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  text-align: center;
  margin-top: 10px;
}

.defense-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-cyan-light);
  margin-bottom: 6px;
}

.defense-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 16px;
}

/* Portal Footer & Disclaimer */
.portal-footer {
  text-align: center;
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.portal-backlink {
  color: var(--accent-cyan-light);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.portal-backlink:hover {
  background: var(--bg-hover);
  border-color: var(--accent-cyan);
  text-decoration: none;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.portal-disclaimer {
  max-width: 960px;
  margin: 18px auto 0 auto;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.6;
  text-align: center;
  padding: 14px 18px;
  background: rgba(13, 21, 37, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .affiliate-section {
    grid-template-columns: 1fr;
  }
  .calc-dashboard {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    padding: 12px 10px 30px;
  }
  .header {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  .controls-row-top {
    flex-direction: column;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .calc-dashboard {
    grid-template-columns: 1fr;
  }
  .mode-tabs {
    justify-content: flex-start;
  }
  .matrix-grid {
    grid-template-columns: 1fr;
  }
  .calc-cards-grid {
    grid-template-columns: 1fr;
  }
  .affiliate-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .aff-buttons {
    width: 100%;
  }
  .btn-aff {
    flex: 1;
    justify-content: center;
  }
  .student-toggle-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
