/**
 * Football Field Styles - dfwfan.com
 *
 * American football field layout with yard lines, end zones, and hash marks.
 */

/* ================================ */
/* APP LAYOUT                       */
/* ================================ */
.football-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg-primary);
}

/* ================================ */
/* HEADER — TOP CONTROL STRIP       */
/* ================================ */
.football-header.football-strip {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    min-height: 36px;
}

.football-strip-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.football-strip-sep {
    width: 1px;
    height: 20px;
    background: var(--color-border);
    flex-shrink: 0;
    margin: 0 2px;
}

.football-strip-btn {
    padding: 3px 8px;
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.4;
    background: var(--color-bg-header);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.football-strip-btn:hover {
    background: var(--alpha-hover);
    border-color: var(--color-home);
}

.football-header {
    background: var(--color-bg-header);
    border-bottom: var(--border-width) solid var(--color-border);
}

/* ================================ */
/* NAVIGATION                       */
/* ================================ */
.football-nav {
    background: var(--color-bg-primary);
    border-bottom: var(--border-width) solid var(--color-border);
    padding: var(--space-2) var(--space-4);
}

.football-nav ul {
    display: flex;
    gap: var(--space-4);
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.football-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    padding: var(--space-1) 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.football-nav a:hover,
.football-nav a:focus-visible {
    color: var(--color-text);
}

.football-nav a.active {
    color: var(--color-text);
    border-bottom-color: var(--color-home);
}

/* ================================ */
/* FIELD WRAPPER                    */
/* ================================ */
.field-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-6);
    overflow: hidden;
}

.field {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 2.25 / 1;
    background: var(--color-field);
    border: 4px solid var(--color-field-line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

/* ================================ */
/* END ZONES                        */
/* ================================ */
.endzone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.endzone-home {
    left: 0;
    background: var(--color-home);
    border-right: 4px solid var(--color-field-line);
}

.endzone-away {
    right: 0;
    background: var(--color-away);
    border-left: 4px solid var(--color-field-line);
}

.endzone-label {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.endzone-away .endzone-label {
    transform: rotate(0deg);
}

/* ================================ */
/* FIELD LINES                      */
/* ================================ */
.field-lines {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 10%;
    right: 10%;
}

.yard-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.7);
}

.yard-line-10 {
    left: 12.5%;
}

.yard-line-20 {
    left: 25%;
}

.yard-line-30 {
    left: 37.5%;
}

.yard-line-40 {
    left: 50%;
}

.yard-line-50 {
    left: 50%;
    background: #fff;
    width: 3px;
}

.yard-line-40-away {
    left: 62.5%;
}

.yard-line-30-away {
    left: 75%;
}

.yard-line-20-away {
    left: 87.5%;
}

.yard-line-10-away {
    left: 100%;
    transform: translateX(-2px);
}

/* ================================ */
/* YARD NUMBERS                     */
/* ================================ */
.yard-numbers {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    transform: translateY(-50%);
    pointer-events: none;
}

.yard-num {
    position: absolute;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-sans);
}

/* ================================ */
/* HASH MARKS                       */
/* ================================ */
.hash-marks {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 2px;
}

.hash-marks-top {
    top: 30%;
    background: repeating-linear-gradient(to right,
            rgba(255, 255, 255, 0.3) 0px,
            rgba(255, 255, 255, 0.3) 4px,
            transparent 4px,
            transparent 20px);
}

.hash-marks-bottom {
    bottom: 30%;
    background: repeating-linear-gradient(to right,
            rgba(255, 255, 255, 0.3) 0px,
            rgba(255, 255, 255, 0.3) 4px,
            transparent 4px,
            transparent 20px);
}

/* ================================ */
/* TOKEN LAYER                      */
/* ================================ */
#token-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

#token-layer>* {
    pointer-events: auto;
}

/* ================================ */
/* FOOTBALL TOKENS                  */
/* ================================ */
.fb-token {
    position: absolute;
    width: var(--token-size-small);
    height: var(--token-size-small);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    cursor: grab;
    user-select: none;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: 700;
    color: white;
    box-shadow: var(--shadow-token);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
    z-index: var(--z-token);
}

.fb-token.home {
    background: var(--color-home);
    border: var(--border-width-token) solid rgba(255, 255, 255, 0.3);
}

.fb-token.away {
    background: var(--color-away);
    border: var(--border-width-token) solid rgba(255, 255, 255, 0.3);
}

.fb-token.selected {
    box-shadow: var(--shadow-token-focus);
    transform: translate(-50%, -50%) scale(1.1);
    z-index: var(--z-token-dragging);
}

.fb-token.dragging {
    cursor: grabbing;
    box-shadow: var(--shadow-token-drag);
    z-index: var(--z-token-dragging);
}

/* ================================ */
/* LOS & FIRST-DOWN MARKERS         */
/* ================================ */
.los-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-home);
    z-index: 3;
    pointer-events: none;
    transform: translateX(-50%);
    opacity: 0.8;
}

.fd-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #fdd835;
    z-index: 3;
    pointer-events: none;
    transform: translateX(-50%);
    opacity: 0.8;
}

/* ================================ */
/* STRIP BUTTON ACTIVE STATE        */
/* ================================ */
.football-strip-btn.active {
    background: var(--color-home);
    color: white;
    border-color: var(--color-home);
}

/* ================================ */
/* CONTROLS                         */
/* ================================ */
.football-controls {
    position: absolute;
    bottom: var(--space-3);
    right: var(--space-3);
    display: flex;
    gap: var(--space-2);
}

.football-ctrl-btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-base);
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    color: var(--color-text);
    border: var(--border-width) solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.football-ctrl-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* ================================ */
/* NOTICE                           */
/* ================================ */
.football-notice {
    padding: var(--space-4) var(--space-6);
    background: var(--color-bg-header);
    border-top: var(--border-width) solid var(--color-border);
    text-align: center;
}

.football-notice p {
    margin: 0;
    font-size: var(--text-lg);
    color: var(--color-text-muted);
}

.football-notice strong {
    color: var(--color-text);
}

/* ================================ */
/* RESPONSIVE                       */
/* ================================ */
@media (max-width: 768px) {
    .football-header {
        padding: var(--space-3) var(--space-4);
        gap: var(--space-4);
    }

    .field-wrapper {
        padding: var(--space-4);
    }

    .yard-num {
        font-size: 1rem;
    }

    .endzone-label {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .football-nav ul {
        gap: 12px;
    }

    .football-nav a {
        font-size: 0.75rem;
    }

    .yard-num {
        font-size: 0.75rem;
    }

    .football-controls {
        bottom: 8px;
        right: 8px;
    }

    .football-ctrl-btn {
        padding: 4px 8px;
        font-size: 0.6875rem;
    }
}
