/* F1 Widgets Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@400;600;700;900&display=swap');

.f1-widget {
  font-family: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(180deg, #040028 0%, #080038 100%);
  border-radius: 16px;
  overflow: hidden;
  color: #FFFFFF;
  max-width: 100%;
  min-width: 0;
}

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

/* Global Mobile Styles (iPhone 15 Pro = 393px width) */
@media (max-width: 430px) {
  .f1-widget {
    border-radius: 12px;
  }

  .f1-widget-header {
    padding: 12px 14px !important;
    flex-wrap: wrap;
    gap: 8px;
  }

  .f1-widget-header h2 {
    font-size: 14px !important;
  }

  .f1-logo {
    width: 28px !important;
    height: 14px !important;
    font-size: 10px !important;
  }

  .f1-year-selector {
    padding: 4px 8px !important;
    font-size: 11px !important;
  }
}

/* Mini Standings Widget - after reset so padding/margin work */
.f1-mini-tabs {
  display: flex;
  background: transparent;
  padding: 16px 20px 12px 20px;
  margin: 0;
  gap: 10px;
}

@media (max-width: 430px) {
  .f1-mini-tabs {
    padding: 12px 12px 8px 12px;
    gap: 6px;
  }
}

.f1-mini-tab {
  flex: 1;
  padding: 10px 20px;
  margin: 0 4px;
  border: 2px solid #1a0050;
  background: #040028;
  color: #aaa;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.2s;
}

@media (max-width: 430px) {
  .f1-mini-tab {
    padding: 8px 12px;
    margin: 0 2px;
    font-size: 12px;
  }
}

.f1-mini-tab:hover {
  color: #fff;
  border-color: #666;
}

.f1-mini-tab.active {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.f1-mini-table {
  width: 100%;
}

.f1-mini-content {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.f1-mini-content.active {
  display: block;
  opacity: 1;
}

/* Fixed column widths for mini standings to prevent jumping */
.f1-mini-content[data-content="drivers"] .f1-standings-row {
  display: grid;
  grid-template-columns: 40px 4px 44px 30px 1fr 70px;
  align-items: center;
  gap: 8px;
}

.f1-mini-content[data-content="teams"] .f1-standings-row {
  display: grid;
  grid-template-columns: 40px 4px 44px 1fr 70px;
  align-items: center;
  gap: 8px;
}

.f1-mini-content .f1-standings-row .f1-team-stripe {
  width: 4px;
  height: 36px;
  margin-right: 0;
}

.f1-mini-content .f1-standings-row .f1-constructor-logo {
  width: 44px;
  height: 44px;
}

.f1-show-all-wrapper {
  margin: 12px 20px 16px 20px;
  display: flex;
  justify-content: center;
}

.f1-show-all {
  display: block;
  width: 100%;
  padding: 10px 20px;
  margin: 0 4px;
  background: #040028;
  border: 2px solid #1a0050;
  border-radius: 50px;
  color: #aaa;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.f1-show-all:hover {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

/* Header with Year Selector */
.f1-widget-header {
  background: linear-gradient(90deg, #E10600 0%, #FF1E00 100%);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.f1-widget-header h2 {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.f1-widget-header .f1-logo {
  width: 36px;
  height: 14px;
  background: #fff;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 9px;
  color: #E10600;
  flex-shrink: 0;
}

.f1-year-selector {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  min-width: 80px;
}

.f1-year-selector:hover {
  background: rgba(255,255,255,0.3);
}

.f1-year-selector option {
  background: #040028;
  color: #fff;
}

.f1-circuit-selector {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  min-width: 160px;
  max-width: 220px;
}

.f1-circuit-selector:hover {
  background: rgba(255,255,255,0.3);
}

.f1-circuit-selector option {
  background: #040028;
  color: #fff;
}

.f1-race-selector {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  min-width: 120px;
  max-width: 180px;
}

.f1-race-selector:hover {
  background: rgba(255,255,255,0.3);
}

.f1-race-selector option {
  background: #040028;
  color: #fff;
}

.f1-widget-content {
  padding: 0;
}


.f1-widget-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: #aaa;
}

.f1-widget-loading::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 3px solid #333;
  border-top-color: #E10600;
  border-radius: 50%;
  animation: f1-spin 1s linear infinite;
  margin-left: 12px;
}

.f1-widget-error {
  text-align: center;
  padding: 40px 20px;
  color: #aaa;
}

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

/* Driver/Constructor Standings */
.f1-standings-table {
  width: 100%;
}

.f1-standings-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}

.f1-standings-row:hover {
  background: rgba(255,255,255,0.05);
  cursor: pointer;
}

.f1-standings-row:last-child {
  border-bottom: none;
}

/* Link row styling - removes default anchor styles */
a.f1-link-row,
a.f1-link-row:visited,
a.f1-link-row:hover,
a.f1-link-row:active {
  color: inherit;
  text-decoration: none;
}

a.f1-link-row:hover:not(.f1-driver-overview-card) {
  background: rgba(255,255,255,0.05);
}

/* Calendar race name links - inherit styling */
a.f1-race-name,
a.f1-race-name:visited,
a.f1-race-name:hover,
a.f1-race-name:active {
  color: inherit;
  text-decoration: none;
}

a.f1-race-name:hover {
  color: #E10600;
}

.f1-position {
  width: 32px;
  font-size: 18px;
  font-weight: 700;
  color: #666;
  text-align: center;
}

.f1-position.top-3 {
  color: #FFD700;
}

.f1-team-stripe {
  width: 4px;
  height: 36px;
  border-radius: 2px;
  margin-right: 12px;
  background: var(--team-color, #333);
}

.f1-driver-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
  background: #0c0038;
  flex-shrink: 0;
}

.f1-constructor-logo {
  width: 54px;
  height: 36px;
  object-fit: contain;
  margin-right: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}

.f1-info {
  flex: 1;
  min-width: 0;
}

.f1-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f1-name .first-name {
  font-weight: 400;
  color: #aaa;
}

.f1-team-name {
  font-size: 11px;
  color: #aaa;
}

.f1-driver-flag {
  font-size: 18px;
  margin-right: 10px;
  flex-shrink: 0;
}

.f1-points {
  text-align: right;
  min-width: 60px;
}

.f1-points-value {
  font-size: 22px;
  font-weight: 700;
}

.f1-points-label {
  font-size: 9px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.f1-points-bar-container {
  margin-top: 6px;
  max-width: 180px;
}

.f1-points-bar {
  height: 5px;
  background: #0c0038;
  border-radius: 4px;
  overflow: hidden;
}

.f1-points-bar-fill {
  height: 100%;
  background: var(--team-color, #E10600);
  border-radius: 4px;
  transition: width 0.5s ease-out;
}

/* Mobile Standings */
@media (max-width: 430px) {
  .f1-standings-row {
    padding: 10px 12px;
  }

  .f1-position {
    width: 24px;
    font-size: 14px;
  }

  .f1-team-stripe {
    height: 28px;
    margin-right: 8px;
  }

  .f1-driver-photo {
    width: 36px;
    height: 36px;
    margin-right: 8px;
  }

  .f1-constructor-logo {
    width: 40px;
    height: 28px;
    margin-right: 8px;
  }

  .f1-driver-flag {
    font-size: 14px;
    margin-right: 6px;
  }

  .f1-name {
    font-size: 13px;
  }

  .f1-team-name {
    font-size: 10px;
  }

  .f1-points {
    min-width: 45px;
  }

  .f1-points-value {
    font-size: 16px;
  }

  .f1-points-label {
    font-size: 8px;
  }

  .f1-points-bar-container {
    max-width: 100px;
  }
}

/* Calendar Widget */
.f1-calendar-race {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}

.f1-calendar-race:hover {
  background: rgba(255,255,255,0.05);
  cursor: pointer;
}

a.f1-calendar-race {
  color: inherit;
  text-decoration: none;
}

.f1-calendar-race.next-race {
  background: linear-gradient(90deg, rgba(225, 6, 0, 0.15) 0%, rgba(225, 6, 0, 0.05) 100%);
  border-left: 4px solid #E10600;
  position: relative;
}

.f1-calendar-race.next-race .f1-race-day {
  color: #E10600;
}

.f1-calendar-race.next-race .f1-race-round {
  color: #E10600;
}

.f1-race-round {
  width: 36px;
  font-size: 18px;
  font-weight: 700;
  color: #666;
  text-align: center;
  margin-right: 14px;
  flex-shrink: 0;
}

.f1-race-flag {
  font-size: 24px;
  margin-right: 12px;
  flex-shrink: 0;
}

.f1-race-info {
  flex: 1;
  min-width: 0;
}

.f1-race-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f1-race-circuit {
  font-size: 11px;
  color: #aaa;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f1-race-status {
  text-align: right;
  min-width: 70px;
}

.f1-race-day {
  font-size: 20px;
  font-weight: 700;
}

.f1-race-month {
  font-size: 9px;
  color: #aaa;
  text-transform: uppercase;
}

.f1-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.f1-badge-next {
  background: #E10600;
  color: #fff;
}

.f1-badge-finished {
  background: #0c0038;
  color: #aaa;
}

.f1-badge-upcoming {
  background: #1E90FF;
  color: #fff;
}

.f1-sprint-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  background: linear-gradient(135deg, #FF6B00, #FF8C00);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
  vertical-align: middle;
}

/* Mobile Calendar */
@media (max-width: 430px) {
  .f1-calendar-race {
    padding: 10px 12px;
  }

  .f1-race-round {
    width: 24px;
    font-size: 14px;
    margin-right: 8px;
  }

  .f1-race-flag {
    font-size: 18px;
    margin-right: 8px;
  }

  .f1-race-name {
    font-size: 12px;
  }

  .f1-race-circuit {
    font-size: 10px;
  }

  .f1-race-status {
    min-width: 50px;
  }

  .f1-race-day {
    font-size: 16px;
  }

  .f1-race-month {
    font-size: 8px;
  }

  .f1-sprint-badge {
    margin-left: 4px;
    padding: 2px 5px;
    font-size: 8px;
  }
}

/* Calendar race with results */
.f1-calendar-race.has-results {
  cursor: pointer;
}

.f1-calendar-race.has-results.expanded {
  background: rgba(255,255,255,0.05);
  border-bottom: none;
}

.f1-race-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.f1-race-date-col {
  text-align: right;
  min-width: 36px;
}

.f1-expand-icon {
  font-size: 9px;
  color: #666;
  transition: transform 0.2s;
}

.f1-calendar-race.has-results:hover .f1-expand-icon {
  color: #fff;
}

.f1-calendar-race.expanded .f1-expand-icon {
  transform: rotate(180deg);
}

.f1-calendar-race.clickable {
  cursor: pointer;
}

.f1-link-icon {
  font-size: 16px;
  color: #666;
  transition: color 0.2s, transform 0.2s;
}

.f1-calendar-race.clickable:hover .f1-link-icon {
  color: #E10600;
  transform: translateX(3px);
}

.f1-calendar-results {
  max-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(10,0,56,0.5) 0%, rgba(4,0,40,0.3) 100%);
  border-bottom: 1px solid rgba(26,0,80,0.3);
  transition: max-height 0.3s ease-out;
}

.f1-calendar-results.expanded {
  max-height: 150px;
}

.f1-calendar-result-row {
  display: flex;
  align-items: center;
  padding: 8px 16px 8px 50px;
  gap: 10px;
}

.f1-calendar-result-pos {
  width: 24px;
  font-size: 14px;
  font-weight: 700;
  color: #666;
  text-align: center;
}

.f1-calendar-result-pos.top-3 {
  color: #FFD700;
}

.f1-calendar-result-stripe {
  width: 3px;
  height: 20px;
  border-radius: 2px;
  background: var(--team-color, #333);
}

.f1-calendar-result-name {
  font-size: 13px;
  color: #fff;
}

.f1-calendar-result-name .first-name {
  font-weight: 400;
  color: #aaa;
}

/* Skeleton Loading Animation */
@keyframes f1-skeleton-pulse {
  0% { opacity: 0.4; }
  50% { opacity: 0.7; }
  100% { opacity: 0.4; }
}

.f1-skeleton {
  background: linear-gradient(90deg, #0c0038 0%, #1a0050 50%, #0c0038 100%);
  background-size: 200% 100%;
  animation: f1-skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.f1-skeleton-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.f1-skeleton-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.f1-skeleton-text {
  height: 14px;
  flex: 1;
}

.f1-skeleton-text-short {
  height: 14px;
  width: 50px;
}

/* Race Weekend Header */
.f1-race-weekend-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.f1-race-weekend-header .f1-countdown-race-name {
  margin-bottom: 0;
}

/* Countdown Widget */
.f1-countdown-content {
  text-align: center;
  padding: 24px;
}

.f1-countdown-race-name {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

a.f1-countdown-race-name {
  color: inherit;
  text-decoration: none;
  display: block;
}

a.f1-countdown-race-name:hover {
  color: #E10600;
}

.f1-countdown-flag {
  font-size: 28px;
  vertical-align: middle;
}

.f1-countdown-circuit {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 20px;
}

.f1-countdown-timer {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.f1-countdown-unit {
  background: linear-gradient(180deg, #140050 0%, #0c0038 100%);
  padding: 14px 18px;
  border-radius: 8px;
  min-width: 70px;
  border: 1px solid rgba(40,0,100,0.6);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.f1-countdown-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.f1-countdown-label {
  font-size: 9px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.f1-countdown-circuit-img {
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 8px;
  margin-top: 12px;
}

/* Race Page Widget - Combined Race Weekend + Circuit */
.f1-race-page {
  padding: 0;
}

.f1-race-page-header {
  padding: 20px;
  background: linear-gradient(135deg, rgba(225, 6, 0, 0.15) 0%, rgba(0, 0, 0, 0) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.f1-race-page-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.f1-race-page-flag {
  font-size: 32px;
}

.f1-race-page-name {
  font-size: 24px;
  font-weight: 600;
}

a.f1-race-page-name {
  color: inherit;
  text-decoration: none;
}

a.f1-race-page-name:hover {
  color: #E10600;
}

.f1-race-page-date {
  font-size: 14px;
  color: #aaa;
  margin-top: 6px;
}

.f1-race-page-body {
  padding: 20px;
}

.f1-race-page-circuit {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.f1-race-page-circuit-img {
  width: 180px;
  height: auto;
  border-radius: 8px;
  flex-shrink: 0;
}

.f1-race-page-circuit-info {
  flex: 1;
}

.f1-race-page-circuit-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.f1-race-page-circuit-location {
  font-size: 12px;
  color: #888;
}

.f1-race-page-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(20,0,80,0.7) 0%, rgba(12,0,56,0.5) 100%);
  border-radius: 8px;
  border: 1px solid rgba(40,0,100,0.6);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.f1-race-page-stat {
  flex: 1;
  min-width: 70px;
  text-align: center;
}

.f1-race-page-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.f1-race-page-stat-label {
  font-size: 9px;
  color: #888;
  text-transform: uppercase;
}

.f1-race-page-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.f1-race-page-sessions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.f1-race-page-session {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(90deg, rgba(20,0,80,0.6) 0%, rgba(12,0,56,0.4) 100%);
  border-radius: 6px;
  border: 1px solid rgba(40,0,100,0.5);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.f1-race-page-session.race {
  background: linear-gradient(90deg, rgba(225, 6, 0, 0.25) 0%, rgba(10,0,56,0.4) 100%);
  border-left: 3px solid #E10600;
  border-top: 1px solid rgba(225,6,0,0.2);
  border-right: 1px solid rgba(26,0,80,0.3);
  border-bottom: 1px solid rgba(26,0,80,0.3);
}

.f1-race-page-session-name {
  font-weight: 600;
  min-width: 100px;
}

.f1-race-page-session-time {
  color: #aaa;
  font-size: 13px;
}

.f1-race-page-session-hours {
  margin-left: auto;
  font-weight: 600;
  color: #fff;
}

@media (max-width: 500px) {
  .f1-race-page-circuit {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .f1-race-page-circuit-img {
    width: 140px;
  }

  .f1-race-page-stats {
    justify-content: center;
  }

  .f1-race-page-session {
    flex-wrap: wrap;
  }

  .f1-race-page-session-hours {
    margin-left: 0;
    width: 100%;
    margin-top: 4px;
  }
}

.f1-countdown-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #E10600 0%, #B30500 100%);
  color: #fff;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(225, 6, 0, 0.4);
  animation: f1-live-glow 2s ease-in-out infinite;
}

.f1-countdown-live::before {
  content: '';
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  animation: f1-live-dot 1s ease-in-out infinite;
}

@keyframes f1-live-glow {
  0%, 100% { box-shadow: 0 4px 20px rgba(225, 6, 0, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(225, 6, 0, 0.7); }
}

@keyframes f1-live-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.f1-countdown-date {
  font-size: 14px;
  color: #fff;
  margin-bottom: 8px;
  font-weight: 600;
}

.f1-sessions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  padding: 0 12px;
}

.f1-session-item {
  background: #0c0038;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  min-width: 90px;
}

.f1-session-name {
  font-size: 9px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.f1-session-time {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.f1-session-day {
  font-size: 9px;
  color: #666;
}

.f1-schedule {
  margin-top: 20px;
  background: #040028;
  border-radius: 12px;
  overflow: hidden;
}

.f1-schedule-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #aaa;
  padding: 12px 16px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.f1-schedule-list {
  padding: 8px 0;
}

.f1-schedule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin: 0 12px 8px 12px;
  background: linear-gradient(90deg, rgba(20,0,80,0.6) 0%, rgba(12,0,56,0.4) 100%);
  border-radius: 6px;
  border: 1px solid rgba(40,0,100,0.5);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.f1-schedule-item:last-child {
  margin-bottom: 12px;
}

.f1-schedule-item.race {
  background: linear-gradient(90deg, rgba(225, 6, 0, 0.25) 0%, rgba(10,0,56,0.4) 100%);
  border-left: 3px solid #E10600;
  border-top: 1px solid rgba(225,6,0,0.2);
  border-right: 1px solid rgba(40,0,100,0.5);
  border-bottom: 1px solid rgba(40,0,100,0.5);
}

.f1-schedule-item.race .f1-schedule-session {
  color: #E10600;
  font-weight: 700;
}

.f1-schedule-session {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.f1-schedule-datetime {
  font-size: 13px;
  color: #aaa;
}

.f1-schedule-placeholder {
  padding: 20px 16px;
  text-align: center;
  color: #666;
  font-size: 13px;
}

@keyframes f1-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Driver/Team Cards */
.f1-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 16px;
}

.f1-driver-card, .f1-team-card {
  background: linear-gradient(180deg, #040028 0%, #080038 100%);
  border-radius: 12px;
  overflow: hidden;
  border-top: 4px solid var(--team-color, #333);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.f1-driver-card:hover, .f1-team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

a.f1-team-card {
  color: inherit;
  text-decoration: none;
  display: block;
}

.f1-card-header {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(10,0,56,0.4) 0%, rgba(4,0,40,0.2) 100%);
}

.f1-card-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #0c0038;
  flex-shrink: 0;
}

.f1-card-logo {
  width: 72px;
  height: 48px;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}

.f1-card-title {
  flex: 1;
  min-width: 0;
}

.f1-card-name {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f1-card-subtitle {
  font-size: 11px;
  color: #aaa;
}

.f1-card-body {
  padding: 16px;
}

.f1-card-stats {
  display: flex;
  gap: 16px;
  text-align: center;
}

.f1-card-stat {
  flex: 1;
  background: #0c0038;
  padding: 12px;
  border-radius: 8px;
}

.f1-card-stat-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.f1-card-stat-label {
  font-size: 9px;
  color: #aaa;
  text-transform: uppercase;
}

/* Team Card Position Badge */
.f1-card-position {
  font-size: 18px;
  font-weight: 700;
  color: var(--team-color, #aaa);
  padding: 4px 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
}

/* Extended Driver Cards - Horizontal Layout */
.f1-driver-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  padding: 12px 0;
  background: #fff;
}

@media (max-width: 430px) {
  .f1-driver-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 0;
  }
}

/* Single driver card - full width */
.f1-driver-cards-single .f1-driver-cards-grid {
  grid-template-columns: 1fr;
}

.f1-driver-card-full {
  background: linear-gradient(90deg, #040028 0%, #080038 100%);
  border-radius: 12px;
  overflow: hidden;
  border-left: 4px solid var(--team-color, #333);
  transition: transform 0.2s, box-shadow 0.2s;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
}

.f1-driver-card-full:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  cursor: pointer;
}

a.f1-driver-card-full {
  color: inherit;
  text-decoration: none;
}

.f1-driver-card-left {
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.f1-driver-card-position {
  font-size: 32px;
  font-weight: 800;
  color: var(--team-color, #fff);
  line-height: 1;
  min-width: 36px;
}

.f1-driver-card-photo-container {
  position: relative;
}

.f1-driver-card-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #0c0038;
  border: 3px solid var(--team-color, #333);
}

.f1-driver-card-number {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--team-color, #E10600);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
}

.f1-driver-card-center {
  grid-row: 1 / 3;
  padding: 16px 0;
}

.f1-driver-card-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.f1-driver-card-flag {
  font-size: 18px;
}

.f1-driver-card-name .first-name {
  font-size: 14px;
  color: #888;
}

.f1-driver-card-name .last-name {
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.f1-driver-card-team-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.f1-driver-card-team-logo {
  width: 40px;
  height: 26px;
  object-fit: contain;
}

.f1-driver-card-team-info {
}

.f1-driver-card-team {
  font-size: 13px;
  font-weight: 600;
  color: var(--team-color, #aaa);
}

.f1-driver-card-team-country {
  font-size: 10px;
  color: #666;
}

.f1-driver-card-right {
  grid-row: 1 / 3;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0,0,0,0.2);
  height: 100%;
  min-width: 100px;
  width: 100px;
}

.f1-driver-card-stats-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.f1-driver-card-stat {
  text-align: center;
}

.f1-driver-card-stat-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.f1-driver-card-stat-label {
  font-size: 8px;
  color: #888;
  text-transform: uppercase;
}

.f1-driver-card-meta {
  font-size: 9px;
  color: #666;
  text-align: center;
  line-height: 1.4;
}

/* Mobile: compact driver cards */
@media (max-width: 430px) {
  .f1-driver-card-full {
    grid-template-columns: auto 1fr auto;
  }

  .f1-driver-card-left {
    padding: 12px;
    gap: 10px;
  }

  .f1-driver-card-position {
    font-size: 24px;
    min-width: 28px;
  }

  .f1-driver-card-photo {
    width: 50px;
    height: 50px;
  }

  .f1-driver-card-number {
    font-size: 9px;
    padding: 2px 5px;
  }

  .f1-driver-card-center {
    padding: 12px 8px;
  }

  .f1-driver-card-name .first-name {
    font-size: 11px;
  }

  .f1-driver-card-name .last-name {
    font-size: 14px;
  }

  .f1-driver-card-team {
    font-size: 11px;
  }

  .f1-driver-card-team-country {
    font-size: 9px;
  }

  .f1-driver-card-right {
    padding: 12px;
    min-width: 70px;
    width: 70px;
  }

  .f1-driver-card-stat-value {
    font-size: 18px;
  }

  .f1-driver-card-meta {
    font-size: 8px;
  }
}

/* Drivers Overview Widget */
.f1-drivers-overview-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0;
  background: #fff;
}

.f1-drivers-team-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 12px;
}

.f1-drivers-team-row:first-child {
  padding-top: 0;
}

.f1-drivers-team-row:last-child {
  padding-bottom: 0;
}

.f1-drivers-team-color-bar {
  display: none;
}

.f1-drivers-team-cards {
  display: contents;
}

.f1-driver-overview-card {
  background: linear-gradient(135deg, #040028 0%, #080038 100%);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  border-top: 4px solid var(--team-color, #333);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.f1-driver-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  background: linear-gradient(135deg, #0a0040 0%, #120050 100%);
}

.f1-driver-overview-card:hover .f1-driver-overview-arrow {
  opacity: 1;
  transform: translateX(0);
}

a.f1-driver-overview-card {
  color: inherit;
  text-decoration: none;
  display: block;
}

.f1-driver-overview-position {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 24px;
  font-weight: 800;
  color: var(--team-color, #666);
  line-height: 1;
}

.f1-driver-overview-number {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #666;
}

.f1-driver-overview-photo {
  width: 80px;
  height: 80px;
  margin: 20px auto 12px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--team-color, #333);
}

.f1-driver-overview-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.f1-driver-overview-info {
  text-align: center;
  margin-bottom: 8px;
}

.f1-driver-overview-flag {
  font-size: 20px;
  margin-bottom: 4px;
}

.f1-driver-overview-name {
  line-height: 1.2;
}

.f1-driver-overview-name .first-name {
  display: block;
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.f1-driver-overview-name .last-name {
  display: block;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.f1-driver-overview-team {
  text-align: center;
  font-size: 11px;
  color: var(--team-color, #888);
  margin-bottom: 12px;
}

.f1-driver-overview-points {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
}

.f1-driver-overview-points span {
  font-size: 10px;
  color: #888;
  font-weight: 400;
}

.f1-driver-overview-arrow {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-size: 18px;
  color: var(--team-color, #888);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.2s, transform 0.2s;
}

/* Teams Overview Widget */
.f1-teams-overview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 16px;
}

.f1-team-overview-card {
  background: linear-gradient(90deg, #040028 0%, #080038 100%);
  border-radius: 12px;
  border-left: 4px solid var(--team-color, #333);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  overflow: hidden;
}

.f1-team-overview-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.f1-team-overview-card:hover .f1-team-overview-arrow {
  opacity: 1;
  transform: translateX(0);
}

a.f1-team-overview-card {
  color: inherit;
  text-decoration: none;
  display: block;
}

.f1-team-overview-main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}

.f1-team-overview-position {
  font-size: 18px;
  font-weight: 800;
  color: var(--team-color, #666);
  min-width: 32px;
}

.f1-team-overview-logo {
  width: 48px;
  height: 32px;
  object-fit: contain;
}

.f1-team-overview-name {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
}

.f1-team-overview-points {
  font-size: 18px;
  font-weight: 700;
}

.f1-team-overview-points span {
  font-size: 10px;
  color: #888;
  font-weight: 400;
}

.f1-team-overview-arrow {
  font-size: 18px;
  color: var(--team-color, #888);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.2s, transform 0.2s;
}

.f1-team-overview-drivers {
  display: flex;
  gap: 24px;
  padding: 12px 20px;
  background: rgba(0,0,0,0.2);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.f1-team-overview-driver {
  font-size: 13px;
  color: #aaa;
}

.f1-team-overview-driver-points {
  color: #666;
  font-size: 11px;
}

@media (max-width: 600px) {
  .f1-drivers-overview-grid {
    gap: 10px;
    padding: 12px;
  }

  .f1-drivers-team-row {
    border-radius: 10px;
  }

  .f1-driver-overview-card {
    padding: 12px;
  }

  .f1-driver-overview-photo {
    width: 60px;
    height: 60px;
    margin: 16px auto 8px;
  }

  .f1-driver-overview-name .last-name {
    font-size: 14px;
  }

  .f1-team-overview-main {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }

  .f1-team-overview-logo {
    width: 36px;
    height: 24px;
  }

  .f1-team-overview-name {
    font-size: 14px;
    min-width: 100px;
  }

  .f1-team-overview-drivers {
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 16px;
  }
}

/* Team Card Drivers Section */
.f1-team-cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Ensure Team Cards have at least 2 per row on wider screens */
@media (min-width: 720px) {
  .f1-team-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .f1-team-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

.f1-card-drivers {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.f1-card-driver {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  position: relative;
}

.f1-card-driver-number {
  position: absolute;
  top: -4px;
  left: -4px;
  background: var(--team-color, #E10600);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  z-index: 1;
}

.f1-card-driver-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #0c0038;
  flex-shrink: 0;
}

.f1-card-driver-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.f1-card-driver-flag {
  font-size: 16px;
  flex-shrink: 0;
}

.f1-card-driver-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.f1-card-driver-name .first-name {
  font-weight: 400;
  color: #aaa;
}

.f1-card-driver-age {
  font-size: 11px;
  color: #888;
  background: rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.f1-card-driver-details {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.f1-card-driver-stats {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.f1-card-driver-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0,0,0,0.3);
  padding: 4px 8px;
  border-radius: 4px;
  min-width: 36px;
}

.f1-card-driver-stat-value {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.f1-card-driver-stat-label {
  font-size: 8px;
  color: #888;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Circuit Widget */
.f1-circuit-content {
  padding: 20px;
}

.f1-circuit-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 16px;
  background: #0c0038;
}

.f1-circuit-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.f1-circuit-location {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 16px;
}

.f1-circuit-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.f1-circuit-stat {
  background: #0c0038;
  padding: 14px;
  border-radius: 8px;
  text-align: center;
}

.f1-circuit-stat-value {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}

.f1-circuit-stat-label {
  font-size: 9px;
  color: #aaa;
  text-transform: uppercase;
}

/* Race Results Widget */
.f1-results-header {
  text-align: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.f1-results-race-name {
  font-size: 16px;
  font-weight: 700;
}

.f1-results-flag {
  font-size: 20px;
  vertical-align: middle;
}

.f1-results-circuit {
  font-size: 13px;
  color: #aaa;
  margin-top: 4px;
}

.f1-results-date {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}

.f1-session-tabs-wrapper {
  position: relative;
}

.f1-session-tabs-wrapper::before,
.f1-session-tabs-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 24px;
  pointer-events: none;
  z-index: 1;
}

.f1-session-tabs-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #040028 0%, transparent 100%);
}

.f1-session-tabs-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #040028 0%, transparent 100%);
}

.f1-session-tabs {
  display: flex;
  gap: 8px;
  padding: 16px 20px 12px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.f1-session-tabs::-webkit-scrollbar {
  display: none;
}

.f1-session-tab {
  padding: 10px 20px;
  background: #040028;
  border: 2px solid #1a0050;
  border-radius: 50px;
  color: #aaa;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.f1-session-tab:hover {
  color: #fff;
  border-color: #666;
}

.f1-session-tab.active {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.f1-session-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.f1-session-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.f1-session-date {
  font-size: 11px;
  color: #aaa;
}

.f1-results-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 24px 16px;
  gap: 8px;
}

.f1-podium-position {
  text-align: center;
  padding: 16px 12px;
  border-radius: 8px;
  width: 90px;
}

.f1-podium-position.p1 {
  order: 2;
  background: linear-gradient(180deg, #FFD700 0%, #B8860B 100%);
  padding-bottom: 32px;
}

.f1-podium-position.p2 {
  order: 1;
  background: linear-gradient(180deg, #C0C0C0 0%, #808080 100%);
  padding-bottom: 24px;
}

.f1-podium-position.p3 {
  order: 3;
  background: linear-gradient(180deg, #CD7F32 0%, #8B4513 100%);
  padding-bottom: 16px;
}

.f1-podium-code {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  margin-bottom: 4px;
}

.f1-podium-time {
  font-size: 9px;
  color: rgba(0,0,0,0.6);
}

.f1-podium-pos {
  font-size: 28px;
  font-weight: 900;
  color: rgba(0,0,0,0.25);
  margin-top: 8px;
}

.f1-results-list {
  border-top: 1px solid rgba(255,255,255,0.1);
}

.f1-results-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}

.f1-results-row:hover {
  background: rgba(255,255,255,0.05);
  cursor: pointer;
}

a.f1-results-row {
  color: inherit;
  text-decoration: none;
}

.f1-results-row .f1-position {
  width: 32px;
  font-size: 16px;
}

.f1-results-row .f1-team-stripe {
  width: 4px;
  height: 32px;
  border-radius: 2px;
  margin-right: 10px;
  background: var(--team-color, #333);
}

.f1-results-row .f1-driver-flag {
  font-size: 16px;
  margin-right: 10px;
}

.f1-results-row .f1-info {
  flex: 1;
  min-width: 0;
}

.f1-results-row .f1-name {
  font-size: 14px;
  font-weight: 600;
}

.f1-results-row .f1-team-name {
  font-size: 11px;
  color: #aaa;
}

.f1-result-time {
  font-size: 13px;
  color: #aaa;
  font-family: 'Monaco', 'Menlo', monospace;
  text-align: right;
}

/* Responsive */
@media (max-width: 600px) {
  .f1-widget-header {
    padding: 12px 14px;
  }

  .f1-widget-header h2 {
    font-size: 13px;
  }

  .f1-year-selector {
    padding: 4px 8px;
    font-size: 12px;
    min-width: 65px;
  }

  .f1-driver-photo, .f1-card-photo {
    width: 36px;
    height: 36px;
  }

  .f1-points-value {
    font-size: 18px;
  }

  .f1-countdown-timer {
    gap: 8px;
  }

  .f1-countdown-unit {
    min-width: 55px;
    padding: 10px 12px;
  }

  .f1-countdown-value {
    font-size: 24px;
  }

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

/* Live Race Widget */
.f1-live-indicator {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.f1-live-indicator.active {
  color: #fff;
  text-shadow: 0 0 10px rgba(255,255,255,0.8);
  animation: f1-live-pulse 1.5s ease-in-out infinite;
}

@keyframes f1-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.f1-live-no-race {
  padding: 40px 20px;
  text-align: center;
}

.f1-live-status {
  font-size: 16px;
  font-weight: 600;
  color: #aaa;
  margin-bottom: 24px;
}

.f1-live-next {
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 20px;
  display: inline-block;
}

.f1-live-next-label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.f1-live-next-race {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.f1-live-next-date {
  font-size: 14px;
  color: #aaa;
}

.f1-live-positions {
  padding: 0;
}

.f1-live-race-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.f1-live-race-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.f1-live-lap {
  font-size: 14px;
  font-weight: 600;
  color: #E10600;
  background: rgba(225,6,0,0.15);
  padding: 6px 12px;
  border-radius: 20px;
}

.f1-live-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}

.f1-live-row:hover {
  background: rgba(255,255,255,0.05);
  cursor: pointer;
}

a.f1-live-row {
  color: inherit;
  text-decoration: none;
}

.f1-live-row.in-pit {
  opacity: 0.6;
  background: rgba(255,165,0,0.1);
}

.f1-live-row:last-child {
  border-bottom: none;
}

.f1-live-details {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.f1-tyre {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  background: rgba(0,0,0,0.4);
  border: 2px solid var(--tyre-color, #888);
  color: var(--tyre-color, #888);
}

.f1-last-lap {
  font-size: 11px;
  color: #666;
  font-family: 'Monaco', 'Menlo', monospace;
}

.f1-pitstops {
  font-size: 9px;
  color: #aaa;
  background: rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.f1-live-gap {
  min-width: 70px;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: #aaa;
  font-family: 'Monaco', 'Menlo', monospace;
}

.f1-live-gap.leader {
  color: #FFD700;
  font-weight: 700;
}

.f1-live-gap.pit {
  color: #FFA500;
  font-weight: 700;
}

.f1-live-debug {
  padding: 20px;
  font-size: 12px;
  color: #aaa;
  font-family: monospace;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  margin: 16px;
  word-break: break-all;
}

/* ============ COMPREHENSIVE MOBILE STYLES (iPhone 15 Pro = 393px) ============ */
@media (max-width: 430px) {
  /* Team Cards */
  .f1-team-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
    padding: 12px;
  }

  .f1-card-header {
    padding: 12px;
    gap: 10px;
  }

  .f1-card-logo {
    width: 56px;
    height: 36px;
  }

  .f1-card-name {
    font-size: 14px;
  }

  .f1-card-subtitle {
    font-size: 10px;
  }

  .f1-card-position {
    font-size: 14px;
    padding: 3px 6px;
  }

  .f1-card-body {
    padding: 12px;
  }

  .f1-card-stats {
    gap: 10px;
  }

  .f1-card-stat {
    padding: 10px 8px;
  }

  .f1-card-stat-value {
    font-size: 20px;
  }

  .f1-card-drivers {
    padding: 10px 12px;
  }

  .f1-card-driver {
    padding: 6px;
    gap: 8px;
  }

  .f1-card-driver-photo {
    width: 32px;
    height: 32px;
  }

  .f1-card-driver-flag {
    font-size: 14px;
  }

  .f1-card-driver-name {
    font-size: 12px;
  }

  .f1-card-driver-stat {
    padding: 3px 6px;
    min-width: 32px;
  }

  .f1-card-driver-stat-value {
    font-size: 11px;
  }

  /* Drivers Overview */
  .f1-drivers-overview-grid {
    gap: 10px;
    padding: 10px;
  }

  .f1-drivers-team-row {
    border-radius: 10px;
  }

  .f1-driver-overview-card {
    padding: 10px;
  }

  .f1-driver-overview-position {
    font-size: 18px;
    top: 8px;
    left: 8px;
  }

  .f1-driver-overview-number {
    font-size: 10px;
    top: 8px;
    right: 8px;
  }

  .f1-driver-overview-photo {
    width: 50px;
    height: 50px;
    margin: 12px auto 8px;
    border-width: 2px;
  }

  .f1-driver-overview-flag {
    font-size: 16px;
  }

  .f1-driver-overview-name .first-name {
    font-size: 9px;
  }

  .f1-driver-overview-name .last-name {
    font-size: 13px;
  }

  .f1-driver-overview-team {
    font-size: 9px;
    margin-bottom: 8px;
  }

  .f1-driver-overview-points {
    font-size: 16px;
  }

  .f1-driver-overview-points span {
    font-size: 8px;
  }

  .f1-driver-overview-arrow {
    font-size: 14px;
    bottom: 8px;
    right: 8px;
  }

  /* Teams Overview */
  .f1-teams-overview-list {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .f1-team-overview-main {
    gap: 10px;
    padding: 12px 14px;
  }

  .f1-team-overview-position {
    font-size: 16px;
    min-width: 28px;
  }

  .f1-team-overview-logo {
    width: 40px;
    height: 28px;
  }

  .f1-team-overview-name {
    font-size: 13px;
  }

  .f1-team-overview-points {
    font-size: 15px;
  }

  .f1-team-overview-arrow {
    font-size: 16px;
  }

  .f1-team-overview-drivers {
    gap: 16px;
    padding: 10px 14px;
  }

  .f1-team-overview-driver {
    font-size: 12px;
  }

  /* Race Page */
  .f1-race-page-header {
    padding: 14px;
  }

  .f1-race-page-flag {
    font-size: 26px;
  }

  .f1-race-page-name {
    font-size: 18px;
  }

  .f1-race-page-date {
    font-size: 12px;
  }

  .f1-race-page-body {
    padding: 14px;
  }

  .f1-race-page-circuit {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .f1-race-page-circuit-img {
    width: 120px;
  }

  .f1-race-page-circuit-name {
    font-size: 15px;
  }

  .f1-race-page-circuit-location {
    font-size: 11px;
  }

  .f1-race-page-stats {
    gap: 8px;
    padding: 12px;
    margin-bottom: 16px;
  }

  .f1-race-page-stat {
    min-width: 55px;
  }

  .f1-race-page-stat-value {
    font-size: 14px;
  }

  .f1-race-page-stat-label {
    font-size: 8px;
  }

  .f1-race-page-section-title {
    font-size: 12px;
  }

  .f1-race-page-sessions {
    gap: 6px;
  }

  .f1-race-page-session {
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .f1-race-page-session-name {
    font-size: 13px;
    min-width: 80px;
  }

  .f1-race-page-session-time {
    font-size: 11px;
  }

  .f1-race-page-session-hours {
    font-size: 12px;
    margin-left: 0;
    width: 100%;
    margin-top: 4px;
  }

  /* Live Race Widget */
  .f1-live-no-race {
    padding: 24px 14px;
  }

  .f1-live-status {
    font-size: 14px;
  }

  .f1-live-next {
    padding: 14px;
  }

  .f1-live-next-race {
    font-size: 15px;
  }

  .f1-live-next-date {
    font-size: 12px;
  }

  .f1-live-race-header {
    padding: 12px 14px;
  }

  .f1-live-race-name {
    font-size: 14px;
  }

  .f1-live-lap {
    font-size: 12px;
    padding: 4px 10px;
  }

  .f1-live-row {
    padding: 10px 12px;
  }

  .f1-live-details {
    font-size: 12px;
  }

  .f1-live-gap {
    font-size: 11px;
  }

  /* Countdown Widget */
  .f1-countdown-content {
    padding: 16px 12px;
  }

  .f1-countdown-race-name {
    font-size: 16px;
  }

  .f1-countdown-flag {
    font-size: 22px;
  }

  .f1-countdown-circuit {
    font-size: 12px;
  }

  .f1-countdown-date {
    font-size: 11px;
  }

  .f1-countdown-timer {
    gap: 6px;
  }

  .f1-countdown-unit {
    min-width: 48px;
    padding: 8px 10px;
  }

  .f1-countdown-value {
    font-size: 20px;
  }

  .f1-countdown-label {
    font-size: 8px;
  }

  .f1-countdown-circuit-img {
    height: 60px;
  }

  /* Race Results Widget */
  .f1-results-header {
    padding: 12px 14px;
  }

  .f1-results-race-name {
    font-size: 14px;
  }

  .f1-results-circuit {
    font-size: 11px;
  }

  .f1-results-date {
    font-size: 10px;
  }

  .f1-session-tabs {
    padding: 12px 14px 10px 14px;
    gap: 6px;
  }

  .f1-session-tab {
    padding: 8px 14px;
    font-size: 12px;
  }

  .f1-session-info {
    padding: 8px 14px;
  }

  .f1-session-name {
    font-size: 12px;
  }

  .f1-session-date {
    font-size: 10px;
  }

  .f1-results-podium {
    padding: 16px 10px;
    gap: 6px;
  }

  .f1-podium-position {
    width: 75px;
    padding: 12px 8px;
  }

  .f1-podium-position.p1 {
    padding-bottom: 24px;
  }

  .f1-podium-position.p2 {
    padding-bottom: 18px;
  }

  .f1-podium-position.p3 {
    padding-bottom: 12px;
  }

  .f1-podium-code {
    font-size: 14px;
  }

  .f1-podium-time {
    font-size: 8px;
  }

  .f1-podium-pos {
    font-size: 22px;
  }

  .f1-results-row {
    padding: 10px 12px;
  }

  .f1-results-row .f1-position {
    width: 26px;
    font-size: 14px;
  }

  .f1-results-row .f1-team-stripe {
    height: 26px;
    margin-right: 8px;
  }

  /* Circuit Widget */
  .f1-circuit-content {
    padding: 14px;
  }

  .f1-circuit-name {
    font-size: 16px;
  }

  .f1-circuit-location {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .f1-circuit-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .f1-circuit-stat {
    padding: 10px 6px;
  }

  .f1-circuit-stat-value {
    font-size: 14px;
  }

  .f1-circuit-stat-label {
    font-size: 8px;
  }

  /* Mini Standings (Compact Widget with Tabs) */
  .f1-mini-content[data-content="drivers"] .f1-standings-row {
    grid-template-columns: 32px 4px 36px 24px 1fr 60px;
    gap: 6px;
  }

  .f1-mini-content[data-content="teams"] .f1-standings-row {
    grid-template-columns: 32px 4px 36px 1fr 60px;
    gap: 6px;
  }

  .f1-mini-content .f1-standings-row .f1-constructor-logo {
    width: 36px;
    height: 36px;
  }

  .f1-show-all-wrapper {
    margin: 10px 12px 14px 12px;
  }

  .f1-show-all {
    padding: 8px 14px;
    font-size: 12px;
  }
}
