/* ── TOOL VARIABLES ──────────────────────────────────────── */
:root {
    --primary:       #4a6bff;
    --primary-dark:  #3a56d4;
    --secondary:     #ff6b6b;
    --accent:        #4cc9f0;
    --dark:          #2b2d42;
    --light:         #f8f9fa;
    --gray:          #6c757d;
    --success:       #4caf50;
    --success-dark:  #3d8b40;
    --warning:       #ff9800;
    --danger:        #f44336;
    --danger-dark:   #d32f2f;
    --border-radius: 12px;
    --shadow:        0 8px 20px rgba(0,0,0,0.12);
    --transition:    all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark);
    line-height: 1.6;
}

/* Fix: main-container was self-closing — content was outside it */
.main-container {
    background: linear-gradient(135deg, #11489b 0%, #e4e7f1 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header-title {
    text-align: center;
    padding: 30px 20px;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #d5daed, #e9d757);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

.subtitle {
    font-size: 1.2rem;
    color: #ffff;
    max-width: 700px;
    margin: 0 auto 30px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* ── BINGO CARD ──────────────────────────────────────────── */
.bingo-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
    text-align: center;
}

.current-number {
    font-size: 8rem;
    font-weight: 800;
    color: var(--primary);
    margin: 30px 0;
    text-shadow: 0 4px 10px rgba(0,0,0,0.1);
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

/* ── CONTROLS ────────────────────────────────────────────── */
.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.mode-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    gap: 2px;
    align-self: center;
}

.mode-btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: none;
}

.mode-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(74,107,255,0.3);
    transform: none;
}

.mode-btn:hover:not(.active) {
    background: #e2e8f0;
    transform: none;
    box-shadow: none;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 10px 16px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.speed-control label {
    font-weight: 600;
    color: var(--dark);
    white-space: nowrap;
    font-size: 0.9rem;
}

.speed-control select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.speed-control select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74,107,255,0.2);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 13px 26px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    font-family: inherit;
}

button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

button:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-auto  { background: var(--success); }
.btn-auto:hover:not(:disabled)  { background: var(--success-dark); }

.btn-manual { background: var(--primary); }

.btn-pause { background: var(--warning); color: white; }
.btn-pause:hover:not(:disabled) { background: #e68900; }

.btn-reset { background: var(--danger); }
.btn-reset:hover:not(:disabled) { background: var(--danger-dark); }

/* ── PROGRESS BAR ────────────────────────────────────────── */
.progress-wrap {
    margin: 16px 0 8px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 6px;
    font-weight: 600;
}

.progress-bar-bg {
    background: #e2e8f0;
    border-radius: 20px;
    height: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 20px;
    transition: width 0.4s ease;
    width: 0%;
}

/* ── NUMBERS GRID ────────────────────────────────────────── */
.numbers-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin-top: 30px;
    background: linear-gradient(135deg, #11489b 0%, #e4e7f1 100%);
    border-radius: var(--border-radius);
    padding: 12px;
}

.number {
    background: white;
    border: 2px solid #358137;
    border-radius: 50%;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number.called {
    background: #358137;
    color: white;
    transform: scale(0.78);
    border-color: #2d6e30;
}

.number.last-called {
    background: var(--secondary);
    border-color: #d94f4f;
    transform: scale(1.08);
    box-shadow: 0 0 14px rgba(255,107,107,0.5);
    z-index: 1;
}

/* ── CALLED NUMBERS LIST ─────────────────────────────────── */
.called-numbers {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-top: 24px;
    display: block;
}

.called-numbers h3 {
    margin-bottom: 15px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.called-numbers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    min-height: 40px;
}

.called-number {
    background: #ebebf1;
    color: var(--dark);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid #f90303;
}

.called-number.latest {
    background: var(--secondary);
    color: white;
    border-color: #d94f4f;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    font-weight: 600;
    color: var(--gray);
}

.stat { text-align: center; }

.stat-value {
    font-size: 1.5rem;
    color: var(--primary);
    margin-top: 5px;
}

/* ── COMPLETE BANNER ─────────────────────────────────────── */
.complete-banner {
    display: none;
    background: linear-gradient(135deg, var(--success), #2e7d32);
    color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    animation: fadeIn 0.5s ease-out;
}

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.06); }
    100% { transform: scale(1); }
}

.pulse { animation: pulse 0.5s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.5s ease-out; }

@keyframes numberPop {
    0%   { transform: scale(0.6); opacity: 0; }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.number-pop { animation: numberPop 0.45s cubic-bezier(.175,.885,.32,1.275) forwards; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    .controls { flex-direction: column; align-items: center; }
    button { width: 100%; max-width: 300px; }
    .mode-toggle { width: 100%; max-width: 300px; }
    .current-number { font-size: 5rem; min-height: 120px; }
    .numbers-grid { grid-template-columns: repeat(5, 1fr); }
    .speed-control { width: 100%; max-width: 300px; justify-content: space-between; }
}

/* ── SEO CONTENT BLOCK ───────────────────────────────────────
   Prefix: ambng__ (Albert Master BiNGo)
   100% isolated from tool CSS and any include
─────────────────────────────────────────────────────────── */
.ambng__wrapper {
    --ambng-blue:    #4a6bff;
    --ambng-blue-dk: #3a56d4;
    --ambng-green:   #4caf50;
    --ambng-red:     #ff6b6b;
    --ambng-amber:   #d97706;
    --ambng-black:   #2b2d42;
    --ambng-white:   #ffffff;
    --ambng-bg:      #f8fafc;
    --ambng-surface: #ffffff;
    --ambng-border:  #e2e8f0;
    --ambng-muted:   #6c757d;
    --ambng-text:    #2b2d42;

    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--ambng-bg);
    color: var(--ambng-text);
    padding: 64px 20px;
    box-sizing: border-box;
    width: 100%;
    margin-top: 0;
}

.ambng__wrapper * { box-sizing: border-box; }
.ambng__inner { width: 95%; margin: 0 auto; }

.ambng__divider { display: flex; align-items: center; gap: 14px; margin: 52px 0 30px; }
.ambng__divider-line { flex: 1; height: 1px; background: var(--ambng-border); }
.ambng__divider-dot  { width: 8px; height: 8px; border-radius: 50%; background: var(--ambng-blue); flex-shrink: 0; }

.ambng__h2 { font-size: 1.55rem; font-weight: 800; color: var(--ambng-black); margin: 0 0 6px; line-height: 1.2; letter-spacing: -0.01em; }
.ambng__h2 span { color: var(--ambng-blue); }
.ambng__lead { font-size: 0.97rem; color: var(--ambng-muted); margin: 0 0 22px; line-height: 1.65; }
.ambng__body { font-size: 0.97rem; line-height: 1.78; color: #334155; margin: 0 0 16px; }
.ambng__body strong { color: var(--ambng-black); font-weight: 700; }

/* Hero */
.ambng__hero {
    background: linear-gradient(135deg, #11489b 0%, #1e293b 60%, #2b1a6b 100%);
    border-radius: 16px; padding: 44px 40px; margin-bottom: 48px;
    position: relative; overflow: hidden;
}
.ambng__hero::after {
    content: '🎱';
    position: absolute; right: 20px; top: -10px;
    font-size: 7rem; opacity: 0.08;
    line-height: 1; pointer-events: none; user-select: none;
}
.ambng__hero-tag {
    display: inline-block;
    background: rgba(74,107,255,0.3); color: #93c5fd;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; padding: 4px 12px;
    border-radius: 20px; margin-bottom: 14px;
}
.ambng__hero-title {
    font-size: 2rem; font-weight: 800; color: #fff;
    line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.01em;
}
.ambng__hero-title span { color: #93c5fd; }
.ambng__hero-body { font-size: 0.95rem; color: rgba(255,255,255,0.65); line-height: 1.65; margin: 0; max-width: 560px; }

/* Stats */
.ambng__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 24px 0; }
.ambng__stat { background: var(--ambng-surface); border: 1px solid var(--ambng-border); border-radius: 12px; padding: 18px 16px; text-align: center; position: relative; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.ambng__stat:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.07); }
.ambng__stat::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--ambng-blue); }
.ambng__stat-val { font-size: 1.8rem; font-weight: 800; color: var(--ambng-blue); line-height: 1; margin-bottom: 5px; }
.ambng__stat-lbl { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ambng-muted); }

/* Steps */
.ambng__steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 22px 0; }
.ambng__step { background: var(--ambng-surface); border: 1px solid var(--ambng-border); border-radius: 12px; padding: 20px; transition: box-shadow 0.2s; }
.ambng__step:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.ambng__step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ambng-blue); color: #fff; font-size: 0.78rem; font-weight: 800; margin-bottom: 10px; }
.ambng__step-title { font-size: 0.9rem; font-weight: 700; color: var(--ambng-black); margin: 0 0 5px; }
.ambng__step-body  { font-size: 0.84rem; color: var(--ambng-muted); line-height: 1.6; margin: 0; }

/* Table */
.ambng__table-wrap { overflow-x: auto; margin: 22px 0; border-radius: 12px; border: 1px solid var(--ambng-border); }
.ambng__table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.ambng__table thead tr { background: var(--ambng-black); color: #fff; }
.ambng__table th { padding: 12px 16px; text-align: left; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }
.ambng__table td { padding: 12px 16px; border-bottom: 1px solid var(--ambng-border); color: var(--ambng-text); vertical-align: top; }
.ambng__table tbody tr:last-child td { border-bottom: none; }
.ambng__table tbody tr:nth-child(even) td { background: #f8fafc; }
.ambng__table tbody tr:hover td { background: #eff6ff; }

.ambng__badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }
.ambng__badge-blue  { background: #dbeafe; color: #1d4ed8; }
.ambng__badge-green { background: #d1fae5; color: #065f46; }
.ambng__badge-amber { background: #fef3c7; color: #92400e; }
.ambng__badge-red   { background: #fee2e2; color: #991b1b; }

/* Callout */
.ambng__callout { border-left: 4px solid var(--ambng-blue); background: #eff6ff; border-radius: 0 10px 10px 0; padding: 18px 22px; margin: 24px 0; }
.ambng__callout p { font-size: 1rem; font-weight: 600; color: var(--ambng-black); line-height: 1.5; margin: 0; }
.ambng__callout span { display: block; font-size: 0.8rem; font-weight: 500; color: var(--ambng-muted); margin-top: 5px; }

/* Variants cards */
.ambng__variants { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 22px 0; }
.ambng__variant { background: var(--ambng-surface); border: 1px solid var(--ambng-border); border-radius: 12px; padding: 20px; }
.ambng__variant-flag { font-size: 1.6rem; margin-bottom: 10px; display: block; }
.ambng__variant-title { font-size: 0.92rem; font-weight: 700; color: var(--ambng-black); margin: 0 0 6px; }
.ambng__variant-body  { font-size: 0.84rem; color: var(--ambng-muted); line-height: 1.6; margin: 0; }
.ambng__variant-tag   { display: inline-block; margin-top: 8px; font-size: 0.72rem; font-weight: 700; padding: 2px 10px; border-radius: 20px; background: #dbeafe; color: #1d4ed8; }

/* FAQ */
.ambng__faq-list { display: flex; flex-direction: column; gap: 10px; margin: 22px 0; }
.ambng__faq-item { background: var(--ambng-surface); border: 1px solid var(--ambng-border); border-radius: 12px; overflow: hidden; }
.ambng__faq-q { width: 100%; background: none; border: none; text-align: left; padding: 18px 22px; font-family: inherit; font-size: 0.95rem; font-weight: 600; color: var(--ambng-black); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; transition: background 0.15s; }
.ambng__faq-q:hover { background: #f8fafc; }
.ambng__faq-icon { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--ambng-blue); color: #fff; font-size: 0.9rem; font-weight: 800; display: flex; align-items: center; justify-content: center; transition: transform 0.25s, background 0.2s; }
.ambng__faq-item.ambng__open .ambng__faq-icon { transform: rotate(45deg); background: var(--ambng-red); }
.ambng__faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; padding: 0 22px; }
.ambng__faq-item.ambng__open .ambng__faq-a { max-height: 500px; }
.ambng__faq-a p { font-size: 0.9rem; line-height: 1.75; color: #475569; margin: 0 0 18px; }
.ambng__faq-a strong { color: var(--ambng-black); }

/* Disclaimer */
.ambng__disclaimer { background: #f1f5f9; border: 1px solid var(--ambng-border); border-radius: 12px; padding: 20px 24px; margin-top: 48px; display: flex; gap: 14px; align-items: flex-start; }
.ambng__disclaimer-icon { font-size: 1.2rem; flex-shrink: 0; }
.ambng__disclaimer-text { font-size: 0.82rem; color: var(--ambng-muted); line-height: 1.65; margin: 0; }
.ambng__disclaimer-text strong { color: var(--ambng-text); }

@media (max-width: 640px) {
    .ambng__hero { padding: 28px 22px; }
    .ambng__hero-title { font-size: 1.5rem; }
    .ambng__h2 { font-size: 1.3rem; }
    .ambng__stats { grid-template-columns: repeat(2, 1fr); }
}