/* ==========================================================================
   PATREON & YOUTUBE STRATEGY DASHBOARD - MODERN GLASSMORPHIC DARK DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg-color: #0b0d17;
  --panel-bg: rgba(22, 27, 46, 0.85);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1; /* Increased contrast from #94a3b8 */
  
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.35);
  --accent-pink: #ec4899;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-red: #ef4444;

  --sidebar-width: 280px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans Thai', 'Kanit', 'Plus Jakarta Sans', sans-serif;
  line-height: 1.65; /* Requirement 2: line-height 1.65 */
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-size: 15px; /* Requirement 3: Increased font size */
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Glow Effects */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  pointer-events: none;
}
.glow-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-purple-glow);
  top: -100px;
  left: -100px;
}
.glow-2 {
  width: 450px;
  height: 450px;
  background: rgba(236, 72, 153, 0.2);
  bottom: -100px;
  right: -50px;
}
.glow-3 {
  width: 400px;
  height: 400px;
  background: rgba(59, 130, 246, 0.15);
  top: 40%;
  left: 30%;
}

/* App Container Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(15, 20, 36, 0.85);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--panel-border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
  padding: 0 8px;
}
.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 6px 20px var(--accent-purple-glow);
}
.brand-text h2 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}
.brand-text span {
  font-size: 12px;
  color: var(--accent-pink);
  font-weight: 600;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}
.nav-item i {
  font-size: 16px;
  width: 20px;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.25), rgba(236, 72, 153, 0.15));
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--panel-border);
}
.badge-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.1);
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Main Content Styles */
.main-content {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  padding: 32px 40px;
  max-width: 1400px;
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.header-title h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.header-title p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}
.header-actions {
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  color: #fff;
  box-shadow: 0 4px 18px var(--accent-purple-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5);
}
.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.full-width {
  width: 100%;
  justify-content: center;
  margin-top: 16px;
}

/* Tab Management */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-content.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Glass Panel Component */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.glass-panel h3 {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Badges */
.badge {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge.purple { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; }

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.metric-card {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
}
.metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
}
.metric-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.metric-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.metric-icon.orange { background: rgba(245, 158, 11, 0.15); color: var(--accent-gold); }
.metric-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.metric-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }

.metric-label {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
}
.metric-value {
  font-size: 24px;
  font-weight: 700;
  margin: 2px 0;
}
.metric-value.highlight {
  color: var(--accent-green);
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}
.metric-sub {
  font-size: 12px;
  color: var(--text-muted);
}
.text-success { color: var(--accent-green) !important; }
.text-danger { color: var(--accent-red) !important; }
.text-purple { color: var(--accent-purple) !important; }
.text-orange { color: var(--accent-gold) !important; }
.text-blue { color: var(--accent-blue) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Calculator Grid */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 992px) {
  .calculator-grid { grid-template-columns: 1fr; }
}

.input-group {
  margin-bottom: 20px;
}
.input-group label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.val-badge {
  color: var(--accent-purple);
  font-weight: 700;
  background: rgba(139, 92, 246, 0.15);
  padding: 2px 10px;
  border-radius: 12px;
}
input[type="range"] {
  width: 100%;
  accent-color: var(--accent-purple);
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  cursor: pointer;
}
.custom-num-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
}

.result-box {
  background: linear-gradient(145deg, rgba(26, 31, 56, 0.9), rgba(15, 20, 36, 0.95));
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
}
.res-title {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.res-main {
  font-size: 38px;
  font-weight: 800;
  color: var(--accent-green);
  margin-top: 6px;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}
.res-usd {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
}
.divider {
  border: 0;
  height: 1px;
  background: var(--panel-border);
  margin: 20px 0;
}
.res-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.break-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
}
.break-item strong { color: var(--text-main); }
.highlight-row {
  background: rgba(16, 185, 129, 0.1);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.highlight-row span { color: var(--accent-green); font-weight: 600; }
.highlight-row strong { color: var(--accent-green); font-size: 16px; }

/* Two Col Grid */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 992px) {
  .two-col-grid { grid-template-columns: 1fr; }
}

.concept-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}
.concept-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.concept-icon {
  width: 40px;
  height: 40px;
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.concept-list h4 { font-size: 16px; margin-bottom: 4px; }
.concept-list p { font-size: 14.5px; color: var(--text-muted); line-height: 1.65; }

.check-list-neg {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}
.check-list-neg li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
}
.check-list-neg i { color: var(--accent-red); font-size: 16px; margin-top: 4px; }

/* Strategy Cards */
.strategy-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.strat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
}
.strat-step {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-pink);
  background: rgba(236, 72, 153, 0.15);
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 12px;
}
.strat-card h4 { font-size: 17px; margin-bottom: 8px; }
.strat-card p { font-size: 14.5px; color: var(--text-muted); line-height: 1.65; }

/* Custom Tables */
.table-responsive { overflow-x: auto; margin-top: 16px; }
.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 15px;
}
.custom-table th {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-weight: 600;
  border-bottom: 1px solid var(--panel-border);
}
.custom-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--panel-border);
  color: var(--text-main);
  line-height: 1.65;
}
.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Funnel Visualizer */
.funnel-visualizer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.funnel-stage {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}
.funnel-stage:hover {
  border-color: var(--accent-purple);
  transform: scale(1.01);
}
.stage-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.stage-num {
  width: 34px;
  height: 34px;
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}
.stage-info h4 { font-size: 16px; }
.stage-info p { font-size: 13.5px; color: var(--text-muted); margin-top: 2px; }
.stage-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}
.stage-badge.gold {
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: #000;
}
.highlight-stage {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.4);
}
.funnel-arrow { color: var(--text-muted); opacity: 0.6; }

/* Patreon Tiers Grid */
.tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}
.tier-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}
.tier-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.2);
}
.tier-card.featured {
  background: linear-gradient(165deg, rgba(26, 32, 60, 0.95), rgba(15, 20, 36, 0.95));
  border: 2px solid var(--accent-gold);
  box-shadow: 0 10px 40px rgba(245, 158, 11, 0.2);
}
.popular-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gold);
  color: #000;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 12px;
}
.tier-badge {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.tier-badge.gold { color: var(--accent-gold); }
.tier-badge.purple { color: var(--accent-purple); }
.tier-name { font-size: 22px; font-weight: 700; }
.tier-price {
  font-size: 34px;
  font-weight: 800;
  margin: 12px 0 6px 0;
}
.tier-price small { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.tier-desc { font-size: 14.5px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; }
.tier-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  flex-grow: 1;
}
.tier-benefits li {
  font-size: 14.5px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

/* Workflow Steps */
.workflow-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}
.wf-card {
  display: flex;
  gap: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.wf-num {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}
.wf-body h4 { font-size: 17px; margin-bottom: 6px; }
.wf-body p { font-size: 15px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.65; }
.code-preview {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: monospace;
  font-size: 13.5px;
  color: #a7f3d0;
  overflow-x: auto;
}

/* Roadmap & Checklist */
.progress-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  width: 250px;
}
#checklist-progress-text { font-size: 13px; color: var(--text-muted); }
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-green));
  transition: width 0.3s ease;
}

.roadmap-weeks {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}
.week-block {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.week-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-purple);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.65;
  transition: var(--transition);
}
.check-item input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: var(--accent-green);
  cursor: pointer;
  margin-top: 3px;
}
.check-item.completed span {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.6;
}
