/* SVG DEFINITIONS (HIDDEN) */
.svg-definitions {
    width: 0;
    height: 0;
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* THE GAA PITCH */
.slots.missing15 {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(6, 100px);
    gap: 14px 16px;
    width: 100%;
    max-width: 720px;
    margin: 20px auto;
    padding: 30px 25px;
    position: relative;

    /* Grass pitch background */
    background-color: #16a34a;
    border-radius: 16px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);

    /* GAA Pitch markings */
    background-image:
        /* Center line */
        linear-gradient(180deg,
            transparent 0%,
            transparent calc(50% - 1px),
            rgba(255, 255, 255, 0.5) calc(50% - 1px),
            rgba(255, 255, 255, 0.5) calc(50% + 1px),
            transparent calc(50% + 1px),
            transparent 100%
        ),
        /* 45m line - top */
        linear-gradient(180deg,
            transparent 0%,
            transparent calc(31% - 1px),
            rgba(255, 255, 255, 0.5) calc(31% - 1px),
            rgba(255, 255, 255, 0.5) calc(31% + 1px),
            transparent calc(31% + 1px),
            transparent 100%
        ),
        /* 45m line - bottom */
        linear-gradient(180deg,
            transparent 0%,
            transparent calc(69% - 1px),
            rgba(255, 255, 255, 0.5) calc(69% - 1px),
            rgba(255, 255, 255, 0.5) calc(69% + 1px),
            transparent calc(69% + 1px),
            transparent 100%
        ),
        /* 20m line - top */
        linear-gradient(180deg,
            transparent 0%,
            transparent calc(12% - 1px),
            rgba(255, 255, 255, 0.5) calc(12% - 1px),
            rgba(255, 255, 255, 0.5) calc(12% + 1px),
            transparent calc(12% + 1px),
            transparent 100%
        ),
        /* 20m line - bottom */
        linear-gradient(180deg,
            transparent 0%,
            transparent calc(88% - 1px),
            rgba(255, 255, 255, 0.5) calc(88% - 1px),
            rgba(255, 255, 255, 0.5) calc(88% + 1px),
            transparent calc(88% + 1px),
            transparent 100%
        ),
        /* Grass base */
        linear-gradient(180deg, #16a34a 0%, #15803d 100%);
}

/* Goal area rectangle - top */
.slots.missing15::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top: none;
    border-radius: 0 0 4px 4px;
    pointer-events: none;
    z-index: 0;
}

/* Goal area rectangle - bottom */
.slots.missing15::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    pointer-events: none;
    z-index: 0;
}

/* THE JERSEY */
.slots.missing15 .slot {
    background: #334155;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 10px;
    transition: all 0.3s ease-out;

    /* SVG-based jersey shape */
    clip-path: url(#tshirt);
}

/* Jersey number */
.slots.missing15 .slot::before {
    content: attr(data-number);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.2);
    font-family: 'Impact', 'Arial Black', sans-serif;
    line-height: 1;
    width: 100%;
    text-align: center;
    z-index: 1;
    pointer-events: none;
    background: transparent;
}

/* V-neck collar trim - hidden for clean look */
.slots.missing15 .slot::after {
    content: none;
}

/* Player name */
.slots.missing15 .slot span {
    font-size: 0.55rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #ffffff;
    text-align: center;
    line-height: 1.2;
    z-index: 3;
    word-break: break-word;
    letter-spacing: 0.5px;
    max-width: 90%;
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* CORRECT ANSWER - Default yellow */
.slots.missing15 .slot.correct {
    background: var(--accent-yellow);
    transform: scale(1.1);
    box-shadow: none;
    z-index: 10;
    animation: jerseyReveal 0.5s ease-out;
}

.slots.missing15 .slot.correct::before {
    color: rgba(0, 0, 0, 0.15);
}

.slots.missing15 .slot.correct span {
    color: #ffffff;
    background: transparent;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* TEAM-COLORED JERSEYS - Clean flat design */
.slots.missing15 .slot.correct.team-colored,
.slots.missing15 .slot.correct.team-colored.hooped,
.slots.missing15 .slot.correct.team-colored.striped,
.slots.missing15 .slot.correct.team-colored.solid {
    background: var(--team-primary);
    box-shadow: none;
}

.slots.missing15 .slot.correct.team-colored span {
    color: #ffffff;
    background: transparent;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.slots.missing15 .slot.correct.team-colored::before {
    color: var(--team-secondary);
    opacity: 0.5;
    text-shadow: none;
}

.slots.missing15 .slot.correct.team-colored::after {
    content: none;
}

/* JERSEY REVEAL ANIMATION */
@keyframes jerseyReveal {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* GAME OVER - Faded jerseys */
.slots.missing15 .slot.correct[style*="opacity"] {
    background: #475569;
    filter: grayscale(100%);
}

.slots.missing15 .slot.correct[style*="opacity"] span {
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.2);
}

/* GAA PITCH FORMATION: 1-3-3-2-3-3 */
/* Row 1: Goalkeeper (1 player, centered) */
.slots.missing15 .slot:nth-child(1) {
    grid-column: 3 / 5;
    grid-row: 1;
}

/* Row 2: Full-back line (3 players) */
.slots.missing15 .slot:nth-child(2) {
    grid-column: 1 / 3;
    grid-row: 2;
}
.slots.missing15 .slot:nth-child(3) {
    grid-column: 3 / 5;
    grid-row: 2;
}
.slots.missing15 .slot:nth-child(4) {
    grid-column: 5 / 7;
    grid-row: 2;
}

/* Row 3: Half-back line (3 players) */
.slots.missing15 .slot:nth-child(5) {
    grid-column: 1 / 3;
    grid-row: 3;
}
.slots.missing15 .slot:nth-child(6) {
    grid-column: 3 / 5;
    grid-row: 3;
}
.slots.missing15 .slot:nth-child(7) {
    grid-column: 5 / 7;
    grid-row: 3;
}

/* Row 4: Midfield (2 players, split) - positioned to straddle halfway line */
.slots.missing15 .slot:nth-child(8) {
    grid-column: 1 / 3;
    grid-row: 4;
}
.slots.missing15 .slot:nth-child(9) {
    grid-column: 5 / 7;
    grid-row: 4;
}

/* Row 5: Half-forward line (3 players) */
.slots.missing15 .slot:nth-child(10) {
    grid-column: 1 / 3;
    grid-row: 5;
}
.slots.missing15 .slot:nth-child(11) {
    grid-column: 3 / 5;
    grid-row: 5;
}
.slots.missing15 .slot:nth-child(12) {
    grid-column: 5 / 7;
    grid-row: 5;
}

/* Row 6: Full-forward line (3 players) */
.slots.missing15 .slot:nth-child(13) {
    grid-column: 1 / 3;
    grid-row: 6;
}
.slots.missing15 .slot:nth-child(14) {
    grid-column: 3 / 5;
    grid-row: 6;
}
.slots.missing15 .slot:nth-child(15) {
    grid-column: 5 / 7;
    grid-row: 6;
}

/* Move forwards slightly towards midfielders */
.slots.missing15 .slot:nth-child(10),
.slots.missing15 .slot:nth-child(11),
.slots.missing15 .slot:nth-child(12),
.slots.missing15 .slot:nth-child(13),
.slots.missing15 .slot:nth-child(14),
.slots.missing15 .slot:nth-child(15) {
    margin-top: 0;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .slots.missing15 {
        grid-template-rows: repeat(6, 85px);
        gap: 10px 10px;
        padding: 25px 20px;
        max-width: 620px;
    }

    .slots.missing15 .slot::before {
        font-size: 1.8rem;
    }

    .slots.missing15 .slot span {
        font-size: 0.5rem;
    }

    .slots.missing15 .slot:nth-child(8),
    .slots.missing15 .slot:nth-child(9) {
        transform: translateY(0);
    }

    .slots.missing15 .slot:nth-child(10),
    .slots.missing15 .slot:nth-child(11),
    .slots.missing15 .slot:nth-child(12),
    .slots.missing15 .slot:nth-child(13),
    .slots.missing15 .slot:nth-child(14),
    .slots.missing15 .slot:nth-child(15) {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .slots.missing15 {
        grid-template-rows: repeat(6, 70px);
        gap: 8px 8px;
        padding: 20px 15px;
        max-width: 440px;
    }

    .slots.missing15 .slot::before {
        font-size: 1.4rem;
    }

    .slots.missing15 .slot span {
        font-size: 0.45rem;
        padding: 2px 4px;
    }

    .slots.missing15 .slot:nth-child(8),
    .slots.missing15 .slot:nth-child(9) {
        transform: translateY(0);
    }

    .slots.missing15 .slot:nth-child(10),
    .slots.missing15 .slot:nth-child(11),
    .slots.missing15 .slot:nth-child(12),
    .slots.missing15 .slot:nth-child(13),
    .slots.missing15 .slot:nth-child(14),
    .slots.missing15 .slot:nth-child(15) {
        margin-top: 0;
    }
}
