:root {
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-tertiary: #334155;
  --bg-card: rgba(30, 41, 59, 0.7);
  --border-color: #334155;
  --border-subtle: #1E293B;
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --accent-primary: #6366F1;
  --accent-hover: #4F46E5;
  --accent-active: #4338CA;
  
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #0EA5E9;
  
  --active-color: #10B981;
  --away-color: #F59E0B;
  --untagged-color: #64748B;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ================= CONCEPT 2: FLOATING GLASS TOPBAR & HEADER ================= */
.glass-header {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #6366F1, #38BDF8);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #FFFFFF, #CBD5E1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.live-tracker-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  max-width: 200px;
}

/* Center Floating Glass Pill Control */
.floating-center-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
}

.pill-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.15s ease;
}
.pill-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

.pill-btn-today {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #F8FAFC;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pill-btn-today:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.pill-date-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.pill-date-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}

.pill-date-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: #38BDF8;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.pill-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 0.2rem;
}

.pill-device-wrapper {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #94A3B8;
  padding-left: 0.2rem;
}

.pill-device-select {
  background: transparent;
  border: none;
  color: #E2E8F0;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  max-width: 160px;
}
.pill-device-select option {
  background: #0F172A;
  color: #F8FAFC;
}

.btn-xs {
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  border-radius: 9999px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Nav Tabs Floating Pill */
.nav-tabs-pill {
  display: flex;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 2px;
}

.nav-pill-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}
.nav-pill-btn:hover {
  color: var(--text-primary);
}
.nav-pill-btn.active {
  background: var(--accent-primary);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* More Options Dropdown Menu */
.menu-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.menu-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  padding: 0.4rem;
  min-width: 210px;
  z-index: 1000;
  flex-direction: column;
  gap: 2px;
  animation: fadeIn 0.15s ease;
}
.menu-dropdown-panel.show {
  display: flex;
}

.menu-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  color: #CBD5E1;
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.menu-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}
.menu-dropdown-item.active {
  background: rgba(99, 102, 241, 0.25);
  color: #A5B4FC;
  font-weight: 600;
}

.menu-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.3rem 0;
}

/* ================= CONCEPT 2: TIMELINE HERO WORKSPACE ================= */
.timeline-hero-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.timeline-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-stats-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
}

.hero-stat-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.hero-stat-dot.active { background: #10B981; box-shadow: 0 0 6px #10B981; }
.hero-stat-dot.away { background: #F59E0B; box-shadow: 0 0 6px #F59E0B; }
.hero-stat-dot.prod { background: #6366F1; box-shadow: 0 0 6px #6366F1; }

.hero-stat-name {
  color: var(--text-secondary);
}

.hero-stat-sep {
  color: rgba(255, 255, 255, 0.2);
}

.timeline-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Concept 2 Anchored Contextual Preview Drawer */
.contextual-preview-drawer {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-top: 0.5rem;
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.15);
  animation: fadeIn 0.2s ease;
}
.contextual-preview-drawer.active {
  display: flex;
}

.preview-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-app-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.badge-pill {
  background: rgba(99, 102, 241, 0.2);
  color: #A5B4FC;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.preview-filmstrip-wrapper {
  overflow-x: auto;
  padding-bottom: 4px;
}

.preview-filmstrip {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.preview-filmstrip .filmstrip-item {
  flex-shrink: 0;
  width: 140px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}
.preview-filmstrip .filmstrip-item:hover {
  transform: translateY(-2px);
  border-color: #38BDF8;
}
.preview-filmstrip .filmstrip-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-filmstrip .filmstrip-time {
  position: absolute;
  bottom: 3px;
  right: 4px;
  background: rgba(0, 0, 0, 0.75);
  font-size: 0.65rem;
  color: #FFFFFF;
  padding: 1px 4px;
  border-radius: 3px;
}

/* ================= BUTTONS & INPUTS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #FFFFFF;
}
.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-secondary {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background-color: var(--bg-tertiary);
}

.btn-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background-color: var(--danger);
  color: #FFFFFF;
}

.btn-sm {
  padding: 0.25rem 0.6rem;
  font-size: 0.775rem;
}

.date-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.4rem;
}

.date-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  color-scheme: dark;
}

/* ================= MAIN CONTENT LAYOUT ================= */
.main-container {
  flex: 1;
  padding: 1.5rem;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.tab-pane.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= SUMMARY CARDS ================= */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.metric-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-primary);
}

.metric-card.active-metric::before { background: var(--success); }
.metric-card.away-metric::before { background: var(--warning); }
.metric-card.prod-metric::before { background: var(--info); }

.metric-label {
  font-size: 0.775rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.metric-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-sub {
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* ================= MANICTIME MULTI-TRACK TIMELINE ================= */
.timeline-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-md);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.timeline-wrapper {
  position: relative;
  background-color: #0A0F1D;
  border: 1px solid #1E293B;
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem 0.5rem 0.5rem;
  overflow-x: auto;
  user-select: none;
}

.timeline-canvas-container {
  position: relative;
  min-width: 900px;
  height: 220px;
}

.track-labels {
  position: absolute;
  left: 8px;
  top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 10;
  pointer-events: none;
}

.track-label-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #CBD5E1;
  background: rgba(15, 23, 42, 0.85);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: fit-content;
}

#timelineCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* Timeline Hover Scrubber & Tooltip */
.timeline-scrubber {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #EF4444;
  pointer-events: none;
  display: none;
  z-index: 20;
}

.timeline-tooltip {
  position: absolute;
  bottom: 12px;
  transform: translateX(-50%);
  background-color: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.775rem;
  pointer-events: none;
  z-index: 30;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  display: none;
}

.tooltip-time {
  font-weight: 700;
  color: #38BDF8;
  margin-bottom: 2px;
}

.tooltip-app {
  font-weight: 600;
  color: #FFFFFF;
}

.tooltip-title {
  color: #94A3B8;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tooltip-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* ================= TIMELINE BREAKDOWN PANELS ================= */
.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem;
}

.breakdown-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 480px;
}

.breakdown-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  padding-right: 4px;
}

.breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.4rem 0.6rem;
  background-color: rgba(15, 23, 42, 0.4);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.breakdown-item:hover {
  border-color: var(--border-color);
  background-color: rgba(15, 23, 42, 0.7);
}

.item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.item-name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-color-chip {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.item-duration {
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-bar-bg {
  width: 100%;
  height: 4px;
  background-color: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ================= DATA TABLES ================= */
.table-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.table-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-input {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  min-width: 260px;
}
.search-input:focus {
  border-color: var(--accent-primary);
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.825rem;
}

.styled-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.725rem;
  letter-spacing: 0.5px;
}

.styled-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.styled-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ================= MODALS & TOASTS ================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 500px;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
}
.form-control:focus {
  border-color: var(--accent-primary);
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--accent-primary);
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  z-index: 200;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.25s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ================= SCREENSHOTS FILMSTRIP & GALLERY ================= */
.timeline-filmstrip-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(51, 65, 85, 0.4);
}

.timeline-filmstrip-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.timeline-filmstrip {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-behavior: smooth;
}

.filmstrip-item {
  position: relative;
  flex-shrink: 0;
  width: 110px;
  height: 68px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  background-color: #000;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.filmstrip-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.filmstrip-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filmstrip-time {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(15, 23, 42, 0.85);
  font-size: 0.65rem;
  font-weight: 700;
  color: #38BDF8;
  padding: 1px 4px;
  border-radius: 3px;
}

/* Gallery Grid */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.screenshot-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

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

.screenshot-img-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  background-color: #000;
  cursor: pointer;
  overflow: hidden;
}

.screenshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.screenshot-card:hover .screenshot-img {
  transform: scale(1.03);
}

.screenshot-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #38BDF8;
  font-size: 0.725rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.screenshot-info {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.screenshot-app-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.screenshot-window-title {
  color: var(--text-secondary);
  font-size: 0.775rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screenshot-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

/* Lightbox Modal */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  display: none;
  flex-direction: column;
  z-index: 300;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background-color: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border-color);
}

.lightbox-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lightbox-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  position: relative;
}

.lightbox-img-container {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.lightbox-nav-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color);
  color: #FFFFFF;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 1.2rem;
  z-index: 10;
}

.lightbox-nav-btn:hover {
  background: var(--accent-primary);
}

/* ================= EPIC ENCORE SYNC BADGE ================= */
.sync-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  transition: all 0.15s ease;
}

.sync-badge.synced {
  border-color: rgba(16, 185, 129, 0.4);
  background-color: rgba(16, 185, 129, 0.08);
}
.sync-badge.synced:hover {
  border-color: #10B981;
}

.sync-badge.unlinked {
  border-color: rgba(245, 158, 11, 0.5);
  background-color: rgba(245, 158, 11, 0.1);
  animation: pulse-border 2.5s infinite;
}
.sync-badge.unlinked:hover {
  background-color: rgba(245, 158, 11, 0.2);
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Live View Button */
.btn-live {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-live:hover {
  background: linear-gradient(135deg, #DC2626, #B91C1C);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6);
}

.live-dot-blink {
  width: 7px;
  height: 7px;
  background-color: #FFFFFF;
  border-radius: 50%;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ================= LIVE STREAM MODAL ================= */
.live-stream-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1400px;
  max-height: 85vh;
  margin: 0 auto;
  position: relative;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
}

.live-stream-img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background-color: #050505;
}

.live-overlay-header {
  position: absolute;
  top: 12px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 10;
}

/* ================= MOBILE & TABLET RESPONSIVENESS (CONCEPT 2) ================= */
@media (max-width: 1024px) {
  .glass-header {
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    gap: 0.6rem;
  }

  .floating-center-pill {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .header-right {
    margin-left: auto;
  }
}

@media (max-width: 768px) {
  .glass-header {
    padding: 0.5rem 0.75rem;
  }

  .live-tracker-pill {
    display: none;
  }

  .floating-center-pill {
    padding: 0.2rem 0.4rem;
    gap: 0.2rem;
  }

  .pill-device-select {
    max-width: 100px;
    font-size: 0.72rem;
  }

  .nav-tabs-pill {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(16px);
    max-width: calc(100vw - 24px);
    overflow-x: auto;
  }

  .nav-pill-btn .nav-label {
    display: none;
  }

  .nav-pill-btn {
    padding: 0.5rem 0.75rem;
  }

  .timeline-hero-card {
    padding: 0.75rem;
    border-radius: 14px;
  }

  .timeline-hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .hero-stats-pill {
    width: 100%;
    justify-content: space-around;
    font-size: 0.72rem;
    padding: 0.25rem 0.5rem;
  }

  .breakdown-grid {
    grid-template-columns: 1fr !important;
  }

  .main-container {
    padding: 0.75rem 0.75rem 5rem 0.75rem !important;
  }

  .modal-content {
    margin: 1rem;
    max-width: calc(100vw - 2rem) !important;
    padding: 1.25rem !important;
  }
}



