#viz {
    margin: 0;
    padding: 0;
}

#field {
    margin: 0;
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
    height: 0;
    background: #034e03;
  }
  
  #scoreboard {
    position: relative;
    top: 70px;
    left: 60px;
    width: 220px;
    background: rgba(0, 0, 0, 0.75);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 6px;
    padding: 12px 14px;
    font-family: sans-serif;
    color: white;
    pointer-events: none;
    z-index: 10;
  }

#scoreboard2 {
    position: absolute;
    top: 70px;
    right: 60px;
    width: 220px;
    background: rgba(0, 0, 0, 0.75);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 6px;
    padding: 12px 14px;
    font-family: sans-serif;
    color: white;
    pointer-events: auto;
    z-index: 20;
}

  #scoreboard-hint,
  #scoreboard-hint2 p {
    font-size: 11px;
    opacity: 0.5;
    text-align: center;
  }

  #sb-receiver {
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 4px;
  }

  #sb-game {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 2px;
  }

  #sb-meta {
    font-size: 12px;
    opacity: 0.6;
    letter-spacing: 0.03em;
  }
  .ui-dialog {
    max-width: 992px;
  }
  @media only screen and (max-width : 992px) {
    .ui-dialog {
      max-width: 100vw;
    }
  }
  
  .field-svg {
    display: block;
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: calc(100% + 100px);
  }
  
  /* CSS to animate the pass lines. */
  g.play {
    stroke-dasharray: 5000;
    stroke-dashoffset: 5000;
    animation: dash 5s linear forwards;
    cursor: pointer;
  }
  
  @keyframes dash {
    to {
      stroke-dashoffset: 0;
    }
  }
  .text-blue-pats {
    color: #002244 !important;
  }
  
  .bg-blue-pats {
    background-color: #002244 !important;
  }
  
  .border-blue-pats {
    border-color: #002244 !important;
  }
  
  .text-red-pats {
    color: #c60c30 !important;
  }
  
  .bg-red-pats {
    background-color: #c60c30 !important;
  }
  
  .border-red-pats {
    border-color: #c60c30 !important;
  }
  
  .pats-red {
    color: #C60C30;
  }
  .pats-blue {
    color: #002244;
  }

#filters-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    background: #1a1a1a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 7px 12px;
    font-family: sans-serif;
    font-size: 14px;
    color: white;
    white-space: nowrap;
}

#filters-overlay button {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 2px 7px;
    cursor: pointer;
    border-radius: 3px;
    line-height: 1.6;
}

#filters-overlay button:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

#filters-overlay select {
    background: rgba(30, 30, 30, 0.9);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
}

.fo-sep {
    color: rgba(255, 255, 255, 0.2);
    padding: 0 3px;
}

.fo-label {
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

body {
    background: #111;
}

@media (max-width: 640px) {
    /* Hover scoreboard is meaningless on touch — hide it */
    #scoreboard {
        display: none;
    }

    /* Story Mode: move to bottom-right, compact size */
    #scoreboard2 {
        top: auto;
        bottom: 8px;
        right: 8px;
        left: auto;
        width: auto;
        max-width: calc(50% - 12px);
        padding: 8px 10px;
    }

    #scoreboard-hint2 {
        font-size: 10px;
        margin-bottom: 4px;
    }

    /* Scoreboard progress text smaller on mobile */
    #story-progress, #story-game-info {
        font-size: 10px;
    }

    /* Compact nav on mobile */
    nav.tom-brady {
        padding-top: 6px;
        padding-bottom: 6px;
    }

    nav.tom-brady .container {
        padding-top: 4px;
        padding-bottom: 4px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    /* Hide chart-section links (Opponent, Season, etc) — they link to homepage */
    nav.tom-brady .flex-col > ul,
    .nav-buttons {
        display: none;
    }

    /* Remove extra padding from Data Viz / Search button row */
    nav.tom-brady > .container > div:last-child ul {
        padding-top: 0;
        padding-bottom: 0;
    }

    /* Compact filters bar on mobile — allow wrapping but reduce padding */
    #filters-overlay {
        padding: 5px 8px;
        font-size: 12px;
    }

    /* Expand field to fill remaining viewport height — green background fills below SVG */
    #field {
        padding-bottom: 0;
        height: calc(100dvh - 150px);
    }
    .field-svg {
        top: unset;
    }
}
