:root {
  --bg-body: #0a0a0a;
  --bg-surface: #171717;
  --bg-surface-hover: #262626;
  --border: #333;
  --text-main: #ededed;
  --text-muted: #a1a1a1;
  --primary: #3b82f6;
  --primary-rgb: 59, 130, 246;
  --primary-hover: #2563eb;
  --success: #10b981;
  --danger: #ef4444;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 8px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] {
  --bg-body: #f5f5f5;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f0f0f0;
  --border: #e5e5e5;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Global Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-family);
  background: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Dimensions */
.h-9 { height: 36px; }
.w-20 { width: 80px; }
.w-24 { width: 96px; }
.w-28 { width: 112px; }
.w-32 { width: 128px; }
.w-36 { width: 144px; }
.w-px { width: 1px; }

/* Spacing */
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }

/* Colors */
.bg-border { background-color: var(--border); }

/* Form Elements Consistency */
.form-input, .search-input, .btn-sm {
  height: 36px;
  padding: 0 12px;
  line-height: 34px; /* height minus border */
}

/* Utilities */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }
.w-20 { width: 20%; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-auto { margin-left: auto; }
.p-4 { padding: 1rem; }
.p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.opacity-0 { opacity: 0; transition: opacity 0.3s ease; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.whitespace-nowrap { white-space: nowrap; }

/* Text Utilities */
.text-uppercase { text-transform: uppercase; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: #f59e0b; }
.text-main { color: var(--text-main); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

/* Cards & Layout */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.grid-cols-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .grid-cols-2 { grid-template-columns: 1fr 1fr; }
}

h1, h2, h3 { margin: 0 0 16px 0; font-weight: 600; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.1rem; }

/* Forms */
.form-group { margin-bottom: 16px; }
input, select, textarea { font-family: var(--font-family); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "lnum" 1; }
.form-label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); }
.form-input {
  width: 100%;
  background: var(--bg-body);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: var(--font-family);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  transition: border-color 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-input {
  background: var(--bg-body);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: var(--font-family);
}
.search-input:focus {
  outline: none;
  border-color: var(--primary);
}
input[type="datetime-local"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit { font-family: var(--font-family); font-variant-numeric: tabular-nums; }
input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"]::-webkit-datetime-edit-text,
input[type="datetime-local"]::-webkit-datetime-edit-month-field,
input[type="datetime-local"]::-webkit-datetime-edit-day-field,
input[type="datetime-local"]::-webkit-datetime-edit-year-field,
input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
input[type="datetime-local"]::-webkit-datetime-edit-minute-field { font-family: var(--font-family); font-variant-numeric: tabular-nums; }

/* Tables */
.table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

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

thead th {
  background: var(--bg-surface-hover);
  color: var(--text-muted);
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg-surface-hover);
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  vertical-align: text-bottom;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Responsive Grid overrides */
.grid-lg {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

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

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

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

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-muted);
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
  border-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
  background-color: white;
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary);
}

@media (max-width: 768px) {
  .flex-wrap {
    flex-wrap: wrap;
  }
  .search-input {
    width: 100%;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  transition: all 0.2s;
}

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

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

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

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 500;
}
.btn-link:hover {
  text-decoration: underline;
}
.btn-link svg {
  width: 16px;
  height: 16px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 2px;
  border-radius: 6px;
  width: fit-content;
}
.tabs.no-border {
  border: none;
  padding: 0;
  background: transparent;
  gap: 8px;
}
.tab {
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.tabs:not(.no-border) .tab.active {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  font-weight: 500;
}
.tabs.no-border .tab {
  background: var(--bg-surface);
  border: 1px solid var(--border);
}
.tabs.no-border .tab:hover {
  border-color: var(--text-muted);
}
.tabs.no-border .tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Tables */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

th, td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg-surface-hover);
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-surface-hover); }

/* Home Page Specific */
.hero-card {
  padding: 0;
  overflow: hidden;
  margin-bottom: 24px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.news-ticker {
  background: rgba(255,255,255,0.03);
  padding: 8px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.news-icon {
  color: var(--success);
  font-size: 0.6rem;
  animation: pulse 2s infinite;
}

.news-content {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-card > div:nth-child(2) {
  padding: 32px;
  flex: 1;
}

.hero-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 16px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero-title {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(to right, #fff, #aaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  max-width: 600px;
  font-size: 1rem;
}

.hero-chart-container {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 160px;
  pointer-events: none;
  opacity: 0.4;
  z-index: 0;
}

.hero-chart-container canvas {
  width: 100%;
  height: 100%;
}

.section-card {
  transition: transform 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}
.section-card:hover {
  transform: translateY(-2px);
  border-color: var(--text-muted);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.section-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.section-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
  flex: 1;
}

.action-links {
  display: flex;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.risk-card {
  margin-top: 24px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.05);
}

.risk-title {
  color: var(--danger);
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.risk-title::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: bold;
}

.risk-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Page Header */
.page-header {
  margin-bottom: 24px;
}

/* Filter Page Specific */
.filter-card-header {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.filter-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.filter-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.filter-input-sm {
  width: 140px;
}

.filter-range-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-input-xs {
  width: 70px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  text-align: center;
}
.filter-input-xs:focus {
  outline: none;
  border-color: var(--primary);
}

.filter-intervals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Tag Checkbox */
.tag-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 56px;
  text-align: center;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.tag-checkbox:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-main);
}

.tag-checkbox:active {
  background: var(--bg-surface-hover);
}

.tag-checkbox.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.3);
}

.tag-checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

/* Results Grid */
.results-grid-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.interval-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

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

.interval-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.interval-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-surface-hover);
  padding: 2px 8px;
  border-radius: 99px;
}

.interval-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

/* Compact Result Item for inside cards */
.result-item-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  background: var(--bg-surface-hover);
  border-radius: 4px;
  font-size: 0.8rem;
  text-align: center;
  border: 1px solid transparent;
  cursor: pointer;
}

.result-item-compact.upper {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.1);
}

.result-item-compact.lower {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.1);
}

.result-item-compact .symbol {
  font-weight: 600;
  margin-bottom: 2px;
}

.result-item-compact .status {
  font-size: 0.7rem;
  opacity: 0.8;
}

.result-item-compact .more-link {
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--primary);
  text-decoration: underline;
}

.result-item-compact .more-link:hover {
  color: var(--primary-hover);
}

.more-col {
  width: 96px;
  text-align: center;
}

.more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  user-select: none;
}

.more-col .more-btn + .more-btn {
  margin-left: 4px;
}

.coinglass-btn {
  font-size: 11px;
}

.more-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--text-muted);
  color: var(--text-main);
  opacity: 1;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--bg-surface-hover);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden { display: none !important; }
.has-overflow { outline: 1px dashed var(--danger); outline-offset: 2px; }

/* Tooltip */
.tooltip {
  position: fixed;
  z-index: 1000;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s;
  width: 340px;
}
.tooltip.visible { opacity: 1; }
.tooltip .header {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tooltip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@keyframes pulse {
  0% { opacity: 0.6; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0.6; transform: scale(0.95); }
}

/* Recommendation Specific */
.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-surface-hover);
  border: 1px solid var(--border);
  font-size: 0.75rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.status-pending { background: var(--text-muted); }

.hover-row:hover {
  background: var(--bg-surface-hover);
  cursor: pointer;
}

/* Atmospheric Home Enhancements */
.home-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 0;
  overflow: hidden;
  margin-bottom: 3rem;
}

.home-hero-bg {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.08), transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.05), transparent 50%);
  z-index: 0;
  pointer-events: none;
}

.home-hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.home-hero-title {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .home-hero-title {
  background: linear-gradient(135deg, #1f2937 0%, #4b5563 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 2.5rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 6rem;
  position: relative;
  z-index: 1;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--bg-surface-hover);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.feature-card:hover .feature-icon {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.05);
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.feature-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
  margin-top: auto;
}

.feature-link svg {
  transition: transform 0.2s;
}

.feature-card:hover .feature-link svg {
  transform: translateX(4px);
}

.manifesto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  align-items: center;
}

.manifesto-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.manifesto-text {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .home-hero-title { font-size: 2.5rem; }
  .manifesto-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* Responsive Utilities */
@media (min-width: 768px) {
  .md\:block { display: block; }
  .md\:flex { display: flex; }
}

/* Logs Page Specifics */
.logbox {
  background: #111; /* Darker terminal background */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: calc(100vh - 280px); /* Responsive height */
  min-height: 400px;
  overflow-y: auto;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.85rem;
  padding: 16px;
  color: #e5e5e5;
  scroll-behavior: smooth;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

[data-theme="light"] .logbox {
  background: #fafafa;
  color: #333;
}

.select-sm {
  height: 28px;
  padding: 0 24px 0 8px;
  font-size: 0.8rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background-color: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a1a1a1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 12px;
  line-height: 1.5;
}

.select-sm:focus {
  outline: none;
  border-color: var(--primary);
}

[data-theme="light"] .select-sm {
  background-color: #fff;
}

.btn-xs {
  height: 28px;
  padding: 0 10px;
  font-size: 0.75rem;
  line-height: 26px;
  border-radius: 4px;
}

.log-row {
  display: flex;
  gap: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1.5;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.1s;
}

[data-theme="light"] .log-row {
  border-bottom: 1px solid rgba(0,0,0,0.03);
}

.log-row:hover {
  background: rgba(255,255,255,0.05);
}

[data-theme="light"] .log-row:hover {
  background: rgba(0,0,0,0.05);
}

.log-ts {
  color: #6b7280;
  white-space: nowrap;
  font-size: 0.8em;
  min-width: 140px;
  user-select: none;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.log-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  min-width: 50px;
  height: 20px;
  letter-spacing: 0.05em;
}

.level-info {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.level-error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

[data-theme="light"] .level-info {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border-color: rgba(59, 130, 246, 0.2);
}

[data-theme="light"] .level-error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.2);
}

.log-msg {
  flex: 1;
  word-break: break-all;
  white-space: pre-wrap;
}

/* Custom scrollbar for logbox */
.logbox::-webkit-scrollbar {
  width: 10px;
}
.logbox::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
}
.logbox::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.logbox::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255,255,255,0.2);
}

[data-theme="light"] .logbox::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
}
[data-theme="light"] .logbox::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0,0,0,0.3);
}
