
/* --- Base Styles & Variables --- */
:root {
    --mark-color: rgba(255, 0, 0, 0.5); /* Default Red Dabber */
    --flash-color: rgba(255, 200, 0, 0.5);
    --btn-purple: #8a2be2;
    --btn-purple-hover: #7b24cc;
    --btn-yellow: #ffd700;
    --btn-yellow-hover: #ffcc00;
    --btn-blue: #1e90ff;
    --btn-blue-hover: #1c80e8;
    --btn-text-light: #ffffff;
    --btn-text-dark: #333333;
    --btn-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    --btn-inset-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.2);
    --chunky-font: 'Poppins', 'Arial Black', sans-serif;
    --status-bg: #f0f0f0;
    --status-ball-purple: #8a2be2;
    --status-ball-highlight: #c797ff;
    --status-ball-shadow: rgba(0, 0, 0, 0.5);
    --info-box-pink: #ffe4e1;
    --info-box-border: #ffcad4;
    --info-box-text: #800080;
    --waiting-ball-orange: #ffa500;
    --waiting-ball-blue: #1e90ff;
    --waiting-ball-yellow: #ffd700;
    --waiting-ball-text: #ffffff;
}

body { /* ... remains same ... */
    font-family: 'Inter', sans-serif; margin: 0; padding: 15px; background-color: #f4f7f6; display: flex; justify-content: center; align-items: flex-start; min-height: 100vh; color: #333; line-height: 1.5;
}
.app-container { /* ... remains same ... */
    background-color: #ffffff; padding: 20px 25px; border-radius: 12px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); width: 100%; max-width: 950px; box-sizing: border-box; display: flex; flex-direction: column; gap: 15px;
}
.banner-container { /* ... remains same ... */
    width: 100%; margin-bottom: 15px; line-height: 0; border-radius: 8px; overflow: hidden;
}
#app-banner { /* ... remains same ... */
    display: block; width: 100%; height: auto; max-height: 200px; object-fit: cover;
}
/* REMOVED h1 styles */

/* --- Controls Section (Simplified) --- */
.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center the single button */
    align-items: center;
    gap: 15px;
    padding: 10px 0; /* Reduced padding */
    border-bottom: 1px solid #e0e0e0;
    min-height: 60px; /* Ensure some height even with one button */
}

/* General Button Styling (Apply to Auto Mark & Call Bingo) */
.controls button,
.call-area button { /* Apply base style to both */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    border: none;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease-out;
    box-shadow: var(--btn-shadow);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.controls button i,
.call-area button i {
    font-size: 1.2em;
    transition: transform 0.2s ease;
}
.controls button:hover,
.call-area button:hover {
    filter: brightness(1.1);
    box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}
.controls button:hover i,
.call-area button:hover i {
    transform: scale(1.1);
}
.controls button:active,
.call-area button:active {
    filter: brightness(0.95);
    box-shadow: var(--btn-inset-shadow);
    transform: translateY(1px);
}
.controls button:active i,
.call-area button:active i {
    transform: scale(1);
}

/* REMOVED Select Wrapper Styles */
/* .select-wrapper { ... } */
/* .select-wrapper label { ... } */
/* .select-wrapper i { ... } */
/* .controls select { ... } */

/* --- Auto Mark Button: Bolder/Brighter Blue --- */
#auto-mark-toggle {
    background: linear-gradient(145deg, var(--btn-blue), #6495ed); /* Blue gradient */
    color: var(--btn-text-light);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 15px 30px; /* Make it larger */
    font-size: 1.1em;
}
#auto-mark-toggle:hover {
    background: linear-gradient(145deg, var(--btn-blue-hover), #73a0f0);
}
#auto-mark-toggle i {
    color: var(--btn-text-light); /* White icon */
    font-size: 1.3em; /* Slightly larger icon */
}
#auto-mark-toggle.active { /* Greenish tint when active */
    background: linear-gradient(145deg, #5cb85c, #8fbc8f); /* Green gradient */
    color: var(--btn-text-light);
    border-color: rgba(255,255,255,0.2);
}
#auto-mark-toggle.active i {
    color: var(--btn-text-light);
}

/* REMOVED Print Button Styles */
/* #print-button { ... } */

/* --- Status Display Section --- (Styles remain the same) */
.status-display { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 15px; background-color: var(--status-bg); padding: 10px 15px; border-radius: 10px; border: 1px solid #dcdcdc; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); }
.called-number-area { display: flex; align-items: center; }
.bingo-ball-display.status-ball { width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, var(--status-ball-highlight), var(--status-ball-purple) 80%); box-shadow: inset -4px -4px 10px rgba(0, 0, 0, 0.4), 4px 4px 8px rgba(0, 0, 0, 0.3); display: flex; justify-content: center; align-items: center; position: relative; border: 2px solid rgba(255,255,255,0.3); }
#called-number-display { font-family: var(--chunky-font); font-size: 2.2em; font-weight: 900; color: var(--btn-text-light); line-height: 1; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); background: none; border-radius: 0; min-width: auto; height: auto; }
.pulse { animation: pulse-ball 0.6s ease-out; }
@keyframes pulse-ball { 0% { transform: scale(1); box-shadow: inset -4px -4px 10px rgba(0, 0, 0, 0.4), 4px 4px 8px rgba(0, 0, 0, 0.3); } 50% { transform: scale(1.15); box-shadow: inset -4px -4px 10px rgba(0, 0, 0, 0.4), 6px 6px 12px rgba(0, 0, 0, 0.35); } 100% { transform: scale(1); box-shadow: inset -4px -4px 10px rgba(0, 0, 0, 0.4), 4px 4px 8px rgba(0, 0, 0, 0.3); } }
.info-boxes-area { display: flex; flex-direction: column; gap: 8px; flex-grow: 1; align-items: flex-start; }
.info-box { background-color: var(--info-box-pink); border: 1px solid var(--info-box-border); color: var(--info-box-text); padding: 5px 15px; border-radius: 6px; font-family: var(--chunky-font); font-size: 0.9em; font-weight: 700; text-transform: uppercase; text-align: left; box-shadow: inset 0 0 4px rgba(0,0,0,0.05); white-space: nowrap; }
.info-box span { font-weight: 900; margin-left: 5px; }
.sweating-on-box { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
#waiting-numbers-display span { display: inline-block; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; text-align: center; font-family: var(--chunky-font); font-size: 0.9em; font-weight: 900; color: var(--waiting-ball-text); box-shadow: inset -1px -1px 3px rgba(0,0,0,0.4), 1px 1px 2px rgba(0,0,0,0.2); margin-left: 0; margin-right: 3px; }
#waiting-numbers-display span[data-color="orange"] { background-color: var(--waiting-ball-orange); }
#waiting-numbers-display span[data-color="blue"] { background-color: var(--waiting-ball-blue); }
#waiting-numbers-display span[data-color="yellow"] { background-color: var(--waiting-ball-yellow); color: var(--btn-text-dark); }
#waiting-numbers-display span[data-color="default"] { background-color: #aaaaaa; }

/* --- Call Area Styling --- (Styles remain the same) */
.call-area { display: flex; justify-content: center; align-items: center; padding: 10px 0; min-height: 60px; }
#call-bingo-btn { background: linear-gradient(145deg, var(--btn-purple), #aa66ee); color: var(--btn-text-light); border: 1px solid rgba(255,255,255,0.2); font-weight: 700; padding: 12px 30px; font-size: 1.1em; }
#call-bingo-btn:hover { background: linear-gradient(145deg, var(--btn-purple-hover), #bb88ff); }
#call-bingo-btn i { color: var(--btn-text-light); }
#call-bingo-btn:disabled { background: #bdbdbd; color: #757575; box-shadow: var(--btn-inset-shadow); transform: none; filter: grayscale(50%); }
#call-bingo-btn:disabled i { color: #757575; }

/* --- Bingo Sheet Section --- (Styles remain the same) */
.bingo-sheet { text-align: center; }
.game-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; padding: 15px; border-radius: 8px; background-color: #cccccc; border: 1px solid rgba(0,0,0,0.1); transition: background-color 0.5s ease; }
.panel { background-color: white; border-width: 5px; border-style: solid; border-color: black; display: grid; grid-template-columns: repeat(9, 1fr); grid-template-rows: repeat(3, auto); border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.15); transition: border-color 0.5s ease; position: relative; }
.panel-cell { border: 1px solid #cccccc; display: flex; justify-content: center; align-items: center; aspect-ratio: 1 / 1; font-size: clamp(0.8rem, 2.2vw, 1.1rem); font-weight: bold; cursor: default; user-select: none; position: relative; min-height: 30px; padding: 1px; box-sizing: border-box; overflow: hidden; text-align: center; transition: background-color 0.3s ease; }
.panel-cell.number { cursor: pointer; }
.panel-cell.number:hover { background-color: #f0f8ff; }
.panel-cell.marked { color: #a8a8a8; font-weight: normal; }
.panel-cell.marked::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 85%; height: 85%; background-color: var(--mark-color, rgba(255, 0, 0, 0.5)); border-radius: 50%; pointer-events: none; border: 1px solid rgba(0,0,0,0.1); box-sizing: border-box; }
@keyframes flash-warning { 0%, 100% { background-color: white; } 50% { background-color: var(--flash-color); } }
.panel-cell.one-to-go { animation: flash-warning 1.2s infinite ease-in-out; }

/* --- Book ID Footer Styling --- (Styles remain the same) */
.book-id-footer { font-size: 0.9em; color: #6c757d; margin-top: 20px; text-align: center; font-family: 'Courier Prime', monospace; padding: 5px; border-top: 1px solid #e0e0e0; }

/* --- Dynamic Game/Panel Colors --- (No changes needed here) */
.game-color-0 { background-color: #FFB3BA; } /* etc. */
.panel-border-0 { border-color: #FFB3BA !important; } /* etc. */
.game-color-1 { background-color: #FFDFBA; }
.panel-border-1 { border-color: #FFDFBA !important; }
.game-color-2 { background-color: #FFFFBA; }
.panel-border-2 { border-color: #FFFFBA !important; }
.game-color-3 { background-color: #BAFFC9; }
.panel-border-3 { border-color: #BAFFC9 !important; }
.game-color-4 { background-color: #BAE1FF; }
.panel-border-4 { border-color: #BAE1FF !important; }
.game-color-5 { background-color: #E0BBE4; }
.panel-border-5 { border-color: #E0BBE4 !important; }
.game-color-6 { background-color: #D1E7DD; }
.panel-border-6 { border-color: #D1E7DD !important; }
.game-color-7 { background-color: #F8D7DA; }
.panel-border-7 { border-color: #F8D7DA !important; }

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .app-container { padding: 15px; }
    .banner-container { margin-bottom: 10px; }
    .controls { padding: 5px 0; min-height: 50px; } /* Adjust padding/height */
    .controls button { padding: 10px 20px; font-size: 1em; } /* Adjust auto-mark size */
    /* REMOVED select wrapper styles */
    .status-display { flex-direction: column; align-items: center; padding: 10px; }
    .bingo-ball-display.status-ball { width: 60px; height: 60px; }
    #called-number-display { font-size: 1.8em; }
    .info-boxes-area { align-items: center; width: 100%; }
    .info-box { font-size: 0.85em; padding: 4px 12px; text-align: center; }
    #waiting-numbers-display span { width: 25px; height: 25px; line-height: 25px; font-size: 0.8em; }
    .call-area { padding: 8px 0; min-height: 50px; }
    #call-bingo-btn { padding: 10px 15px; font-size: 1em; }
    #call-bingo-btn span { display: none; } /* Hide text on call button too */
    .game-container { gap: 8px; padding: 10px; }
    .panel { border-width: 4px; }
    .panel-cell { font-size: clamp(0.75rem, 2vw, 1rem); }
    .book-id-footer { margin-top: 15px; font-size: 0.8em;}
}

@media (max-width: 480px) {
    body { padding: 10px; }
    .app-container { padding: 10px; gap: 10px; }
    .banner-container { margin-bottom: 8px; }
    /* REMOVED H1 styles */
    .controls { padding: 5px 0; min-height: 45px; }
    .controls button { width: 60%; padding: 10px 5px; font-size: 0.9em; } /* Make auto-mark wider */
    .controls button i { font-size: 1.1em; }
    /* REMOVED select wrapper styles */
    .status-display { gap: 10px; }
    .bingo-ball-display.status-ball { width: 55px; height: 55px; }
    #called-number-display { font-size: 1.6em; }
    .info-box { font-size: 0.8em; padding: 3px 10px; }
    #waiting-numbers-display span { width: 22px; height: 22px; line-height: 22px; font-size: 0.75em; }
    .call-area { gap: 8px; padding: 5px 0; min-height: 40px; }
    #call-bingo-btn { width: 70%; padding: 10px 5px; font-size: 0.9em; }
    .game-container { grid-template-columns: 1fr; gap: 10px; padding: 8px; }
    .panel-cell { min-height: 25px; font-size: clamp(0.7rem, 2.5vw, 0.9rem); }
    .panel { border-width: 3px; }
    .book-id-footer { margin-top: 10px; font-size: 0.75em;}
}
