/* Cleaned and consolidated CSS with mobile header styles. */

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes spin {
    to {
    transform: rotate(360deg);
    }
}

@keyframes bingoPop {
    0% {
    transform: scale(0.3) rotate(-15deg);
    opacity: 0;
    }
    
    60% {
    transform: scale(1.2) rotate(-15deg);
    opacity: 1;
    }
    
    100% {
    transform: scale(1) rotate(-15deg);
    }
}

@keyframes markedPulse {
    0% {
    background: white;
    border-color: #ccc;
    }
    50% {
    background: #ecf6ed;
    border-color: #4caf50;
    }
    100% {
    background: white;
    border-color: #ccc;
    }
}

.card-size-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.card-size-option {
    display: block;
    border: 1px solid var(--primary-dark);
    color: var(--primary-dark);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    font-weight: 800;
    cursor: pointer;
    background: white;
}

.card-size-option input,
.bingo-overlay.hidden,
.invite-modal.hidden,
.toggle-labels input,
.card-size-input,
.toggle-switch input,
.card-size-option input,
.bingo-overlay.hidden,
.invite-modal.hidden {
    display: none;
}

.card-size-box {
    box-shadow: inset 0 0 0 2px transparent;
    height: 100%;
    border: 2px solid var(--border-color, #ddd);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.card-size-option:hover .card-size-box,
.bingo-cell:hover:not(:disabled) {
    background: #eef4ff;
    transform: translateY(-2px);
}

.card-size-option input:checked + .card-size-box,
.bingo-cell.marked {
    background: linear-gradient(135deg, #6c63ff, #7c72ff);
    box-shadow: 0 12px 24px rgba(108, 99, 255, 0.25);
    color: white;
}

.card-size-option input:checked + .card-size-box .size-desc {
    color: rgba(255,255,255,.85);
}

.size-title {
    line-height: 1;
    margin-bottom: 6px;
    font-size: 1.2rem;
    font-weight: 700;
}

.size-desc {
    color: #64748b;
    font-weight: 800;
    font-size: 0.85rem;
    opacity: 0.85;
}

.play-card-page,
.host-start-page,
.invite-page,
#qr-code-container,
.join-game-page,
.contact-page,
.bulk-cues-page,
.cue-form-page,
.content-form-page {
    display: flex;
    justify-content: center;
}

.play-card-shell {
    margin: 28px auto;
    max-width: 900px;
    width: 100%;
}

.play-card-hero {
    background: radial-gradient(circle at top left, rgba(255, 214, 102, 0.9), transparent 34%), radial-gradient(circle at bottom right, rgba(72, 149, 239, 0.85), transparent 36%), linear-gradient(135deg, #6c63ff, #ff6b6b);
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    color: white;
    margin-bottom: 20px;
    overflow: hidden;
    padding: 34px 26px;
    position: relative;
    text-align: center;
}

.play-card-bubbles,
.hero-bubbles {
    inset: 0;
    opacity: 0.35;
    pointer-events: none;
    position: absolute;
}

.play-card-bubbles span,
.hero-bubbles span {
    font-size: 2rem;
    position: absolute;
}

.play-card-bubbles span:nth-child(1) {
    right: 12%;
    top: 16%;
}

.play-card-bubbles span:nth-child(2) {
    bottom: 16%;
    right: 20%;
}

.play-card-bubbles span:nth-child(3) {
    left: 12%;
    top: 20%;
}

.play-card-bubbles span:nth-child(4) {
    bottom: 18%;
    left: 18%;
}

.play-card-hero-content,
.host-start-content,
.invite-content,
.join-game-content,
.contact-content,
.bulk-cues-content,
.cue-form-content,
.content-form-content,
.cues-hero-content {
    position: relative;
    z-index: 2;
}

.play-card-icon {
    align-items: center;
    animation: floaty 2.8s ease-in-out infinite;
    background: rgba(255,255,255,.22);
    border-radius: 22px;
    display: inline-flex;
    font-size: 2.4rem;
    height: 68px;
    justify-content: center;
    margin: 0 auto 14px;
    width: 68px;
}

.play-card-title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 900;
    margin-bottom: 8px;
}

.play-card-description {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 auto 18px;
    max-width: 560px;
}

.play-card-hero .btn,
.card-controls .btn,
.bingo-controls .btn,
.bingo-controls button,
.invite-modal-card .btn,
.form-actions .btn,
.host-step-card .btn {
    border-radius: 999px;
    font-weight: 900;
    padding: 10px 18px;
}

.btn-outline {
    border: 1px solid #cbd5e1;
    background: white;
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline:hover {
    background: #f8fafc;
}

.play-instructions {
    background: #ffffff;
    border: 0;
    border-radius: 22px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
    color: #475569;
    font-weight: 900;
    margin-bottom: 18px;
    padding: 16px;
    text-align: center;
}

#bingo-board {
    padding: 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    max-width: 700px;
    position: relative;
}

.bingo-cell {
    box-shadow: inset 0 0 0 2px transparent;
    color: var(--text);
    font-weight: 800;
    line-height: 1.2;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    width: 100%;
    min-width: 0;
    min-height: 100px;
    box-sizing: border-box;
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: .7em;
}

.bingo-cell.free {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: var(--primary);
    font-weight: bold;
}

.bingo-cell.marked.free {
    background: linear-gradient(135deg, #ffd666, #fff7df);
    color: #92400e;
}

.bingo-cell.winning-square,
.bingo-answer-cell {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.bingo-cell.fading-enabled {
    opacity: 0.65;
    animation: markedPulse 1.2s ease-in-out infinite;
}

.bingo-complete {
    filter: saturate(0.85);
}

.bingo-overlay {
    background: rgba(15, 23, 42, 0.72);
    gap: 18px;
    z-index: 2500;
    justify-content: center;
    padding: 24px;
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.bingo-text {
    font-size: clamp(3em, 10vw, 10em);
    font-weight: 900;
    color: #ff1744;
    transform: rotate(-15deg);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    margin: auto 0;
}

.bingo-answers {
    background: white;
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(0,0,0,.22);
    padding: 16px;
    margin: 0 auto 24px;
    display: grid;
    gap: 8px;
    width: 100%;
    max-width: 700px;
    box-sizing: border-box;
}

.bingo-answer-cell {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 72px;
    color: #166534;
    background: #ecf6ed;
    border-color: #4caf50;
    cursor: default;
}

.bingo-controls {
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    display: flex;
    justify-content: space-evenly;
    margin-top: auto;
    font-size: 1.2em;
    color: #333;
    width: 100%;
}

.bingo-controls button {
    min-height: 48px;
    font-weight: 800;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background: #4caf50;
    color: white;
    font-size: 1em;
    cursor: pointer;
}

.card-controls {
    background: #ffffff;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.075);
    padding: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.login-invite-card {
    background: #fff7df;
    border-radius: 18px;
    color: #475569;
    font-weight: 900;
    margin: 0;
    padding: 14px;
    text-align: center;
    width: 100%;
}

.login-invite-card a,
.login-helper-card a,
.site-footer a,
.tos-card a {
    color: #2563eb;
    font-weight: 900;
    text-decoration: none;
}

.invite-modal.active {
    align-items: center;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 18px;
    position: fixed;
    z-index: 2000;
}

.invite-modal-card {
    max-height: 88vh;
    overflow: auto;
    position: relative;
    width: min(100%, 560px);
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
}

.invite-close {
    float: right;
    font-weight: 900;
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: #e2e8f0;
    color: #334155;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 10;
}

.create-icon {
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: #ede9fe;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 44px;
    font-weight: 600;
}

.invite-title {
    color: #111827;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 900;
    margin-bottom: 10px;
}

.invite-description,
.section-description {
    color: #475569;
    font-weight: 700;
    margin-bottom: 18px;
}

.qr-card {
    align-items: center;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.075);
    display: inline-flex;
    justify-content: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
}

.games-page,
.cues-page {
    display: grid;
    gap: 22px;
}

.games-hero {
    background: radial-gradient(circle at top left, rgba(255, 214, 102, 0.9), transparent 34%), radial-gradient(circle at bottom right, rgba(72, 149, 239, 0.85), transparent 36%), linear-gradient(135deg, #6c63ff, #ff6b6b);
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    color: white;
    overflow: hidden;
    padding: 46px 28px;
    position: relative;
}

.games-hero-content,
.theme-form-hero-content,
.themes-hero-content,
.home-hero-content {
    max-width: 760px;
    position: relative;
    z-index: 2;
}

.games-hero-icon,
.themes-hero-icon {
    animation: floaty 2.8s ease-in-out infinite;
    font-size: 3.8rem;
    margin-bottom: 10px;
}

.games-hero h1,
.themes-hero h1,
.home-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 8px;
}

.games-tagline {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0;
}

.hero-bubbles span:nth-child(1) {
    top: 18%;
    right: 12%;
}

.hero-bubbles span:nth-child(2) {
    top: 62%;
    right: 22%;
}

.hero-bubbles span:nth-child(3) {
    bottom: 12%;
    right: 7%;
}

.hero-bubbles span:nth-child(4) {
    top: 12%;
    left: 48%;
}

.my-games-tabs {
    background: #ffffff;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.075);
    padding: 16px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.my-games-tab {
    gap: 6px;
    transition: 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 10px;
    border: 1px solid var(--primary-dark);
    background: white;
    color: var(--primary-dark);
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
}

.my-games-tab:hover {
    background: #eef4ff;
    color: #2563eb;
    transform: translateY(-1px);
}

.my-games-tab.active,
.auth-link,
.auth-link {
    background: #6c63ff;
    color: white;
}

.games-section-card,
.cues-card,
.theme-section-card {
    background: #ffffff;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.075);
    padding: 24px;
}

.section-heading,
.video-title-row {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.section-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #f3f7ff;
    font-size: 1.8rem;
}

.section-heading h2,
.section-heading h3,
.section-heading h4,
.video-title-row h4 {
    font-weight: 900;
    margin: 0;
}

.games-list {
    display: grid;
    gap: 16px;
}

.played-games-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.game-card-fun,
.content-card-fun {
    background: #ffffff;
    border: 0;
    border-radius: 22px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
    padding: 20px;
    transition: 0.18s ease;
}

.game-card-fun:hover,
.cue-card:hover,
.content-card-fun:hover {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.085);
    transform: translateY(-2px);
}

.game-title-row,
.theme-title-row {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.game-mini-icon,
.video-mini-icon {
    align-items: center;
    background: #f3f7ff;
    border-radius: 15px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.6rem;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.game-title {
    color: #111827;
    font-size: 1.15rem;
    font-weight: 900;
}

.game-subtitle,
.private-label,
.public-label {
    color: #475569;
    font-weight: 800;
}

.game-meta {
    color: #475569;
    display: grid;
    font-weight: 700;
    gap: 6px;
}

.game-meta-pill-row,
.theme-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.game-meta-pill,
.theme-count-pill {
    align-items: center;
    background: #f8fafc;
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    font-weight: 800;
    gap: 8px;
    padding: 9px 13px;
}

.player-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.player-pill {
    align-items: center;
    background: #f8fafc;
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    font-weight: 800;
    gap: 7px;
    padding: 8px 12px;
}

.player-pill.winner,
.theme-badge-warning {
    background: #fff7df;
    color: #92400e;
}

.empty-state {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.075);
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px;
    border: 2px dashed #c4b5fd;
    border-radius: 18px;
    background: white;
}

.empty-state h2,
.form-label {
    font-weight: 900;
    margin-bottom: 8px;
}

.empty-state p {
    color: #475569;
    font-weight: 700;
    margin-bottom: 0;
}

.host-start-card {
    background: radial-gradient(circle at top left, rgba(255, 214, 102, 0.25), transparent 34%), radial-gradient(circle at bottom right, rgba(72, 149, 239, 0.22), transparent 36%), #ffffff;
    border: 0;
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    margin: 40px auto;
    max-width: 820px;
    overflow: hidden;
    padding: 34px 26px;
    position: relative;
    width: 100%;
}

.host-start-bubbles,
.invite-bubbles,
.join-game-bubbles,
.contact-bubbles,
.bulk-cues-bubbles,
.cue-form-bubbles,
.content-form-bubbles {
    inset: 0;
    opacity: 0.18;
    pointer-events: none;
    position: absolute;
}

.host-start-bubbles span,
.invite-bubbles span,
.join-game-bubbles span,
.contact-bubbles span,
.bulk-cues-bubbles span,
.cue-form-bubbles span,
.content-form-bubbles span {
    font-size: 1.8rem;
    position: absolute;
}

.host-start-bubbles span:nth-child(1),
.invite-bubbles span:nth-child(1),
.join-game-bubbles span:nth-child(1),
.contact-bubbles span:nth-child(1),
.bulk-cues-bubbles span:nth-child(1),
.cue-form-bubbles span:nth-child(1),
.content-form-bubbles span:nth-child(1) {
    right: 12%;
    top: 12%;
}

.host-start-bubbles span:nth-child(2),
.invite-bubbles span:nth-child(2),
.join-game-bubbles span:nth-child(2),
.contact-bubbles span:nth-child(2),
.bulk-cues-bubbles span:nth-child(2),
.cue-form-bubbles span:nth-child(2),
.content-form-bubbles span:nth-child(2) {
    bottom: 12%;
    right: 18%;
}

.host-start-bubbles span:nth-child(3),
.invite-bubbles span:nth-child(3),
.join-game-bubbles span:nth-child(3),
.contact-bubbles span:nth-child(3),
.bulk-cues-bubbles span:nth-child(3),
.cue-form-bubbles span:nth-child(3),
.content-form-bubbles span:nth-child(3) {
    left: 10%;
    top: 20%;
}

.host-start-bubbles span:nth-child(4),
.invite-bubbles span:nth-child(4),
.join-game-bubbles span:nth-child(4),
.contact-bubbles span:nth-child(4),
.bulk-cues-bubbles span:nth-child(4),
.cue-form-bubbles span:nth-child(4),
.content-form-bubbles span:nth-child(4) {
    bottom: 18%;
    left: 16%;
}

.host-start-intro {
    margin-bottom: 28px;
    text-align: center;
}

.create-icon,
.join-game-icon {
    align-items: center;
    animation: floaty 2.8s ease-in-out infinite;
    background: #f3f7ff;
    border-radius: 22px;
    color: #6c63ff;
    display: inline-flex;
    font-size: 2.4rem;
    height: 68px;
    justify-content: center;
    margin: 0 auto 14px;
    width: 68px;
}

.host-start-title {
    color: #111827;
    font-size: clamp(2rem, 5vw, 2.9rem);
    font-weight: 900;
    margin-bottom: 8px;
}

.host-start-description,
.bulk-cues-description,
.content-form-description {
    color: #475569;
    font-weight: 700;
    margin: 0 auto;
    max-width: 560px;
}

.host-step-card {
    background: #ffffff;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
    margin-top: 18px;
    padding: 22px;
}

.host-step-card.cool,
.cues-card.cool,
.theme-section-card.highlight-cool,
.ready-card {
    background: linear-gradient(135deg, #eef4ff, #ffffff);
}

.host-step-card.warm,
.cues-card.warm,
.theme-section-card.highlight-warm,
.cta-card {
    background: linear-gradient(135deg, #fff7df, #ffffff);
}

.host-step-heading,
.section-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.host-step-number {
    align-items: center;
    background: #6c63ff;
    border-radius: 16px;
    color: white;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.2rem;
    font-weight: 900;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.host-step-heading h2,
.theme-title-row h2 {
    color: #111827;
    font-weight: 900;
    margin: 0;
}

.theme-description {
    font-weight: 700;
    color: #334155;
    font-size: 18px;
    margin: 0 0 24px;
}

.host-inner-card {
    background: #ffffff;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.055);
    margin-top: 16px;
    padding: 18px;
}

.form-control-custom,
.form-control {
    background: #f8fafc;
    border: 0;
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px #e5e7eb;
    font-size: 1rem;
    padding: 14px 16px;
    width: 100%;
}

.form-control-custom:focus,
.form-control:focus,
.bulk-cues-textarea:focus {
    background: #ffffff;
    box-shadow: inset 0 0 0 2px #6c63ff, 0 6px 18px rgba(108, 99, 255, 0.16);
    outline: none;
}

.host-tip {
    background: #f8fafc;
    border-radius: 18px;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 12px;
    padding: 12px 14px;
}

.toggle-switch {
    margin-top: 6px;
    margin-bottom: 8px;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    user-select: none;
}

.toggle-labels {
    flex-wrap: wrap;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: #475569;
}

.private-label,
.public-label {
    color: #475569;
    font-weight: 900;
}

.toggle-slider {
    position: relative;
    width: 74px;
    height: 38px;
    background: #e2e8f0;
    border-radius: 999px;
    transition: background 0.25s ease;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: white;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
    transition: transform 0.25s ease;
}

.toggle-labels input:checked + .toggle-slider {
    background: #6c63ff;
}

.toggle-labels input:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.form-actions {
    padding-bottom: 20px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 32px;
    justify-content: center;
}

.invite-card {
    background: radial-gradient(circle at top left, rgba(255, 214, 102, 0.25), transparent 34%), radial-gradient(circle at bottom right, rgba(72, 149, 239, 0.22), transparent 36%), #ffffff;
    border: 0;
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    margin: 40px auto;
    max-width: 620px;
    min-width: 325px;
    overflow: hidden;
    padding: 34px 26px;
    position: relative;
    text-align: center;
    width: 100%;
}

.invite-description {
    color: #475569;
    font-weight: 700;
    margin: 0 auto 18px;
    max-width: 500px;
}

.join-code-card {
    background: linear-gradient(135deg, #eef4ff, #ffffff);
    border-radius: 24px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
    margin: 20px auto;
    padding: 20px;
}

.join-code-label {
    color: #475569;
    font-weight: 800;
    margin-bottom: 8px;
}

.join-code {
    align-items: center;
    background: #6c63ff;
    border-radius: 18px;
    color: white;
    display: inline-flex;
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    font-weight: 900;
    justify-content: center;
    letter-spacing: 0.04em;
    padding: 12px 20px;
}

.or-divider {
    align-items: center;
    color: #64748b;
    display: flex;
    font-weight: 900;
    gap: 12px;
    margin: 22px 0;
}

.or-divider::before,
.or-divider::after {
    background: #e5e7eb;
    content: "";
    flex: 1;
    height: 1px;
}

.qr-label {
    color: #475569;
    font-weight: 900;
    margin-bottom: 10px;
}

#qr-code-container canvas,
#qr-code-container img {
    height: auto;
    max-width: 100%;
}

.join-game-card,
.content-form-card {
    background: radial-gradient(circle at top left, rgba(255, 214, 102, 0.25), transparent 34%), radial-gradient(circle at bottom right, rgba(72, 149, 239, 0.22), transparent 36%), #ffffff;
    border: 0;
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    margin: 40px auto;
    max-width: 720px;
    overflow: hidden;
    padding: 34px 26px;
    position: relative;
    text-align: center;
    width: 100%;
}

.join-game-title,
.contact-title,
.bulk-cues-title,
.content-form-title {
    color: #111827;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 900;
    margin-bottom: 8px;
}

.join-game-description {
    color: #475569;
    font-weight: 700;
    margin: 0 auto 24px;
    max-width: 520px;
}

.join-game-form,
.contact-form {
    text-align: left;
}

.form-section {
    margin-bottom: 24px;
}

.login-helper-card {
    background: #f8fafc;
    border-radius: 18px;
    color: #475569;
    font-weight: 800;
    margin-top: 12px;
    padding: 12px 14px;
    text-align: center;
}

.card-size-card {
    background: linear-gradient(135deg, #eef4ff, #ffffff);
    border: 0;
    border-radius: 22px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
    padding: 18px;
}

.card-size-title {
    color: #111827;
    font-weight: 900;
    margin-bottom: 12px;
}

.form-actions .btn {
    border-radius: 999px;
    font-weight: 900;
    padding: 10px 20px;
}

.contact-card {
    background: radial-gradient(circle at top left, rgba(255, 214, 102, 0.25), transparent 34%), radial-gradient(circle at bottom right, rgba(72, 149, 239, 0.22), transparent 36%), #ffffff;
    border: 0;
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    margin: 40px auto;
    max-width: 620px;
    overflow: hidden;
    padding: 34px 26px;
    position: relative;
    text-align: center;
    width: 100%;
}

.create-icon,
.bulk-cues-icon {
    align-items: center;
    animation: floaty 2.8s ease-in-out infinite;
    background: #f3f7ff;
    border-radius: 22px;
    display: inline-flex;
    font-size: 2.4rem;
    height: 68px;
    justify-content: center;
    margin: 0 auto 14px;
    width: 68px;
}

.contact-description {
    color: #475569;
    font-weight: 700;
    margin: 0 auto 24px;
    max-width: 460px;
}

textarea.form-control-custom {
    min-height: 160px;
    resize: vertical;
}

.contact-helper,
.letters-help,
.field-help {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 8px;
}

.send-btn {
    border-radius: 999px;
    font-weight: 900;
    margin-top: 8px;
    padding: 12px 18px;
    width: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

.site-header {
    /* gap: 18px;
    height: 72px; */
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: calc(100% - 28px);
    max-width: 1320px;
    margin: 14px auto 0;
    padding: 14px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 1.35rem;
    font-weight: 900;
    color: #111827;
}

.logo a {
    color: #111827;
    text-decoration: none;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-link,
.my-games-link,
.auth-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 999px;
    color: #334155;
    font-weight: 900;
    text-decoration: none;
    transition: 0.18s ease;
}

.contact-link:hover,
.my-games-link:hover,
.status-pill.edit,
.theme-action-pill,
.contact-link:hover,
.my-games-link:hover,
.mobile-header-links a:hover {
    background: #eef4ff;
    color: #2563eb;
}

.auth-link:hover {
    background: #574fe6;
    color: white;
    transform: translateY(-1px);
}

#mobileMenu {
    background: white;
    border-color: #cbd5e1;
    border-radius: 999px;
    color: #334155;
    font-weight: 900;
}

.dropdown-menu {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
    padding: 10px;
}

.dropdown-item {
    border-radius: 12px;
    font-weight: 800;
    padding: 10px 12px;
}

.errors {
    max-width: 1320px;
    width: calc(100% - 28px);
    margin: 20px 20px;
}

.errors .alert {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
    font-weight: 800;
}

.page .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.site-footer {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.075);
    font-weight: 800;
    margin: 24px auto 18px;
    max-width: 1320px;
    width: calc(100% - 28px);
    text-align: center;
    padding: 20px 12px;
    color: var(--muted);
    font-size: 14px;
}

.site-footer p {
    margin: 4px 0;
}

.modal-loading,
.modal-error {
    color: #475569;
    font-weight: 900;
    padding: 38px 20px;
    text-align: center;
}

.spinner {
    margin: 0 auto 12px;
    width: 36px;
    height: 36px;
    border: 4px solid #ddd;
    border-top-color: #3273dc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

.bulk-cues-card {
    background: radial-gradient(circle at top left, rgba(255, 214, 102, 0.25), transparent 34%), radial-gradient(circle at bottom right, rgba(72, 149, 239, 0.22), transparent 36%), #ffffff;
    border: 0;
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    max-width: 720px;
    overflow: hidden;
    padding: 34px 26px;
    position: relative;
    text-align: center;
    width: 100%;
}

.bulk-cues-form,
.cue-form,
.content-form {
    margin-top: 26px;
    text-align: left;
}

.bulk-cues-textarea {
    background: #f8fafc;
    border: 0;
    border-radius: 20px;
    box-shadow: inset 0 0 0 1px #e5e7eb;
    font-size: 1rem;
    min-height: 230px;
    padding: 16px;
    resize: vertical;
    width: 100%;
}

.bulk-help-card {
    background: #f8fafc;
    border-radius: 18px;
    color: #475569;
    font-weight: 700;
    margin-top: 12px;
    padding: 14px 16px;
}

.tos-card {
    align-items: flex-start;
    display: flex;
    font-size: 0.95rem;
    gap: 8px;
    background: #fff7df;
    border-radius: 18px;
    font-weight: 700;
    margin-top: 20px;
    padding: 16px;
}

.cue-form-card {
    background: radial-gradient(circle at top left, rgba(255, 214, 102, 0.25), transparent 34%), radial-gradient(circle at bottom right, rgba(72, 149, 239, 0.22), transparent 36%), #ffffff;
    border: 0;
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    max-width: 620px;
    overflow: hidden;
    padding: 34px 26px;
    position: relative;
    text-align: center;
    width: 100%;
}

.cue-form-title {
    color: #111827;
    font-size: clamp(2rem, 5vw, 2.7rem);
    font-weight: 900;
    margin-bottom: 8px;
}

.cue-form-description {
    color: #475569;
    font-weight: 700;
    margin: 0 auto;
    max-width: 480px;
}

.theme-form-hero {
    background: radial-gradient(circle at top left, rgba(255, 214, 102, 0.9), transparent 34%), radial-gradient(circle at bottom right, rgba(72, 149, 239, 0.85), transparent 36%), linear-gradient(135deg, #6c63ff, #ff6b6b);
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    color: white;
    margin-bottom: 24px;
    overflow: hidden;
    padding: 42px 28px;
    position: relative;
}

.theme-form-icon,
.cues-hero-icon {
    animation: floaty 2.8s ease-in-out infinite;
    font-size: 3.6rem;
    margin-bottom: 10px;
}

.theme-form-hero h1 {
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 900;
    margin-bottom: 8px;
}

.theme-form-tagline {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0;
}

.theme-form-card {
    background: #ffffff;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.075);
    margin-bottom: 24px;
    padding: 26px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-weight: 800;
    margin-bottom: 8px;
}

.settings-card {
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.055);
    margin-top: 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin: 28px 0;
    background: #f8fafc;
}

.setting-row {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.045);
    margin-bottom: 14px;
    padding: 16px;
}

.setting-row h6 {
    font-weight: 900;
    margin-bottom: 10px;
}

.status-badge {
    margin-top: 14px;
    display: inline-block;
    background: var(--red);
    color: white;
    font-weight: 800;
    font-size: 15px;
    padding: 7px 14px;
    border-radius: 7px;
    margin-bottom: 20px;
}

.card-size-grid,
.requirement-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.alert-card {
    background: #e0f2fe;
    border-radius: 12px;
    padding: 16px;
    font-weight: 700;
}

.alert-card a,
.tos-card a,
.alert-card-fun a {
    font-weight: 900;
    text-decoration: none;
}

.form-actions .btn,
.settings-card .btn,
.theme-toolbar-actions .btn,
.themes-pagination .btn,
.home-actions .btn {
    border-radius: 999px;
    font-weight: 800;
    padding: 10px 18px;
}

.themes-hero {
    background: radial-gradient(circle at top left, rgba(255, 214, 102, 0.9), transparent 34%), radial-gradient(circle at bottom right, rgba(72, 149, 239, 0.85), transparent 36%), linear-gradient(135deg, #6c63ff, #ff6b6b);
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    color: white;
    margin-bottom: 24px;
    overflow: hidden;
    padding: 46px 28px;
    position: relative;
}

.themes-tagline {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0;
}

.themes-toolbar {
    background: #ffffff;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.075);
    margin-bottom: 24px;
    padding: 22px;
}

.theme-filter-form {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.theme-search-control {
    box-shadow: inset 0 0 0 1px #e5e7eb;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    width: 100%;
    max-width: 520px;
    border: 1px solid #d6d6d6;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.theme-search-input {
    background: transparent;
    height: 48px;
    border-right: none;
    border-radius: 10px 0 0 10px;
    flex: 1;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    outline: none;
}

.theme-search-input:focus {
    outline: none;
    border-color: #3273dc;
    box-shadow: 0 0 0 3px rgba(50, 115, 220, 0.15);
}

.theme-search-button {
    font-weight: 900;
    width: 56px;
    height: 48px;
    border-radius: 0 10px 10px 0;
    border: none;
    padding: 0 1.1rem;
    background: #485fc7;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
}

.theme-toolbar-actions {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: flex-end;
}

.themes-list {
    display: grid;
    gap: 18px;
}

.themes-pagination {
    background: #ffffff;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.075);
    margin-top: 28px;
    padding: 20px;
}

.themes-page-count {
    font-weight: 900;
    text-align: center;
}

.cues-hero {
    background: radial-gradient(circle at top left, rgba(255, 214, 102, 0.9), transparent 34%), radial-gradient(circle at bottom right, rgba(72, 149, 239, 0.85), transparent 36%), linear-gradient(135deg, #6c63ff, #ff6b6b);
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    color: white;
    overflow: hidden;
    padding: 42px 28px;
    position: relative;
}

.cues-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 8px;
}

.cues-tagline {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0;
}

.cue-hero-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cue-hero-actions {
    justify-content: flex-end;
}

.btn,
.status-pill {
    border-radius: 999px;
    font-weight: 900;
}

.cue-hero-actions .btn,
.form-actions .btn {
    padding: 10px 18px;
}

.restriction-note,
.alert-card-fun {
    border-radius: 18px;
    font-weight: 800;
    padding: 14px 16px;
}

.restriction-note {
    margin-top: 12px;
    background: #fee2e2;
    border-radius: 18px;
    color: #991b1b;
    font-weight: 800;
    margin-bottom: 14px;
    padding: 12px 16px;
    text-align: center;
}

.alert-card-fun {
    border-radius: 18px;
    padding: 14px 16px;
    background: #fff7df;
    color: #92400e;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.055);
}

.theme-meta,
.theme-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.count-badge {
    align-items: center;
    background: #eef4ff;
    border-radius: 999px;
    color: #2563eb;
    display: inline-flex;
    font-weight: 900;
    gap: 8px;
    padding: 9px 13px;
}

.cue-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.cue-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: space-between;
    min-height: 150px;
    transition: 0.18s ease;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: white;
    padding: 22px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.cue-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 18px;
    line-height: 1.4;
}

.cue-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.status-pill {
    gap: 5px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.status-pill.muted {
    background: #e2e8f0;
    color: #475569;
}

.status-pill.approve {
    background: #dcfce7;
    color: #166534;
}

.status-pill.delete,
.theme-badge-danger,
.theme-action-alert,
.mobile-header-links .mobile-logout-link {
    background: #fee2e2;
    color: #991b1b;
}

.theme-list-card {
    background: #ffffff;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.075);
    padding: 24px;
    transition: 0.18s ease;
}

.theme-list-card:hover {
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.095);
    transform: translateY(-2px);
}

.theme-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.theme-badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 900;
    padding: 8px 12px;
}

.theme-mini-icon {
    align-items: center;
    background: #f3f7ff;
    border-radius: 16px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.8rem;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.theme-card-title-link,
.theme-header h2 a {
    text-decoration: none;
}

.theme-card-title-link:hover h2 {
    color: #6c63ff;
}

.theme-card-description {
    color: #475569;
    margin-bottom: 14px;
}

.theme-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.theme-action-pill {
    align-items: center;
    background: #eef4ff;
    border-radius: 999px;
    color: #2563eb;
    display: inline-flex;
    font-weight: 900;
    gap: 7px;
    padding: 10px 15px;
    text-decoration: none;
}

.theme-action-pill:hover {
    background: #dbeafe;
    color: #1d4ed8;
    transform: translateY(-1px);
}

.theme-action-alert:hover {
    background: #fecaca;
    color: #7f1d1d;
}

.theme-detail-page {
    display: grid;
    gap: 20px;
}

.restriction-note a {
    color: #7f1d1d;
    font-weight: 900;
}

.theme-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.theme-action-pill,
.theme-section-card .btn,
.content-card-fun .btn {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-weight: 900;
    gap: 7px;
    padding: 10px 16px;
    text-decoration: none;
}

.video-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.video-publisher {
    color: #64748b;
    font-weight: 800;
    margin-bottom: 8px;
}

.pending-badge {
    align-items: center;
    background: #fff7df;
    border-radius: 999px;
    color: #92400e;
    display: inline-flex;
    font-weight: 900;
    padding: 9px 13px;
}

.theme-filter-checkboxes {
    margin-top: 14px;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.theme-filter-check {
    background: #f8fafc;
    border-radius: 999px;
    font-weight: 800;
    padding: 9px 13px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    cursor: pointer;
}

:root {
    --primary: #4f46e5;
    --danger: #dc2626;
    --primary-dark: #2563eb;
    --green: #15803d;
    --cyan: #0891b2;
    --red: #dc2626;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --bg: #f8fafc;
    --card: #ffffff;
}

* {
    box-sizing: border-box;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
}

.alert-error {
    border: 2px solid var(--danger);
    background: #fee2e2;
    color: #991b1b;
}

.hero {
    display: flex;
    gap: 32px;
    align-items: center;
    margin-bottom: 40px;
}

.hero-icon {
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: #ede9fe;
    display: grid;
    place-items: center;
    font-size: 56px;
}

.hero h1 {
    font-size: 52px;
    margin: 0 0 12px;
    line-height: 1;
}

.hero p {
    font-size: 22px;
    margin: 0;
    color: #334155;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.theme-card {
    margin-bottom: 36px;
    padding: 15px;
}

.theme-card.featured,
.custom-card.purple {
    background: linear-gradient(135deg, #ffffff, #f3e8ff);
}

.theme-title {
    font-size: 38px;
    color: var(--primary);
    margin: 0 0 16px;
}

.theme-row {
    align-items: center;
}

.theme-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 800;
    border-radius: 7px;
    padding: 8px 14px;
}

.badge.plays {
    background: var(--cyan);
}

.badge.bingos {
    background: var(--green);
}

.theme-actions {
    display: flex;
    gap: 24px;
    align-items: center;
}

.create-theme {
    border: 2px dashed #c4b5fd;
    border-radius: 18px;
    padding: 48px;
    text-align: center;
    background: white;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
}

.btn-primary,
.card-size-input:checked + .card-size-option {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.section-card {
    padding: 28px;
    margin-bottom: 28px;
}

.section-header {
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.my-game-card {
    min-height: 130px;
}

.thumbnail {
    height: 200px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e2e8f0, #f8fafc);
    display: grid;
    place-items: center;
    font-size: 48px;
    color: #94a3b8;
    overflow: hidden;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-info h3 {
    font-size: 28px;
    margin: 0 0 12px;
}

.content-info p {
    font-size: 17px;
    line-height: 1.55;
    color: #334155;
}

.content-actions {
    display: grid;
    gap: 12px;
}

.custom-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.custom-card {
    padding: 36px;
    min-height: 220px;
    background: linear-gradient(135deg, #ffffff, #f0fdf4);
}

.counts-data {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    align-items: center;
    gap: 6px;
}

.counts-data > i {
    font-size: 20px;
}

.counts-data.total-plays {
    background: #e0f2fe;
}

.counts-data.total-plays i {
    color: #0891b2;
}

.counts-data.total-bingos {
    background: #dcfce7;
}

.counts-data.total-bingos i {
    color: #15803d;
}

.theme-action {
    padding: 8px 18px;
    border: 2px solid var(--primary);
    height: 45px;
}

.theme-action-alert {
    border: 2px solid var(--danger);
}

.theme-action-alert i,
.private-label {
    color: var(--danger);
}

.form-control-custom {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 17px;
}

.check-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 0;
    font-size: 16px;
}

.card-size-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.btn-success {
    background: var(--green);
    color: white;
}

.btn-danger {
    background: var(--red);
    color: white;
}

.status-pill.edit {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-pill.delete {
    background: #fee2e2;
    color: #b91c1c;
}

.requirement-grid {
    display: grid;
    gap: 14px;
}

.play-page {
    max-width: 920px;
}

.play-card {
    position: relative;
}

.bingo-board-shell {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.bingo-cell:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.bingo-cell.marked {
    color: #166534;
    background: #ecf6ed;
    border-color: #4caf50;
}

.bingo-overlay.active {
    backdrop-filter: blur(4px);
    display: flex;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.7);
}

.bingo-modal {
    width: min(100%, 760px);
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
}

.bingo-subtitle {
    color: #334155;
    font-size: 18px;
    margin-bottom: 24px;
}

.play-actions {
    justify-content: center;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(36px);
}

.toggle-labels i {
    margin-right: 4px;
}

.public-label {
    color: var(--green);
}

.card-size-box:hover {
    border-color: var(--primary-color, #0d6efd);
    transform: translateY(-2px);
}

.card-size-option input:checked + .card-size-box {
    background: var(--primary-color, #0d6efd);
    color: white;
    border-color: var(--primary-color, #0d6efd);
}

.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
}

.modal-error {
    padding: 24px;
    text-align: center;
}

.invite-modal-content {
    margin-top: 30px;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.help-btn-icon {
    background: none;
    border: none;
    color: #3273dc;
    padding: 0;
    cursor: pointer;
    font-size: 1rem;
}

.help-btn-icon:hover {
    color: #27b861;
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    color: #3273dc;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}

.home-hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 48px 28px;
    margin-bottom: 24px;
    background: radial-gradient(circle at top left, rgba(255, 214, 102, 0.9), transparent 34%),
            radial-gradient(circle at bottom right, rgba(72, 149, 239, 0.85), transparent 36%),
            linear-gradient(135deg, #6c63ff, #ff6b6b);
    color: white;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.home-hero-icon {
    font-size: 4rem;
    margin-bottom: 12px;
    animation: floaty 2.8s ease-in-out infinite;
}

.home-tagline {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.home-hero p {
    font-size: 1.1rem;
    max-width: 680px;
}

.hero-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.35;
}

.hero-bubbles span {
    position: absolute;
    font-size: 2rem;
}

.join-card {
    border: 0;
    border-radius: 22px;
    padding: 24px;
    margin-bottom: 28px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.join-card label {
    font-weight: 800;
    margin-bottom: 10px;
}

.join-input {
    overflow: hidden;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.join-input input {
    border: none;
    padding: 14px 20px;
    font-size: 1rem;
}

.join-input button {
    border-radius: 0 999px 999px 0;
    padding-left: 24px;
    padding-right: 24px;
    font-weight: 800;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.fun-card {
    grid-column: span 12;
    border: 0;
    border-radius: 24px;
    padding: 24px;
    background: white;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.075);
}

.fun-card.half {
    grid-column: span 6;
}

.section-heading h3 {
    margin: 0;
    font-weight: 900;
}

.steps-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.steps-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.step-number {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #6c63ff;
    color: white;
    font-weight: 900;
}

.play-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.play-link-card {
    border: none;
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
    font: inherit;
    cursor: pointer;
    transition: 0.18s ease;
}

.play-link-card:hover {
    transform: translateY(-2px);
    background: #eef4ff;
}

.play-link-card span {
    margin-right: 8px;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

header, footer {
    text-align: left;
    flex-shrink: 0;
}

.winning-square {
    border-color: #ff1744;
    box-shadow: 0 0 10px rgba(255, 23, 68, 0.5);
}

.bingo-cell.free:hover {
    cursor: default;
}

.bingo-overlay.active .bingo-text {
    animation: bingoPop 0.5s ease-out;
}

.bingo-answer-cell.free {
    font-weight: bold;
}

.qr-modal {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.play-with-friends {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.play-with-friends a {
    padding: 10px 20px;
    color: rgb(47, 172, 31);
    font-weight: 600;
    border-radius: 5px;
    text-decoration: none;
}

.play-with-friends a:hover {
    background: rgba(47, 172, 31, 0.1);
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container > :first-child {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.theme-card-dark,
.video-card-dark {
    background: #e9e9e9;
}

.video-card {
    padding: 15px;
}

.theme-cue {
    border-bottom: 2px solid #eee;
    margin: .3em;
}

.my-games-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    cursor: default;
    pointer-events: none;
}

.invite-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.theme-search-form {
    margin-bottom: 1.5rem;
}

.theme-search-button:hover {
    background: #3e56c4;
}

.site-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.logo img {
    flex: 0 0 auto;
}

.mobile-header-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.mobile-header-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 900;
    text-decoration: none;
}

.page {
    max-width: 1280px;
    margin: 32px auto 0;
    padding: 0 1rem;
}

@media (max-width: 576px) {
    .card-size-group {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .play-card-hero {
        padding: 30px 20px;
    }

    #bingo-board {
        border-radius: 22px;
        padding: 6px;
        gap: 5px;
    }

    .bingo-cell {
        border-radius: 15px;
        font-size: 0.78rem;
        min-height: 76px;
        padding: 8px;
    }

    .card-controls {
        align-items: stretch;
    }

    .card-controls .btn {
        justify-content: center;
        width: 100%;
    }

    .games-hero,
        .themes-hero,
    .home-hero {
        padding: 36px 22px;
    }

    .played-games-grid,
        .card-size-grid,
        .cue-grid,
        .requirement-grid,
    .play-links {
        grid-template-columns: 1fr;
    }

    .host-start-card,
        .invite-card,
        .join-game-card,
        .contact-card,
        .bulk-cues-card,
        .cue-form-card,
        .content-form-card {
        padding: 28px 20px;
    }

    .host-step-card,
        .theme-form-card,
        .theme-section-card,
        .content-card-fun {
        padding: 20px;
    }

    .qr-card {
        padding: 12px;
    }

    .site-header {
        border-radius: 24px;
        padding: 12px;
    }

    .logo {
        justify-content: center;
        font-size: 1.25rem;
    }

    .page {
        max-width: 1200px;
        /* margin: 22px auto 0; */
        padding-bottom: 36px;
        padding: .5rem;
    }

    .invite-modal-card {
        border-radius: 24px;
        padding: 22px;
    }

    .theme-form-hero,
        .cues-hero {
        padding: 34px 22px;
    }

    .theme-search-control,
    .join-input {
        border-radius: 18px;
    }

    .theme-toolbar-actions {
        justify-content: flex-start;
        margin-top: 16px;
    }

    .themes-pagination {
        flex-direction: column;
    }

    .cue-hero-actions {
        justify-content: flex-start;
        margin-top: 18px;
    }

    .theme-card-actions {
        justify-content: flex-start;
    }

    .theme-action-group {
        justify-content: flex-start;
        margin-top: 10px;
    }

    .play-page {
        padding: 0;
    }

    .play-card {
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 10px;
    }

    .fun-card.half {
        grid-column: span 12;
    }

    .join-input input,
            .join-input button {
        border-radius: 0;
    }

    .bingo-text {
        font-size: 6em;
    }

    .site-header {
        border-radius: 24px;
        padding: 12px;
    }

    .site-header-top {
        justify-content: center;
        width: 100%;
    }

    .logo {
        justify-content: center;
        font-size: 1.25rem;
    }

    .logo img {
        width: 48px;
        height: 48px;
    }

    .mobile-header-links {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 6px;
        width: 100%;
        margin-top: 10px;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 2px;
    }

    .mobile-header-links a {
        flex: 0 0 auto;
        font-size: 0.5rem;
        padding: 6px 9px;
    }
}

@media (max-width: 992px) {
    .cue-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .play-page {
        max-width: none;
        padding: 0;
    }

    .play-card {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 5px;
        margin: 0;
    }

    #bingo-board {
        border-radius: 12px;
        padding: 6px;
        gap: 5px;
        box-shadow: none;
    }

    .bingo-cell {
        min-height: clamp(58px, 18vw, 92px);
        padding: 5px;
        font-size: clamp(0.62rem, 2.7vw, 0.82rem);
        border-radius: 8px;
    }

    .bingo-modal {
        padding: 20px;
    }

    .bingo-controls {
        flex-direction: column;
    }

    .bingo-controls .btn,
      .bingo-controls button {
        width: 100%;
    }

    .cue-grid,
    .content-card,
      .custom-actions {
        grid-template-columns: 1fr;
    }

    .hero,
      .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero h1 {
        font-size: 40px;
    }

    .play-card .section-header {
        margin-bottom: 12px;
    }

    .bingo-board-shell {
        margin-top: 12px;
    }

    .form-actions.play-actions {
        margin-top: 16px;
    }
}

@media (max-width: 380px) {
    .logo {
        font-size: 1.1rem;
    }

    .logo img {
        width: 42px;
        height: 42px;
    }

    .mobile-header-links {
      text-align: center;
       justify-content: center;
    }

    .mobile-header-links a {
        font-size: 0.65rem;
        /* padding: 6px 9px; */
    }

    .site-header {
        padding: 10px;
      flex-direction: column;
    }

}
