:root {
  --bg-main: #0B131E;
  --bg-card: #132032;
  --bg-card-hover: #192A40;
  --bg-surface: #1E334D;
  --border-color: #243E5E;
  --border-light: rgba(255, 255, 255, 0.08);

  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dim: #64748B;

  --accent-emerald: #10B981;
  --accent-teal: #14B8A6;
  --accent-cyan: #06B6D4;
  --accent-blue: #3B82F6;
  --accent-amber: #F59E0B;
  --accent-rose: #EF4444;
  --discord-purple: #5865F2;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
}

.app-layout {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

/* Header */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

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

.logo-icon {
  font-size: 28px;
  background: linear-gradient(135deg, #10B981, #06B6D4);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #F1F5F9, #38BDF8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Live Clock & Calendar Widget */
.live-clock-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.clock-time-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.clock-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: clockPulse 1.8s infinite ease-in-out;
}

@keyframes clockPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.clock-time {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.clock-date {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* Sync Status Bar */
.sync-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(19, 32, 50, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  margin-bottom: 20px;
  font-size: 12.5px;
  backdrop-filter: blur(4px);
}

.sync-indicator {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
}

.sync-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.sync-dot.stale {
  background: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
}

.sync-dot.error {
  background: var(--accent-rose);
  box-shadow: 0 0 8px var(--accent-rose);
}

.sync-details {
  color: var(--text-muted);
  font-size: 12px;
}

.sync-details strong {
  font-family: var(--font-mono);
  color: var(--text-main);
}

.t-timestamp-chip {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 8px;
  border-radius: 4px;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.05);
  letter-spacing: -0.2px;
}

.t-timestamp-chip.fresh {
  color: #A7F3D0;
  border-color: rgba(16, 185, 129, 0.2);
}

.t-timestamp-chip.recent {
  color: #BAE6FD;
}

.t-timestamp-chip.older {
  color: #FDE68A;
}

.btn-secondary.stale-prompt {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
  animation: pulseAmber 2s infinite;
}

@keyframes pulseAmber {
  0% { box-shadow: 0 0 4px rgba(245, 158, 11, 0.2); }
  50% { box-shadow: 0 0 14px rgba(245, 158, 11, 0.5); }
  100% { box-shadow: 0 0 4px rgba(245, 158, 11, 0.2); }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-discord {
  background: var(--discord-purple);
  color: #fff;
}

.btn-discord:hover {
  background: #4752C4;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.4);
}

/* Telemetry Strip - Balanced 3x2 Grid */
.telemetry-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.telemetry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 104px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.telemetry-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.15);
}

.t-icon {
  font-size: 24px;
  background: var(--bg-surface);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  margin-top: 2px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.t-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.t-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  line-height: 1.3;
}

.t-value {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
  line-height: 1.25;
}

.t-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 3px;
  white-space: normal;
  word-break: normal;
}

/* Species navigation tabs - Responsive Grid */
.species-nav-container {
  margin-bottom: 24px;
}

.section-title {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.species-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.species-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.species-tab:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-light);
}

.species-tab.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.18));
  border-color: var(--accent-emerald);
  color: #fff;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}

.species-tab .tab-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--text-main);
  flex-shrink: 0;
}

.species-tab.active .tab-badge {
  background: var(--accent-emerald);
  color: #062b1b;
  font-weight: 700;
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.card-caption {
  font-size: 12px;
  color: var(--text-muted);
}

/* Protection Banner */
.protection-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--accent-rose);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.protection-banner.hidden {
  display: none;
}

.alert-icon {
  font-size: 28px;
}

.protection-banner h3 {
  color: var(--accent-rose);
  font-size: 16px;
  font-weight: 700;
}

.protection-banner p {
  font-size: 13px;
  color: #FCA5A5;
  margin-top: 2px;
}

/* Master Score Card */
.master-score-card {
  border-color: rgba(16, 185, 129, 0.4);
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.08), transparent 70%), var(--bg-card);
}

.score-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.species-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.species-big-icon {
  font-size: 38px;
  background: var(--bg-surface);
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.species-header h2 {
  font-size: 24px;
  font-weight: 800;
}

.latin-name {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.verdict-tag {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.verdict-tag.success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border: 1px solid var(--accent-emerald);
}

.verdict-tag.info {
  background: rgba(59, 130, 246, 0.2);
  color: #60A5FA;
  border: 1px solid #3B82F6;
}

.verdict-tag.warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber);
}

.verdict-tag.danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-rose);
  border: 1px solid var(--accent-rose);
}

.score-display-wrapper {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.score-circle-container {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.score-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-ring-bg {
  fill: none;
  stroke: var(--bg-surface);
  stroke-width: 10;
}

.score-ring-fill {
  fill: none;
  stroke: var(--accent-emerald);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 314.15;
  stroke-dashoffset: 60;
  transition: stroke-dashoffset 0.8s ease, stroke 0.4s ease;
}

.score-number-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-val {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.score-max {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.score-summary-text h3 {
  font-size: 17px;
  margin-bottom: 4px;
}

.score-summary-text p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Tactical Box */
.tactical-box {
  background: var(--bg-surface);
  border-left: 4px solid var(--accent-cyan);
  padding: 16px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 22px;
}

.box-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--accent-cyan);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tactical-p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
}

/* Best Windows */
.best-windows-section .subheading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.windows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.window-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.w-time {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.w-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.w-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 4px;
}

/* Factors List */
.factors-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.factor-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.factor-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.factor-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.factor-score-num {
  font-family: var(--font-mono);
  font-weight: 700;
}

.factor-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-surface);
  border-radius: 4px;
  overflow: hidden;
}

.factor-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.factor-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Spots & Lures */
.spots-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spots-list li {
  background: var(--bg-surface);
  border-left: 3px solid var(--accent-emerald);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  line-height: 1.5;
}

.lures-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lure-tag {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lure-tag::before {
  content: "•";
  color: var(--accent-cyan);
  font-size: 18px;
}

/* Solunar List */
.solunar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.solunar-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.solunar-title {
  font-weight: 600;
  color: var(--text-main);
}

.solunar-sub {
  font-size: 11px;
  color: var(--text-dim);
}

.solunar-time {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-amber);
}

/* Hourly Table */
.hourly-table-wrap {
  overflow-x: auto;
}

.hourly-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.hourly-table th {
  text-align: left;
  padding: 8px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
}

.hourly-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.close-x {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}

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

.form-group label {
  font-size: 13px;
  font-weight: 600;
}

.form-control {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: #fff;
  font-size: 13px;
  font-family: var(--font-mono);
}

.form-group small {
  font-size: 11px;
  color: var(--text-muted);
}

.modal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.status-msg {
  margin-top: 12px;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.status-msg.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--accent-emerald);
  color: var(--accent-emerald);
}

.status-msg.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--accent-rose);
  color: #FCA5A5;
}

.status-msg.hidden {
  display: none;
}

/* AI & Chat Components */
.btn-chat {
  background: linear-gradient(135deg, #0EA5E9, #0284C7);
  color: #fff;
  border-color: #38BDF8;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.25);
}

.btn-chat:hover {
  background: linear-gradient(135deg, #0284C7, #0369A1);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4);
}

.box-head-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-gemini-chip {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(16, 185, 129, 0.15));
  border: 1px solid var(--accent-cyan);
  color: #38BDF8;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.btn-gemini-chip:hover {
  background: var(--accent-cyan);
  color: #04253a;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

.btn-gemini-chip.loading {
  opacity: 0.7;
  pointer-events: none;
}

.gemini-status-tag {
  display: inline-block;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #38BDF8;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.info-alert {
  background: rgba(14, 165, 233, 0.1);
  border-left: 3px solid var(--accent-cyan);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12.5px;
  color: #BAE6FD;
  line-height: 1.5;
  margin-bottom: 16px;
}

.btn-primary-ai {
  background: linear-gradient(135deg, #10B981, #06B6D4);
  color: #032115;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary-ai:hover {
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
}

/* Chat Modal Window */
.chat-modal-window {
  max-width: 680px;
  height: 640px;
  display: flex;
  flex-direction: column;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  font-size: 26px;
  background: var(--bg-surface);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.chat-header-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin: 12px 0;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 85%;
  line-height: 1.5;
  font-size: 13.5px;
}

.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  white-space: pre-wrap;
}

.chat-msg.user .chat-msg-bubble {
  background: linear-gradient(135deg, #0284C7, #0369A1);
  color: #fff;
  border: none;
  border-bottom-right-radius: 2px;
}

.chat-msg.assistant .chat-msg-bubble {
  background: var(--bg-surface);
  border-color: rgba(6, 182, 212, 0.3);
  border-bottom-left-radius: 2px;
}

.chat-quick-prompts {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.quick-prompt-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.quick-prompt-btn:hover {
  background: var(--border-color);
  color: var(--text-main);
  border-color: var(--accent-cyan);
}

.chat-input-bar {
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
}

.btn-chat-send {
  background: var(--accent-cyan);
  color: #04253a;
  font-weight: 700;
  border: none;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-chat-send:hover {
  background: #22d3ee;
}

/* Footer */
.app-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ============================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS
   ============================================================ */

/* Tablet & Medium Screens (<= 1100px) */
@media (max-width: 1100px) {
  .telemetry-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .species-tabs {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

@media (max-width: 1040px) {
  .top-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .nav-right {
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
  }
}

/* Dashboard single-column breakpoint (<= 992px) */
@media (max-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Mobile Phones (<= 680px) */
@media (max-width: 680px) {
  .app-layout {
    padding: 12px 12px 40px;
  }

  /* Compact Brand Header */
  .top-nav {
    padding-bottom: 14px;
    margin-bottom: 18px;
    gap: 12px;
  }
  .brand {
    gap: 10px;
  }
  .logo-icon {
    font-size: 24px;
    width: 42px;
    height: 42px;
    padding: 0;
  }
  .brand h1 {
    font-size: 19px;
  }
  .brand-sub {
    font-size: 11px;
  }

  /* Nav Right & Buttons */
  .nav-right {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .live-clock-widget {
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
  }
  .clock-time {
    font-size: 17px;
  }
  .header-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
  }
  .btn {
    justify-content: center;
    padding: 9px 8px;
    font-size: 12px;
    width: 100%;
    white-space: nowrap;
  }

  /* Sync bar */
  .sync-status-bar {
    padding: 8px 12px;
    font-size: 11.5px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 16px;
  }

  /* Telemetry Bar on Phone - Clean 1-Column full-width cards */
  .telemetry-bar {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }
  .telemetry-card {
    padding: 12px 14px;
    min-height: auto;
    gap: 12px;
  }
  .t-icon {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .t-value {
    font-size: 18px;
  }
  .t-sub {
    font-size: 11.5px;
    line-height: 1.35;
  }
  .t-timestamp-chip {
    font-size: 10px;
    padding: 3px 6px;
  }

  /* Species Tabs on Phone - Clean 2-column grid */
  .species-nav-container {
    margin-bottom: 18px;
  }
  .species-tabs {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .species-tab {
    padding: 8px 10px;
    font-size: 12.5px;
    min-height: 40px;
    gap: 6px;
  }
  .species-tab .tab-badge {
    font-size: 10.5px;
    padding: 2px 6px;
  }

  /* Assessment Card */
  .card {
    padding: 16px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
  }
  .score-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .species-big-icon {
    width: 48px;
    height: 48px;
    font-size: 30px;
  }
  .species-header h2 {
    font-size: 21px;
  }
  .verdict-tag {
    align-self: flex-start;
    font-size: 12px;
    padding: 5px 12px;
  }
  .score-display-wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 16px;
  }
  .score-circle-container {
    width: 105px;
    height: 105px;
  }
  .score-val {
    font-size: 28px;
  }
  .score-summary-text h3 {
    font-size: 16px;
  }
  .score-summary-text p {
    font-size: 12.5px;
  }

  /* Tactical advice */
  .tactical-box {
    padding: 12px 14px;
    margin-bottom: 16px;
  }
  .box-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .tactical-p {
    font-size: 13px;
    line-height: 1.55;
  }

  /* Best windows */
  .windows-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .window-card {
    padding: 10px 12px;
  }

  /* Factors list */
  .factors-list {
    gap: 14px;
  }
  .factor-item {
    gap: 5px;
  }
  .factor-top {
    font-size: 13px;
  }
  .factor-name-wrap {
    font-size: 12.5px;
  }
  .factor-score-num {
    font-size: 13px;
  }
  .factor-desc {
    font-size: 12px;
    line-height: 1.45;
  }

  /* Right column / sidebar */
  .spots-list li {
    font-size: 12.5px;
    padding: 9px 12px;
  }
  .lure-tag {
    font-size: 12.5px;
    padding: 8px 10px;
  }
  .solunar-item {
    padding: 8px 12px;
    font-size: 12.5px;
  }
  .hourly-table-wrap {
    margin: 0 -4px;
  }
  .hourly-table th, .hourly-table td {
    padding: 6px 8px;
    font-size: 11.5px;
  }

  /* Modals on Phone */
  .modal-window {
    max-width: 95vw;
    width: 95vw;
    padding: 16px 14px;
    margin: 8px;
    border-radius: 14px;
  }
  .chat-modal-window {
    height: 88vh;
    max-height: 88vh;
    width: 96vw;
    padding: 16px 12px;
  }
  .chat-msg {
    max-width: 94%;
    font-size: 13px;
  }
  .chat-quick-prompts {
    gap: 6px;
    padding-bottom: 6px;
  }
  .quick-prompt-btn {
    font-size: 11px;
    padding: 5px 8px;
  }
  .chat-input {
    font-size: 13px;
    padding: 8px 10px;
  }
  .btn-chat-send {
    padding: 0 14px;
    font-size: 13px;
  }
}
