/**
 * Family Hub - Television Dashboard Stylesheet
 * Optimized for 16:9 Displays (1920x1080, 4K, 720p, Amazon Fire Stick & Silk Browser)
 * High-contrast, translucent dark blue glass panels, warm ambient lighting, zero scrolling.
 */

:root {
  --color-bg-overlay: rgba(10, 20, 36, 0.45);
  --color-glass-card: rgba(11, 25, 48, 0.78);
  --color-glass-border: rgba(255, 255, 255, 0.14);
  --color-glass-glow: rgba(30, 136, 229, 0.15);
  --color-text-white: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.72);
  --color-accent-gold: #f5b82e;
  --color-accent-blue: #1e88e5;
  --color-card-light: #f8fafc;
  --color-card-dark-text: #1a202c;
  --card-radius: 18px;
  --subcard-radius: 12px;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html, body {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
  font-family: var(--font-main);
  color: var(--color-text-white);
  background-color: #07101e;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: background-image 1s ease-in-out;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dynamic Fallback Background Gradients */
body.bg-sunset {
  background-image: linear-gradient(180deg, rgba(16, 26, 52, 0.4) 0%, rgba(220, 100, 30, 0.3) 60%, rgba(10, 18, 30, 0.8) 100%),
                    radial-gradient(ellipse at 55% 55%, #f57c00 0%, #d84315 35%, #1a237e 90%);
}
body.bg-sunny {
  background-image: linear-gradient(180deg, rgba(12, 60, 130, 0.4) 0%, rgba(255, 220, 120, 0.3) 100%),
                    radial-gradient(circle at 75% 20%, #ffb300 0%, #1976d2 60%, #0d47a1 100%);
}
body.bg-cloudy {
  background-image: linear-gradient(180deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%),
                    linear-gradient(135deg, #475569 0%, #334155 50%, #1e293b 100%);
}
body.bg-rainy {
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(10, 15, 30, 0.95) 100%),
                    linear-gradient(160deg, #1e293b 0%, #0f172a 60%, #020617 100%);
}
body.bg-snow {
  background-image: linear-gradient(180deg, rgba(20, 35, 60, 0.6) 0%, rgba(10, 20, 40, 0.9) 100%),
                    linear-gradient(135deg, #cbd5e1 0%, #64748b 50%, #1e293b 100%);
}
body.bg-night {
  background-image: linear-gradient(180deg, rgba(2, 6, 23, 0.8) 0%, rgba(3, 7, 18, 0.95) 100%),
                    radial-gradient(ellipse at top, #1e1b4b 0%, #030712 70%);
}
body.bg-default_day {
  background-image: linear-gradient(180deg, rgba(10, 25, 47, 0.5) 0%, rgba(10, 25, 47, 0.8) 100%),
                    linear-gradient(135deg, #1565c0 0%, #0d47a1 50%, #0a192f 100%);
}

/* Master 16:9 Screen Container */
.hub-screen {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 2.2vh 3.2vw 2vh 3.2vw;
  box-sizing: border-box;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  position: relative;
}

/* =====================================================================
   HEADER SECTION
   ===================================================================== */
.hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 9.5vh;
  height: auto;
  margin-bottom: 1.2vh;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.family-title {
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.family-title .accent-text {
  color: var(--color-accent-gold);
}

.family-subtitle {
  font-size: clamp(0.72rem, 0.88vw, 1rem);
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-top: 3px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  line-height: 1.1;
}

.date-headline {
  font-size: clamp(0.78rem, 0.98vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 1.8px;
  color: rgba(235, 245, 255, 0.95);
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  line-height: 1.1;
  margin-bottom: 2px;
}

.clock-headline {
  font-size: clamp(2.4rem, 3.6vw, 4rem);
  font-weight: 900;
  line-height: 0.95;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.location-headline {
  font-size: clamp(0.72rem, 0.88vw, 1rem);
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  line-height: 1.1;
  margin-top: 2px;
}

/* =====================================================================
   MAIN DASHBOARD GRID (3 Columns with Independent Vertical Sizing)
   ===================================================================== */
.dashboard-grid {
  display: flex;
  flex-direction: row;
  gap: 1vw;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.grid-col {
  display: flex;
  flex-direction: column;
  gap: 1.2vh;
  min-height: 0;
}

.col-schedule-dinner {
  flex: 36;
  min-width: 0;
}

.col-calendar-gallery {
  flex: 43;
  min-width: 0;
}

.col-weather-chores {
  flex: 21;
  min-width: 0;
}

/* Height distributions per column:
   - Schedule is taller (1.4) so more events fit without cramp
   - Gallery fills Col 1 bottom (replaces dinner) — taller to fill more space
   - Calendar is spacious (1.4)
   - YouTube panel fills Col 2 bottom (1.1)
   - Weather is shorter (0.78) cutting empty space above and below
   - Chores is much taller (1.35)
*/
.col-schedule-dinner #panel-schedule {
  flex: 1.4;
  min-height: 0;
}

/* Gallery in Column 1 (full-bleed, no padding) */
.col-schedule-dinner #panel-gallery {
  flex: 1.2;
  min-height: 0;
  padding: 0 !important;
  overflow: hidden;
}

.col-calendar-gallery #panel-calendar {
  flex: 1.4;
  min-height: 0;
}

/* YouTube panel in Column 2 (Full-bleed 100% video fill) */
.col-calendar-gallery #panel-youtube {
  flex: 1.1;
  min-height: 0;
  padding: 0 !important;
  overflow: hidden;
  position: relative;
}

.col-weather-chores #panel-weather {
  flex: 0.78;
  min-height: 0;
}

.col-weather-chores #panel-chores {
  flex: 1.35;
  min-height: 0;
}

/* =====================================================================
   GLASS CARDS (Universal Styling)
   ===================================================================== */
.glass-panel {
  background: var(--color-glass-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--card-radius);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  padding: 1.2vh 1.1vw;
  overflow: hidden;
  position: relative;
}

.glass-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  pointer-events: none;
}

/* Panel Headers */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1vh;
  flex-shrink: 0;
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: 0.6vw;
}

.header-icon-badge {
  width: 1.5vw;
  height: 1.5vw;
  min-width: 20px;
  min-height: 20px;
  background: var(--color-accent-blue);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.header-icon-badge svg {
  width: 60%;
  height: 60%;
  fill: #ffffff;
}

.panel-title {
  font-size: clamp(0.92rem, 1.15vw, 1.25rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.panel-header-right {
  font-size: clamp(0.7rem, 0.82vw, 0.95rem);
  font-weight: 600;
  color: var(--color-text-muted);
}

/* =====================================================================
   CARD 1: TODAY'S SCHEDULE
   ===================================================================== */
.schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4vw;
  flex-wrap: nowrap;
  overflow: hidden;
}

.schedule-header .panel-header-left {
  display: flex;
  align-items: center;
  gap: 0.4vw;
  min-width: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.schedule-header .panel-title {
  white-space: nowrap;
  font-size: clamp(0.86rem, 1.02vw, 1.18rem);
}

.schedule-date-badge {
  font-size: clamp(0.64rem, 0.72vw, 0.82rem);
  font-weight: 700;
  color: var(--color-accent-gold);
  white-space: nowrap;
  background: rgba(245, 184, 46, 0.12);
  border: 1px solid rgba(245, 184, 46, 0.3);
  padding: 2px 6px;
  border-radius: 5px;
  margin-left: 2px;
}

.schedule-nav-container {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  margin-left: auto;
}

.schedule-pill-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 2px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.schedule-pill-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(0.64rem, 0.72vw, 0.82rem);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
  font-family: inherit;
  white-space: nowrap;
}

.schedule-pill-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.schedule-pill-btn.active {
  background: var(--color-accent-blue);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(41, 182, 246, 0.4);
  font-weight: 800;
}

.sched-arrow-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-radius: 5px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  padding: 0;
  font-family: inherit;
}

.sched-arrow-btn:hover:not(:disabled) {
  background: var(--color-accent-blue);
  border-color: var(--color-accent-blue);
  transform: scale(1.05);
}

.sched-arrow-btn:disabled,
.sched-arrow-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.schedule-day-badge {
  font-size: clamp(0.62rem, 0.7vw, 0.8rem);
  font-weight: 800;
  color: var(--color-accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1.1;
  margin-bottom: 2px;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0.7vh;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
  padding-right: 3px;
}

.schedule-list::-webkit-scrollbar {
  width: 6px;
}

.schedule-list::-webkit-scrollbar-track {
  background: transparent;
}

.schedule-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 4px;
}

.schedule-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.schedule-row {
  display: flex;
  align-items: center;
  padding: 0.65vh 0.6vw;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: clamp(0.78rem, 0.92vw, 1.05rem);
  line-height: 1.25;
  gap: 0.6vw;
}

.schedule-time-col {
  display: flex;
  flex-direction: column;
  min-width: 5.4vw;
  flex-shrink: 0;
  gap: 2px;
}

.schedule-time {
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  font-size: clamp(0.78rem, 0.92vw, 1.05rem);
  letter-spacing: -0.2px;
  line-height: 1.15;
}

.schedule-travel-time {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #90caf9;
  font-size: clamp(0.62rem, 0.7vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.1px;
  line-height: 1.1;
}

.schedule-travel-time svg {
  width: 11px;
  height: 11px;
  min-width: 11px;
  min-height: 11px;
  fill: #90caf9;
  flex-shrink: 0;
}

.schedule-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.schedule-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.schedule-title {
  font-weight: 700;
  color: #ffffff;
  font-size: clamp(0.78rem, 0.92vw, 1.05rem);
  line-height: 1.25;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  white-space: normal;
}

.schedule-location {
  font-size: clamp(0.65rem, 0.74vw, 0.85rem);
  font-weight: 600;
  color: var(--color-accent-gold);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-location svg.location-pin {
  width: 11px;
  height: 11px;
  min-width: 11px;
  min-height: 11px;
  fill: var(--color-accent-gold);
  flex-shrink: 0;
}

.schedule-location-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overflow-indicator {
  font-size: clamp(0.7rem, 0.8vw, 0.92rem);
  font-weight: 700;
  color: var(--color-accent-gold);
  padding: 0.3vh 0.4vw;
}

/* =====================================================================
   CARD 2: FAMILY CALENDAR (5 Columns)
   ===================================================================== */
.calendar-columns-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45vw;
  flex: 1;
  overflow: hidden;
}

.cal-col {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--color-card-dark-text);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease;
}

.cal-col.is-today {
  box-shadow: 0 0 0 2px var(--color-accent-gold), 0 3px 14px rgba(245, 184, 46, 0.35);
  transform: translateY(-1px);
}

.cal-col-header {
  padding: 0.35vh 0.2vw;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.cal-weekday {
  font-size: clamp(0.66rem, 0.78vw, 0.88rem);
  font-weight: 900;
  color: #0f172a;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cal-date {
  font-size: clamp(0.56rem, 0.64vw, 0.74rem);
  font-weight: 700;
  color: #1e293b;
  margin-top: 1px;
}

.cal-col-body {
  padding: 0.35vh 0.3vw;
  display: flex;
  flex-direction: column;
  gap: 0.35vh;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cal-col-body::-webkit-scrollbar {
  display: none;
}

.cal-item {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
  padding: 3px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.04);
  border-left: 2.5px solid #1e88e5;
  flex-shrink: 0;
}

.cal-item-time-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cal-dot {
  width: 5px;
  height: 5px;
  min-width: 5px;
  min-height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-time {
  font-weight: 800;
  color: #0f172a;
  font-size: clamp(0.6rem, 0.68vw, 0.78rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
  line-height: 1.15;
}

.cal-title {
  font-weight: 700;
  color: #0f172a;
  font-size: clamp(0.58rem, 0.65vw, 0.75rem);
  line-height: 1.18;
  margin-top: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  white-space: normal;
}

.cal-location {
  display: none !important;
}

.cal-overflow {
  font-size: clamp(0.54rem, 0.6vw, 0.7rem);
  font-weight: 700;
  color: #1e293b;
  margin-top: auto;
  padding: 0.1vh 0.2vw;
  text-align: center;
}

/* =====================================================================
   CARD 3: WEATHER
   ===================================================================== */
.weather-current-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2vh 0.3vw 0.5vh 0.3vw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0.6vh;
}

.weather-hero-icon {
  width: 3.8vw;
  height: 3.8vw;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.weather-hero-icon svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.weather-hero-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.weather-hero-temp {
  font-size: clamp(2rem, 2.8vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.weather-hero-condition {
  font-size: clamp(0.74rem, 0.88vw, 1rem);
  font-weight: 700;
  color: #ffffff;
  margin-top: 1px;
}

.weather-hero-hl {
  font-size: clamp(0.66rem, 0.76vw, 0.88rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 1px;
}

/* Forecast 3-Day Columns */
.weather-forecast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5vw;
  flex: 1;
  text-align: center;
}

.forecast-day-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9px;
  padding: 0.35vh 0.2vw;
}

.forecast-weekday {
  font-size: clamp(0.72rem, 0.85vw, 0.98rem);
  font-weight: 800;
  color: #ffffff;
}

.forecast-date {
  font-size: clamp(0.62rem, 0.72vw, 0.84rem);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 3px;
}

.forecast-icon {
  width: 2vw;
  height: 2vw;
  min-width: 26px;
  min-height: 26px;
  margin: 2px 0;
}

.forecast-icon svg {
  width: 100%;
  height: 100%;
}

.forecast-temps {
  font-size: clamp(0.68rem, 0.8vw, 0.92rem);
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
}

.forecast-condition {
  font-size: clamp(0.6rem, 0.7vw, 0.8rem);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 90%;
}

/* =====================================================================
   CARD 4: WHAT'S FOR DINNER
   ===================================================================== */
.dinner-panel {
  background: linear-gradient(135deg, rgba(82, 55, 22, 0.72) 0%, rgba(35, 22, 10, 0.85) 100%);
  border-color: rgba(245, 184, 46, 0.25);
}

.dinner-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8vw;
  flex: 1;
}

.meal-subcard {
  background: #fdf2dc;
  color: #2e1a06;
  border-radius: var(--subcard-radius);
  padding: 0.5vh 0.6vw;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.meal-badge {
  font-size: clamp(0.74rem, 0.88vw, 1rem);
  font-weight: 900;
  color: #2b1704;
  margin-bottom: 0.2vh;
}

.meal-image-wrap {
  width: 100%;
  height: 8.8vh;
  border-radius: 7px;
  overflow: hidden;
  background: #e2d3be;
  margin-bottom: 0.35vh;
  flex-shrink: 0;
}

.meal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.meal-name {
  font-size: clamp(0.74rem, 0.9vw, 1.05rem);
  font-weight: 800;
  color: #1a0f03;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meal-desc {
  font-size: clamp(0.62rem, 0.74vw, 0.84rem);
  font-weight: 600;
  color: #4a3418;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meal-empty {
  font-size: clamp(0.7rem, 0.8vw, 0.9rem);
  font-style: italic;
  color: #786450;
  margin: auto;
  text-align: center;
}

/* Weekend Closed View */
.dinner-weekend-closed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  background: rgba(253, 242, 220, 0.95);
  color: #2e1a06;
  border-radius: var(--subcard-radius);
  padding: 1vh 0.8vw;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.weekend-closed-icon {
  font-size: clamp(1.8rem, 2.4vw, 2.8rem);
  line-height: 1;
  margin-bottom: 0.4vh;
}

.weekend-closed-title {
  font-size: clamp(1.1rem, 1.4vw, 1.7rem);
  font-weight: 900;
  color: #2b1704;
  letter-spacing: 0.5px;
}

.weekend-closed-subtitle {
  font-size: clamp(0.72rem, 0.85vw, 0.98rem);
  font-weight: 600;
  color: #5c3915;
  margin-top: 0.3vh;
}

/* =====================================================================
   CARD 5: PHOTO GALLERY (NO VISIBLE TITLE BY SPEC)
   ===================================================================== */
.gallery-panel {
  padding: 0;
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.45);
}

.gallery-stage {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(16, 32, 58, 0.65) 0%, rgba(4, 9, 20, 0.98) 100%);
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  pointer-events: none;
  overflow: hidden;
}

.gallery-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* Ambient Color-Matched Backdrop Layer */
.gallery-ambient-bg {
  position: absolute;
  top: -18%;
  left: -18%;
  width: 136%;
  height: 136%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: blur(28px) brightness(0.55) saturate(1.4);
  opacity: 0.88;
  transform: scale(1.06);
  pointer-events: none;
  transition: filter 0.5s ease;
  will-change: transform, opacity;
}

/* Foreground Framed Photo Stage */
.gallery-frame-container {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2vh 1.2vw;
  box-sizing: border-box;
  pointer-events: none;
}

.gallery-main-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.72), 0 2px 8px rgba(0, 0, 0, 0.45);
  display: block;
  pointer-events: auto;
}

/* ---- Full-bleed override: Gallery in Column 1 ---- */
.col-schedule-dinner .gallery-panel {
  padding: 0 !important;
  border-radius: inherit;
  overflow: hidden;
}

.col-schedule-dinner .gallery-panel .gallery-stage {
  background: #000;
}

.col-schedule-dinner .gallery-panel .gallery-ambient-bg {
  display: none !important;
}

.col-schedule-dinner .gallery-panel .gallery-frame-container {
  padding: 0 !important;
  border-radius: 0;
}

.col-schedule-dinner .gallery-panel .gallery-main-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Framing Style Variations */
/* 1. Fit Frame (Clean Matte Border with subtle dark glass, no blur) */
.gallery-panel[data-framing="fit_frame"] .gallery-ambient-bg {
  display: none !important;
}

.gallery-panel[data-framing="fit_frame"] .gallery-stage {
  background: radial-gradient(circle at center, rgba(22, 42, 75, 0.8) 0%, rgba(4, 9, 18, 0.98) 100%);
}

.gallery-panel[data-framing="fit_frame"] .gallery-main-img {
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85);
}

/* 2. Cover Fill (Edge-to-edge full bleed, zoomed and cropped) */
.gallery-panel[data-framing="cover_fill"] .gallery-ambient-bg {
  display: none !important;
}

.gallery-panel[data-framing="cover_fill"] .gallery-frame-container {
  padding: 0 !important;
}

.gallery-panel[data-framing="cover_fill"] .gallery-main-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Navigation Arrows */
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.2vw;
  height: 2.2vw;
  min-width: 28px;
  min-height: 28px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, opacity 0.2s;
  opacity: 0.7;
}

.gallery-nav-btn:hover {
  background: rgba(0, 0, 0, 0.65);
  opacity: 1;
}

.gallery-nav-prev {
  left: 0.8vw;
}

.gallery-nav-next {
  right: 0.8vw;
}

.gallery-nav-btn svg {
  width: 55%;
  height: 55%;
  fill: #ffffff;
}

/* Indicator Dots */
.gallery-dots {
  position: absolute;
  bottom: 0.8vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  max-width: 80%;
  overflow: hidden;
  z-index: 10;
}

.gallery-dot {
  width: 5px;
  height: 5px;
  min-width: 5px;
  min-height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.3s, transform 0.3s;
}

.gallery-dot.active {
  background: #ffffff;
  transform: scale(1.3);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

/* =====================================================================
   CARD 5b: YOUTUBE HIGHLIGHTS PANEL
   ===================================================================== */
.youtube-panel {
  position: relative;
  background: #000;
  border-color: rgba(255, 70, 70, 0.35);
  padding: 0 !important;
  overflow: hidden;
}

/* 100% Full-Bleed Video Container */
.yt-player-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  z-index: 1;
}

.yt-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Floating Top Overlay (Subtle gradient, replay title & channel badge) */
.yt-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.6vh 0.8vw;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  pointer-events: none;
}

.yt-badge-group {
  display: flex;
  align-items: center;
  gap: 0.5vw;
}

.yt-live-indicator {
  font-size: clamp(0.55rem, 0.62vw, 0.72rem);
  font-weight: 800;
  background: #e50914;
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 8px rgba(229, 9, 20, 0.6);
}

.yt-overlay-title {
  font-size: clamp(0.68rem, 0.78vw, 0.9rem);
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.yt-channel-badge {
  font-size: clamp(0.62rem, 0.72vw, 0.84rem);
  font-weight: 700;
  color: #ff9999;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 100, 100, 0.4);
  padding: 2px 8px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  pointer-events: auto;
}

/* Floating Navigation Buttons Overlaid */
.yt-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.2vw;
  height: 2.2vw;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 6;
  opacity: 0.75;
}

.yt-nav-btn:hover {
  background: rgba(229, 9, 20, 0.85);
  border-color: #e50914;
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.yt-nav-prev {
  left: 0.7vw;
}

.yt-nav-next {
  right: 0.7vw;
}

.yt-nav-btn svg {
  width: 55%;
  height: 55%;
  fill: #ffffff;
}

.yt-nav-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

/* Floating Bottom Overlay (Title & Counter) */
.yt-overlay-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6vh 0.8vw;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1vw;
  z-index: 5;
  pointer-events: none;
}

.yt-video-title {
  font-size: clamp(0.7rem, 0.82vw, 0.96rem);
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  flex: 1;
  min-width: 0;
}

.yt-counter {
  font-size: clamp(0.62rem, 0.72vw, 0.84rem);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}


/* =====================================================================
   CARD 6: CHORES
   ===================================================================== */
.chores-header-routine {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(0.66rem, 0.74vw, 0.86rem);
  font-weight: 700;
  color: var(--color-accent-gold);
  white-space: nowrap;
}

.chores-header-routine svg {
  width: 14px;
  height: 14px;
  fill: var(--color-accent-gold);
}

.chores-list {
  display: flex;
  flex-direction: column;
  gap: 0.4vh;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chores-list::-webkit-scrollbar {
  display: none;
}

.chore-item {
  display: flex;
  align-items: center;
  gap: 0.5vw;
  padding: 0.42vh 0.5vw;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  font-size: clamp(0.7rem, 0.78vw, 0.92rem);
  user-select: none;
  transition: background 0.2s;
}

.chore-item:hover {
  background: rgba(255, 255, 255, 0.09);
}

.chore-checkbox {
  display: none !important;
}

.chore-icon {
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent-gold);
}

.chore-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.chore-text {
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* =====================================================================
   SCREEN VIEW SWITCHER & MULTI-SCREEN TOGGLE
   ===================================================================== */
.screen-view-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 20, 36, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.screen-pill-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: clamp(0.72rem, 0.8vw, 0.92rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
}

.screen-pill-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.screen-pill-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.screen-pill-btn.active {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.85), rgba(37, 99, 235, 0.9));
  border-color: rgba(147, 197, 253, 0.5);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.screen-pill-timer {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: clamp(0.68rem, 0.74vw, 0.84rem);
  padding: 6px 10px;
}

.screen-pill-timer.active {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.85), rgba(245, 158, 11, 0.9));
  border-color: rgba(253, 230, 138, 0.6);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Connection Health Status Pill (Offline/Reconnection indicator) */
.connection-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: clamp(0.65rem, 0.72vw, 0.82rem);
  font-weight: 700;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.connection-status-pill.hidden {
  display: none !important;
}

.connection-status-pill.online {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.4);
}

.connection-status-pill .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  box-shadow: 0 0 6px currentColor;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* Fire TV Silk Keep-Awake Video */
#hub-keep-awake-video {
  position: fixed;
  width: 1px;
  height: 1px;
  bottom: 0;
  right: 0;
  opacity: 0.001;
  pointer-events: none;
  z-index: -9999;
}

.screen-view {
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.screen-view.active {
  opacity: 1;
  pointer-events: auto;
}

/* =====================================================================
   SCREEN 2: TWO-WEEK CALENDAR & COMING UP LAYOUT
   ===================================================================== */
.calendar-screen-grid {
  display: flex;
  gap: 1.2vw;
  height: calc(100vh - 14vh);
  min-height: 0;
  width: 100%;
}

.twoweek-panel {
  flex: 72;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.4vh 1.2vw;
}

.twoweek-panel-header {
  margin-bottom: 0.8vh;
}

.twoweek-range-badge {
  font-size: clamp(0.7rem, 0.78vw, 0.9rem);
  font-weight: 700;
  color: var(--color-accent-gold);
  background: rgba(251, 192, 45, 0.15);
  border: 1px solid rgba(251, 192, 45, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
}

.twoweek-legend {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-pill {
  font-size: clamp(0.62rem, 0.68vw, 0.78rem);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.legend-pill.is-today-legend {
  background: rgba(251, 192, 45, 0.25);
  border: 1px solid var(--color-accent-gold);
  color: var(--color-accent-gold);
}

.twoweek-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  justify-content: space-between;
  gap: 0.6vh;
}

.twoweek-row-label {
  font-size: clamp(0.68rem, 0.74vw, 0.86rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(147, 197, 253, 0.95);
  margin-bottom: 0.2vh;
}

.twoweek-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5vw;
  flex: 1;
  min-height: 0;
}

.twoweek-col {
  background: rgba(10, 20, 36, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.twoweek-col.is-today {
  border: 1.5px solid var(--color-accent-gold);
  box-shadow: 0 0 14px rgba(251, 192, 45, 0.45);
  background: rgba(20, 34, 58, 0.75);
}

.twoweek-col-header {
  padding: 0.35vh 0.4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  color: #111827;
  border-radius: 6px 6px 0 0;
  line-height: 1.1;
}

.twoweek-weekday {
  font-size: clamp(0.64rem, 0.7vw, 0.8rem);
  text-transform: uppercase;
  font-weight: 800;
}

.twoweek-date {
  font-size: clamp(0.64rem, 0.7vw, 0.8rem);
  font-weight: 900;
}

.today-tag {
  background: #b45309;
  color: #ffffff;
  font-size: 0.54rem;
  font-weight: 900;
  padding: 1px 3px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.twoweek-col-body {
  padding: 0.4vh 0.4vw;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3vh;
}

.twoweek-no-events {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  font-style: italic;
  padding: 1vh 0;
}

.twoweek-item {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 2px 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.twoweek-item-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: #93c5fd;
  font-size: clamp(0.6rem, 0.65vw, 0.74rem);
}

.twoweek-item-title {
  font-size: clamp(0.64rem, 0.7vw, 0.8rem);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.25;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Calendar Screen Sidebar (Right Column: Coming Up + Futbol) */
.calendar-sidebar-col {
  flex: 28;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1vh;
  height: 100%;
  min-height: 0;
}

/* Coming Up Panel (Top Half) */
.coming-up-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.1vh 1.1vw;
}

.coming-up-subtitle {
  font-size: clamp(0.66rem, 0.72vw, 0.82rem);
  color: rgba(255, 255, 255, 0.65);
  font-weight: 600;
}

.coming-up-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6vh;
  padding-right: 4px;
  margin-top: 0.5vh;
}

.coming-up-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.6vh 0.7vw;
  display: flex;
  flex-direction: column;
  gap: 0.25vh;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, background 0.2s;
}

.coming-up-card.cat-birthday {
  border-left: 4px solid #ec4899;
}
.coming-up-card.cat-vacation {
  border-left: 4px solid #06b6d4;
}
.coming-up-card.cat-medical {
  border-left: 4px solid #10b981;
}
.coming-up-card.cat-holiday {
  border-left: 4px solid #f59e0b;
}
.coming-up-card.cat-event {
  border-left: 4px solid #8b5cf6;
}

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

.coming-up-badge {
  font-size: clamp(0.6rem, 0.66vw, 0.76rem);
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 12px;
  letter-spacing: 0.3px;
}

.badge-birthday {
  background: rgba(236, 72, 153, 0.2);
  border: 1px solid rgba(236, 72, 153, 0.5);
  color: #f472b6;
}

.badge-vacation {
  background: rgba(6, 182, 212, 0.2);
  border: 1px solid rgba(6, 182, 212, 0.5);
  color: #67e8f9;
}

.badge-medical {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

.badge-holiday {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fcd34d;
}

.badge-event {
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.5);
  color: #c4b5fd;
}

.coming-up-countdown {
  font-size: clamp(0.64rem, 0.7vw, 0.8rem);
  font-weight: 800;
  color: var(--color-accent-gold);
}

.coming-up-title {
  font-size: clamp(0.74rem, 0.82vw, 0.94rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.coming-up-meta {
  font-size: clamp(0.6rem, 0.66vw, 0.76rem);
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* =====================================================================
   FUTBOL PANEL (Premier League & La Liga Matches - Bottom Half)
   ===================================================================== */
.futbol-panel {
  flex: 1.15;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.1vh 1.1vw;
}

.futbol-badge {
  font-size: clamp(0.58rem, 0.65vw, 0.75rem);
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 6px;
}

.futbol-league-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.futbol-tab-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: clamp(0.58rem, 0.65vw, 0.75rem);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.futbol-tab-btn:hover {
  color: #ffffff;
}

.futbol-tab-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
}

.futbol-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6vh;
  margin-top: 0.5vh;
  padding-right: 4px;
}

.futbol-empty-msg {
  padding: 2vh 1vw;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
  font-size: 0.78rem;
}

.futbol-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.6vh 0.7vw;
  display: flex;
  flex-direction: column;
  gap: 0.3vh;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, background 0.15s ease;
}

.futbol-card:hover {
  background: rgba(20, 32, 58, 0.8);
  transform: translateY(-1px);
}

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

.futbol-league-tag {
  font-size: clamp(0.54rem, 0.6vw, 0.7rem);
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  color: #ffffff;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.tag-epl {
  background: linear-gradient(135deg, #38003c, #58005e);
  border: 1px solid #9e15a8;
  color: #ffffff;
}

.tag-la-liga {
  background: linear-gradient(135deg, #ee8707, #d9534f);
  border: 1px solid #f99c2b;
  color: #ffffff;
}

.tag-ucl {
  background: linear-gradient(135deg, #001489, #0a2e7a);
  border: 1px solid #1e50bb;
  color: #ffffff;
}

.futbol-time-label {
  font-size: clamp(0.6rem, 0.66vw, 0.76rem);
  font-weight: 700;
  color: var(--color-accent-gold);
}

.futbol-matchup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0.2vh 0;
}

.futbol-team {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.futbol-team.away-team {
  justify-content: flex-end;
  text-align: right;
}

.futbol-logo {
  width: 22px;
  height: 22px;
  max-width: 22px;
  max-height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  flex-shrink: 0;
}

.futbol-team-name {
  font-size: clamp(0.66rem, 0.74vw, 0.86rem);
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.futbol-vs-container {
  padding: 0 4px;
  flex-shrink: 0;
}

.futbol-vs {
  font-size: 0.58rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.5px;
}

.futbol-score {
  font-size: 0.74rem;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 1px 5px;
  border-radius: 4px;
}

.futbol-card-status {
  font-size: clamp(0.55rem, 0.6vw, 0.7rem);
  color: #94a3b8;
  text-align: right;
  font-style: italic;
}


/* Futbol recent-score replacement for former video area */
#panel-youtube.futbol-results-panel{display:flex;flex-direction:column;overflow:hidden;padding:15px 18px;min-width:0;color:#f5fafc;background:linear-gradient(150deg,rgba(6,40,57,.93),rgba(8,48,65,.86));}
.futbol-results-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.futbol-results-heading h2{font-size:24px;margin:0;font-weight:800;line-height:1.15}.futbol-results-heading small{font-size:11px;opacity:.78}.futbol-kicker{color:#76edc0;font-weight:800;font-size:10px;letter-spacing:.13em}.futbol-sync{font-size:10px;opacity:.78;white-space:nowrap}.futbol-scores-title{font-size:10px;font-weight:800;letter-spacing:.1em;color:#76edc0;margin:6px 0}.futbol-recent-scores{overflow:auto;flex:1;min-height:80px;scrollbar-width:thin;scrollbar-color:#548899 transparent}.futbol-club-block{border-bottom:1px solid rgba(255,255,255,.12);padding:5px 0}.futbol-club-title{font-size:12px;font-weight:800;margin-bottom:3px}.futbol-result-row{display:grid;grid-template-columns:42px minmax(0,1fr) 56px;align-items:center;gap:5px;font-size:11px;line-height:1.4;padding:2px 0}.futbol-result-teams{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.futbol-result-date,.futbol-result-league{font-size:9px;opacity:.74}.futbol-result-league{text-align:right}.futbol-result-teams b{color:#85efcb}.futbol-no-match{font-size:10px;opacity:.65;padding:3px 0 5px}.leaders-heading{margin-top:9px}.futbol-top-standings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.futbol-league-table{min-width:0;border:1px solid rgba(255,255,255,.15);background:rgba(255,255,255,.07);border-radius:8px;padding:7px}.futbol-table-title{font-size:10px;font-weight:800;color:#91e7ff;margin-bottom:5px}.futbol-leader-row{display:flex;align-items:center;gap:5px;font-size:10px;padding:3px 0}.futbol-leader-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.futbol-leader-row strong{white-space:nowrap;font-size:9px}.futbol-rank{display:grid;place-items:center;background:rgba(104,231,180,.18);color:#91f2c5;border-radius:4px;width:16px;height:16px;flex-shrink:0}.futbol-source{font-size:9px;opacity:.58;margin:6px 0 0}@media(max-width:680px){.futbol-top-standings{grid-template-columns:1fr}.futbol-results-panel{min-height:420px}.futbol-recent-scores{max-height:340px}}
.col-calendar-gallery #panel-youtube.futbol-results-panel{padding:15px 18px !important;display:flex;flex-direction:column;}

/* Display-fit: size the complete TV canvas as one unit, without changing panel data. */
#hub-display-canvas.display-fit-active {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  margin: 0;
  max-width: none;
  max-height: none;
  overflow: hidden;
}
