/* ============================================================
   Bad Movie Bingo — Frontend Styles
   Matches the uploaded template exactly
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Oswald:wght@400;600;700&family=Nunito:wght@700;800;900&display=swap');

/* ---------- Wrapper & Controls ---------- */
.bmb-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 0 40px;
}

.bmb-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.bmb-btn {
    font-family: 'Bangers', cursive;
    font-size: 22px;
    letter-spacing: 2px;
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .1s, box-shadow .1s;
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}
.bmb-btn:hover  { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0,0,0,0.3); }
.bmb-btn:active { transform: translateY(2px);  box-shadow: 0 2px 0 rgba(0,0,0,0.3); }
.bmb-btn-new   { background: #e63946; color: #fff; }
.bmb-btn-print { background: #f4d03f; color: #1a1a2e; }

/* ---------- Card ---------- */
.bmb-card {
    background: #fff;
    border: 3px solid #111;
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

/* ---------- Header ---------- */
.bmb-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 12px 16px 6px;
    background: #fff;
    position: relative;
    min-height: 100px;
}

.bmb-header-popcorn {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 0 0 auto;
}
.bmb-sobad {
    background: #f4d03f;
    color: #111;
    font-family: 'Bangers', cursive;
    font-size: 12px;
    letter-spacing: 1px;
    text-align: center;
    line-height: 1.1;
    padding: 5px 8px;
    clip-path: polygon(50% 0%, 95% 15%, 100% 50%, 95% 85%, 50% 100%, 5% 85%, 0% 50%, 5% 15%);
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -8px;
    left: -8px;
    z-index: 2;
    border: 2px solid #e67e22;
}
.bmb-popcorn-icon {
    font-size: 64px;
    line-height: 1;
    margin-top: 4px;
}

.bmb-header-title {
    flex: 1;
    text-align: center;
    padding: 0 10px;
}

.bmb-title-bad-movie {
    font-family: 'Bangers', cursive;
    font-size: 62px;
    color: #111;
    letter-spacing: 3px;
    line-height: 0.95;
    text-shadow: 3px 3px 0 #e63946, -1px -1px 0 #e63946, 5px 5px 0 rgba(0,0,0,0.25);
    /* Splatter effect via text */
    position: relative;
}
.bmb-title-bad-movie::after {
    content: '';
    display: block;
    height: 3px;
    background: transparent;
}

/* Marquee box */
.bmb-marquee-box {
    background: #fff;
    border: 3px solid #111;
    border-radius: 4px;
    padding: 4px 12px 6px;
    position: relative;
    margin: 4px auto 0;
    display: inline-block;
    min-width: 220px;
}
.bmb-marquee-lights {
    /* Simulated bulb border via repeating gradient */
    position: absolute;
    inset: -3px;
    border-radius: 4px;
    background:
        repeating-linear-gradient(90deg, #f4d03f 0 10px, transparent 10px 18px) top / 100% 6px no-repeat,
        repeating-linear-gradient(90deg, #f4d03f 0 10px, transparent 10px 18px) bottom / 100% 6px no-repeat,
        repeating-linear-gradient(0deg,  #f4d03f 0 10px, transparent 10px 18px) left  / 6px 100% no-repeat,
        repeating-linear-gradient(0deg,  #f4d03f 0 10px, transparent 10px 18px) right / 6px 100% no-repeat;
    pointer-events: none;
}
.bmb-marquee-inner {
    font-family: 'Bangers', cursive;
    font-size: 52px;
    letter-spacing: 8px;
    color: #111;
    text-align: center;
    line-height: 1;
    padding: 0 4px;
}

.bmb-header-props {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}
.bmb-glasses { font-size: 40px; }
.bmb-reel    { font-size: 50px; }

/* ---------- Column Headers ---------- */
.bmb-col-headers {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
}

.bmb-col-header {
    padding: 8px 4px 6px;
    text-align: center;
    color: #fff;
    border-right: 2px solid rgba(255,255,255,0.2);
}
.bmb-col-header:last-child { border-right: none; }

.bmb-col-letter {
    font-family: 'Bangers', cursive;
    font-size: 42px;
    line-height: 1;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}
.bmb-col-icon {
    font-size: 20px;
    line-height: 1;
    margin: 2px 0;
}
.bmb-col-label {
    font-family: 'Oswald', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-transform: uppercase;
    background: rgba(0,0,0,0.35);
    padding: 2px 4px;
    border-radius: 2px;
    display: inline-block;
    margin-top: 3px;
}

/* ---------- Bingo Grid ---------- */
.bmb-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    border-top: 2px solid #111;
}

.bmb-cell {
    min-height: 82px;
    border-right: 2px solid #111;
    border-bottom: 2px solid #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    text-align: center;
    cursor: pointer;
    transition: background .15s;
    box-sizing: border-box;
    position: relative;
    background: #fff;
}
.bmb-cell:last-child,
.bmb-cell:nth-child(5n) { border-right: none; }
/* last row */
.bmb-cell:nth-child(n+21) { border-bottom: none; }

.bmb-cell:hover:not(.bmb-free-space) {
    background: #fef9e7;
}
.bmb-cell.bmb-marked {
    background: #f4d03f;
}
.bmb-cell.bmb-marked .bmb-cell-text {
    color: #1a1a2e;
}

.bmb-cell-text {
    font-family: 'Nunito', sans-serif;
    font-size: 10.5px;
    font-weight: 800;
    color: #111;
    line-height: 1.3;
}

/* Free space */
.bmb-free-space {
    background: #1a1a2e !important;
    cursor: default;
}
.bmb-free-inner {
    text-align: center;
}
.bmb-free-stars {
    font-size: 10px;
    color: #f4d03f;
    letter-spacing: 3px;
    margin-bottom: 2px;
}
.bmb-free-line1 {
    font-family: 'Oswald', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.bmb-free-line2 {
    font-family: 'Bangers', cursive;
    font-size: 20px;
    color: #fff;
    letter-spacing: 1px;
    line-height: 1.05;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}
.bmb-free-line3 {
    font-family: 'Bangers', cursive;
    font-size: 26px;
    color: #f4d03f;
    letter-spacing: 2px;
    line-height: 1;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}
.bmb-free-underline {
    height: 2px;
    background: #e63946;
    width: 80%;
    margin: 3px auto 0;
    border-radius: 1px;
}

/* ---------- Footer ---------- */
.bmb-footer {
    padding: 10px 16px 12px;
    border-top: 2px solid #111;
    background: #fff;
}

.bmb-rules {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    font-family: 'Oswald', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 8px;
}
.bmb-dot-red   { color: #e63946; font-size: 14px; }
.bmb-dot-blue  { color: #1565c0; font-size: 14px; }
.bmb-dot-green { color: #2e7d32; font-size: 14px; }
.bmb-rule-star { color: #e63946; font-size: 16px; }

.bmb-card-number-badge {
    background: #111;
    color: #f4d03f;
    font-family: 'Bangers', cursive;
    font-size: 18px;
    letter-spacing: 3px;
    text-align: center;
    padding: 6px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 220px;
    margin: 0 auto;
}
.bmb-card-arrows { font-size: 14px; color: #888; }

/* ---------- Win Banner ---------- */
.bmb-win-banner {
    display: none;
    background: #f4d03f;
    color: #1a1a2e;
    font-family: 'Bangers', cursive;
    font-size: 28px;
    letter-spacing: 3px;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0 0;
    animation: bmb-pop .3s ease;
}
.bmb-win-banner.bmb-win-show { display: block; }
@keyframes bmb-pop {
    0%   { transform: scale(0.8); opacity: 0; }
    60%  { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* ---------- Print ---------- */
@media print {
    .bmb-controls, .bmb-win-banner { display: none !important; }
    .bmb-wrapper { padding: 0; }
    .bmb-card { border: 2px solid #000; }
    .bmb-col-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .bmb-free-space { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .bmb-cell.bmb-marked { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Responsive ---------- */
@media (max-width: 500px) {
    .bmb-title-bad-movie { font-size: 38px; }
    .bmb-marquee-inner   { font-size: 34px; letter-spacing: 4px; }
    .bmb-popcorn-icon    { font-size: 44px; }
    .bmb-col-letter      { font-size: 28px; }
    .bmb-cell            { min-height: 60px; }
    .bmb-cell-text       { font-size: 9px; }
    .bmb-free-line2      { font-size: 16px; }
    .bmb-free-line3      { font-size: 20px; }
}
