/* ==========================================================================
   TEMPS ÉTHIOPIEN & FRANCE PWA - STYLESHEET
   Design System: Premium Glassmorphism, Dark Mode, Gold & Cyan accents
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-dark: #090d16;
  --bg-card: rgba(18, 26, 43, 0.75);
  --bg-card-hover: rgba(28, 40, 65, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-gold: rgba(234, 179, 8, 0.35);

  --eth-gold: #f59e0b;
  --eth-gold-glow: rgba(245, 158, 11, 0.25);
  --eth-gold-bright: #fbbf24;
  --fr-blue: #3b82f6;
  --eat-cyan: #06b6d4;
  --accent-red: #ef4444;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-main: 0 12px 32px -4px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 8px 24px -2px rgba(245, 158, 11, 0.3);

  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* App Background glow effect */
.app-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: 
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

/* Layout Container */
.app-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px 40px 20px;
}

/* Header Section */
.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-main);
}

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

.brand-icon img {
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: block;
}

.brand-text h1 {
  font-family: var(--font-primary);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-pwa {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--eth-gold);
  color: #000;
  text-transform: uppercase;
}

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

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

.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--eth-gold), #d97706);
  color: #000;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.85rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  box-shadow: var(--shadow-gold);
}

.btn-install:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.hidden {
  display: none !important;
}

/* DST Toggle Switch */
.dst-toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.dst-switch {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
}

.dst-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 16px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.dst-btn.active {
  background: var(--fr-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* Live Dashboard Section */
.live-dashboard {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-main);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title h2 {
  font-family: var(--font-primary);
  font-size: 1.2rem;
  font-weight: 600;
}

.pulse-indicator {
  width: 10px;
  height: 10px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

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

.clock-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.clock-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.clock-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.clock-card.highlighted {
  border-color: var(--border-gold);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.08) 0%, rgba(18, 26, 43, 0.8) 100%);
  box-shadow: var(--shadow-gold);
}

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

.flag-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.flag {
  font-size: 1.2rem;
}

.country-name {
  font-size: 0.95rem;
  color: var(--text-main);
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.tag-dst { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.tag-eth { background: rgba(245, 158, 11, 0.2); color: var(--eth-gold-bright); }
.tag-eat { background: rgba(6, 182, 212, 0.2); color: #22d3ee; }

.clock-display {
  margin: 12px 0;
}

.time-main {
  font-family: var(--font-primary);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: block;
  line-height: 1;
}

.eth-gold {
  color: var(--eth-gold);
  text-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

.period-sub {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

.eth-amharic {
  font-size: 1.05rem;
  color: var(--eth-gold-bright);
  font-weight: 600;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
}

.footer-label {
  color: var(--text-dim);
}

.footer-value {
  font-weight: 600;
  color: var(--text-main);
}

.highlight-moment {
  color: var(--eth-gold);
}

/* Solar Progress Bar */
.solar-tracker {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
}

.solar-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.solar-title {
  color: var(--text-muted);
  font-weight: 500;
}

.solar-phase {
  color: var(--eth-gold-bright);
  font-weight: 600;
}

.solar-bar-container {
  position: relative;
  height: 10px;
  background: linear-gradient(90deg, #1e1b4b 0%, #d97706 25%, #fef08a 50%, #d97706 75%, #1e1b4b 100%);
  border-radius: 6px;
  overflow: visible;
  margin-bottom: 8px;
}

.solar-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 6px;
}

.solar-sun-icon {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  transition: left 0.5s ease;
  filter: drop-shadow(0 0 6px #f59e0b);
}

.solar-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Main Navigation Tabs */
.main-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

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

.tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(18, 26, 43, 0.9));
  border-color: var(--eth-gold);
  color: var(--eth-gold-bright);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15);
}

/* Tab Contents */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Converter Box */
.converter-box {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-main);
}

.converter-mode-switch {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: 30px;
  color: var(--text-muted);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mode-btn.active {
  background: var(--eth-gold);
  color: #000;
  border-color: var(--eth-gold);
  box-shadow: var(--shadow-gold);
}

.converter-panel {
  margin-bottom: 24px;
}

.panel-title {
  margin-bottom: 18px;
}

.panel-title h3 {
  font-family: var(--font-primary);
  font-size: 1.15rem;
  font-weight: 700;
}

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

.input-controls {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

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

.time-picker-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.picker-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  gap: 8px;
}

.picker-wrapper:focus-within {
  border-color: var(--eth-gold);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.btn-stepper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-glass);
  color: var(--eth-gold-bright);
  font-family: var(--font-primary);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-stepper:active {
  background: var(--eth-gold);
  color: #000;
  transform: scale(0.92);
}

.time-input {
  flex: 1;
  width: 60px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-primary);
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}

.time-input::-webkit-outer-spin-button,
.time-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.unit {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 18px;
}

.time-separator {
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 800;
  color: var(--eth-gold);
  padding-bottom: 4px;
}

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

.period-toggle-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.period-switch {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.period-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 10px 14px;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.period-btn.active {
  background: var(--eth-gold);
  color: #000;
}

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

.time-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  accent-color: var(--eth-gold);
  cursor: pointer;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 6px;
}

/* Presets */
.presets-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.presets-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
}

.preset-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-preset, .btn-preset-eth {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-preset:hover, .btn-preset-eth:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--eth-gold);
  color: var(--text-main);
}

/* Result Cards Box */
.result-display-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
}

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

.result-badge {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--eth-gold);
}

.result-dst-info {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.result-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.result-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.result-card.primary {
  border-color: var(--border-gold);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(0, 0, 0, 0.4));
}

.card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
}

.res-value {
  font-family: var(--font-primary);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.res-sub {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.res-description {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.moment-detail-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.detail-icon {
  font-size: 2rem;
}

.detail-text h4 {
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--eth-gold-bright);
}

.detail-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Reference Matrix Table Styling */
.table-section {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-main);
}

.table-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
}

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chip.active {
  background: var(--eth-gold);
  color: #000;
  font-weight: 700;
  border-color: var(--eth-gold);
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
}

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

.correspondence-table th, .correspondence-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-glass);
}

.correspondence-table th {
  background: rgba(0, 0, 0, 0.5);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.correspondence-table tbody tr {
  transition: background-color 0.15s ease;
  cursor: pointer;
}

.correspondence-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

.correspondence-table tbody tr.active-current-hour {
  background: rgba(245, 158, 11, 0.18) !important;
  border-left: 4px solid var(--eth-gold);
}

.eth-row-highlight {
  font-family: var(--font-primary);
  font-weight: 700;
  color: var(--eth-gold-bright);
}

.amharic-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
}

.btn-select-row {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--eth-gold-bright);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-select-row:hover {
  background: var(--eth-gold);
  color: #000;
}

.table-footnote {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Educational Guide Section */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.guide-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-main);
}

.guide-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.guide-icon {
  font-size: 1.5rem;
}

.guide-header h3 {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 700;
}

.guide-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.guide-card ul {
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.guide-card li {
  margin-bottom: 8px;
}

.vocab-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vocab-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.amharic-word {
  font-family: var(--font-primary);
  font-weight: 700;
  color: var(--eth-gold-bright);
  font-size: 1rem;
  display: block;
  margin-bottom: 2px;
}

.vocab-def {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pdf-reference-badge {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  margin-top: 10px;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 30px 10px 10px 10px;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.copyright {
  margin-top: 4px;
  font-size: 0.75rem;
}

/* Touch feedback for tactile mobile response */
.btn-preset:active, 
.btn-preset-eth:active, 
.dst-btn:active, 
.mode-btn:active, 
.period-btn:active, 
.chip:active, 
.btn-select-row:active, 
.tab-btn:active,
.btn-install:active {
  transform: scale(0.96) !important;
  opacity: 0.9;
}

.btn-preset, .btn-preset-eth, .dst-btn, .mode-btn, .period-btn, .chip, .btn-select-row, .tab-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Touch slider thumb enhancement */
.time-slider {
  height: 12px;
  border-radius: 6px;
  touch-action: manipulation;
}

.time-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--eth-gold-bright);
  box-shadow: 0 0 12px var(--eth-gold-glow), 0 2px 6px rgba(0, 0, 0, 0.4);
  border: 2px solid #fff;
  cursor: pointer;
}

.time-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--eth-gold-bright);
  box-shadow: 0 0 12px var(--eth-gold-glow), 0 2px 6px rgba(0, 0, 0, 0.4);
  border: 2px solid #fff;
  cursor: pointer;
}

/* Responsive Breakpoints & 6-inch Smartphone Ergonomics */
@media (max-width: 768px) {
  .app-container {
    padding: 10px 12px calc(84px + env(safe-area-inset-bottom, 16px)) 12px;
  }

  /* Fixed Floating Bottom Tab Bar for One-Handed Thumb Ergonomics */
  .main-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 0;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)) 12px;
    background: rgba(9, 13, 22, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: space-around;
    gap: 6px;
  }

  .tab-btn {
    flex: 1;
    justify-content: center;
    padding: 10px 6px;
    font-size: 0.8rem;
    min-height: 46px;
    border-radius: var(--radius-sm);
  }

  .tab-btn svg {
    width: 18px;
    height: 18px;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .time-main {
    font-size: 1.9rem;
  }

  .input-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .time-picker-group, .period-toggle-group {
    width: 100%;
  }

  .picker-wrapper {
    width: 100%;
  }

  .time-separator {
    display: none;
  }

  .preset-buttons {
    gap: 8px;
  }

  .btn-preset, .btn-preset-eth {
    flex: 1 1 calc(50% - 6px);
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    padding: 6px 10px;
  }

  .mode-btn {
    flex: 1;
    justify-content: center;
    padding: 12px;
    min-height: 46px;
  }

  .period-btn {
    flex: 1;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .result-cards-grid {
    grid-template-columns: 1fr;
  }

  .result-card {
    padding: 14px;
  }

  .table-section {
    padding: 14px;
  }

  .table-wrapper {
    -webkit-overflow-scrolling: touch;
  }

  .correspondence-table th, .correspondence-table td {
    padding: 10px 8px;
    font-size: 0.82rem;
  }

  .btn-select-row {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* 6-inch Smartphone Screen Optimization (e.g. ~360px - 440px wide) */
@media (max-width: 480px) {
  .brand-text h1 {
    font-size: 1.15rem;
  }

  .subtitle {
    font-size: 0.78rem;
  }

  .badge-pwa {
    font-size: 0.6rem;
  }

  .dst-label {
    display: none;
  }

  .dst-switch {
    width: 100%;
    justify-content: space-between;
  }

  .dst-btn {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .converter-box {
    padding: 16px 14px;
  }

  .live-dashboard {
    padding: 16px 14px;
  }

  .solar-tracker {
    padding: 12px;
  }

  .solar-ticks {
    font-size: 0.68rem;
  }

  .moment-detail-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .filter-chips {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .chip {
    white-space: nowrap;
    min-height: 38px;
    padding: 8px 14px;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .pulse-indicator {
    animation: none;
  }
}
