/* ========== HERO SECTION ========== */
    .service-hero {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #1a1a2e 100%);
        position: relative;
        overflow: hidden;
        min-height: 400px;
    }
    .service-hero::before {
        content: ''; position: absolute; inset: 0;
        background:
            radial-gradient(ellipse at 15% 50%, rgba(235,0,139,0.25) 0%, transparent 55%),
            radial-gradient(ellipse at 85% 20%, rgba(255,200,45,0.15) 0%, transparent 50%),
            radial-gradient(ellipse at 50% 85%, rgba(100,120,255,0.12) 0%, transparent 45%);
        pointer-events: none;
    }
    .service-hero::after {
        content: ''; position: absolute; inset: 0;
        background-image: radial-gradient(circle, rgba(255,255,255,0.025) 1px, transparent 1px);
        background-size: 36px 36px;
        pointer-events: none;
    }
    .hero-orb {
        position: absolute; border-radius: 50%;
        filter: blur(70px); pointer-events: none; opacity: 0.55;
        animation: orbFloat 9s ease-in-out infinite;
    }
    .hero-orb-1 { width:320px; height:320px; background: radial-gradient(circle, rgba(235,0,139,0.45), transparent); top:-80px; left:-100px; }
    .hero-orb-2 { width:280px; height:280px; background: radial-gradient(circle, rgba(255,200,45,0.35), transparent); bottom:-80px; right:-60px; animation-delay:-4.5s; }
    .hero-orb-3 { width:200px; height:200px; background: radial-gradient(circle, rgba(120,100,255,0.25), transparent); top:40%; left:45%; animation-delay:-2s; }

    @keyframes orbFloat {
        0%,100% { transform: translate(0,0) scale(1); }
        33% { transform: translate(18px,-14px) scale(1.06); }
        66% { transform: translate(-12px,10px) scale(0.94); }
    }

    .hero-wave {
        position: absolute; bottom:-2px; left:0; width:100%;
        line-height:0; z-index:10; pointer-events:none;
    }

    .stat-pill {
        display:inline-flex; align-items:center; gap:8px;
        padding:8px 18px;
        background: rgba(255,255,255,0.1);
        backdrop-filter: blur(12px);
        border: 1px solid rgba(255,255,255,0.18);
        border-radius: 999px;
        color: rgba(255,255,255,0.9);
        font-size: 13px; font-weight: 500;
    }

    @keyframes fadeSlideUp {
        from { opacity:0; transform:translateY(30px); }
        to   { opacity:1; transform:translateY(0); }
    }
    .anim-up { animation: fadeSlideUp 0.6s ease both; }
    .anim-delay-1 { animation-delay:0.1s; }
    .anim-delay-2 { animation-delay:0.2s; }
    .anim-delay-3 { animation-delay:0.3s; }

    /* ========== SEARCH BAR ========== */
    .bg-search-wrap {
        background: white;
        border-radius: 1.5rem;
        border: 1.5px solid #f0eef5;
        box-shadow: 0 10px 40px rgba(0,0,0,0.06);
        padding: 1rem 1.25rem;
    }
    .bg-search-input {
        border: none; outline: none; width: 100%;
        font-family: 'Kanit', sans-serif;
        font-size: 15px; color: #374151;
        background: transparent;
    }
    .bg-search-input::placeholder { color: #9ca3af; }

    /* ========== BOARD GAME CARD ========== */
    .bg-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 1.75rem;
    }
    @media (max-width: 480px) {
        .bg-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    }

    .bg-card {
        position: relative;
        background: white;
        border-radius: 1.4rem;
        border: 1.5px solid #f0eef5;
        box-shadow: 0 6px 22px rgba(0,0,0,0.05);
        overflow: hidden;
        transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
        display: flex; flex-direction: column;
    }
    .bg-card:hover {
        transform: translateY(-8px) scale(1.015);
        border-color: rgba(235,0,139,0.25);
        box-shadow: 0 22px 46px rgba(235,0,139,0.14);
    }

    .bg-card-cover {
        position: relative;
        width: 100%;
        aspect-ratio: 1 / 1;
        background: linear-gradient(135deg, #fff5f9, #f3f1f8);
        overflow: hidden;
    }
    .bg-card-cover img {
        width: 100%; height: 100%; object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.34,1.56,0.64,1);
    }
    .bg-card:hover .bg-card-cover img { transform: scale(1.1) rotate(1deg); }

    .bg-card-cover::after {
        content: '';
        position: absolute; inset: 0;
        background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 45%);
        opacity: 0; transition: opacity 0.3s ease;
    }
    .bg-card:hover .bg-card-cover::after { opacity: 1; }

    .bg-card-noimg {
        width: 100%; height: 100%;
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        color: #d1bcd4;
        background: linear-gradient(135deg, #fdf2f8, #f5f3ff);
    }

    .bg-barcode-badge {
        position: absolute; top: 10px; left: 10px;
        display: inline-flex; align-items: center; gap: 4px;
        padding: 4px 9px; border-radius: 999px;
        font-size: 10px; font-weight: 700; font-family: monospace;
        background: rgba(255,255,255,0.92);
        color: #6d28d9;
        backdrop-filter: blur(4px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    }

    .bg-play-badge {
        position: absolute; bottom: 10px; right: 10px;
        opacity: 0; transform: translateY(6px);
        transition: all 0.3s ease;
    }
    .bg-card:hover .bg-play-badge { opacity: 1; transform: translateY(0); }
    .bg-play-badge a {
        display: inline-flex; align-items: center; gap: 5px;
        padding: 6px 12px; border-radius: 999px;
        background: var(--spu-pink, #eb008b);
        color: white; font-size: 11px; font-weight: 700;
        text-decoration: none;
        box-shadow: 0 6px 16px rgba(235,0,139,0.4);
    }

    .bg-card-body {
        padding: 1.1rem 1.1rem 1.25rem;
        flex: 1; display: flex; flex-direction: column;
    }
    .bg-card-title {
        font-family: 'Kanit', sans-serif;
        font-weight: 700; font-size: 15px; color: #1f2937;
        line-height: 1.4;
        margin-bottom: 0.6rem;
        display: -webkit-box;
        -webkit-line-clamp: 2; -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 2.6em;
    }

    .bg-card-footer {
        margin-top: auto;
        display: flex; align-items: center; justify-content: space-between;
        gap: 0.5rem;
    }
    .bg-howto-link {
        display: inline-flex; align-items: center; gap: 5px;
        font-size: 12px; font-weight: 600; color: #6d28d9;
        text-decoration: none;
        padding: 5px 10px; border-radius: 999px;
        background: rgba(109,40,217,0.08);
        border: 1px solid rgba(109,40,217,0.15);
        transition: all 0.25s ease;
    }
    .bg-howto-link:hover {
        background: rgba(109,40,217,0.14);
        color: #5b21b6; text-decoration: none;
        transform: translateY(-1px);
    }
    .bg-no-link {
        font-size: 11px; color: #c4c4c4; font-style: italic;
    }

    /* Empty state */
    .bg-empty-state {
        text-align: center;
        padding: 4rem 1rem;
        background: white;
        border-radius: 1.5rem;
        border: 1.5px dashed #e5dce8;
    }

    /* ========== PAGINATION ========== */
    .bg-pagination {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 2.5rem;
    }
    .bg-page-btn {
        min-width: 40px; height: 40px;
        padding: 0 12px;
        display: inline-flex; align-items: center; justify-content: center;
        border-radius: 0.9rem;
        border: 1.5px solid #f0eef5;
        background: white;
        color: #4b5563;
        font-family: 'Kanit', sans-serif;
        font-weight: 600; font-size: 14px;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .bg-page-btn:hover:not(:disabled) {
        border-color: rgba(235,0,139,0.35);
        color: var(--spu-pink, #eb008b);
        transform: translateY(-1px);
    }
    .bg-page-btn.active {
        background: linear-gradient(135deg, var(--spu-pink, #eb008b), #c4006b);
        border-color: transparent;
        color: white;
        box-shadow: 0 6px 16px rgba(235,0,139,0.35);
    }
    .bg-page-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

    /* Borrow info banner */
    .borrow-banner {
        background: linear-gradient(135deg, rgba(235,0,139,0.06), rgba(255,200,45,0.05));
        border: 1.5px solid rgba(235,0,139,0.14);
        border-radius: 1.5rem;
        position: relative; overflow: hidden;
    }
    .borrow-banner::before {
        content:''; position:absolute; top:-30px; right:-30px;
        width:130px; height:130px; border-radius:50%;
        background: rgba(235,0,139,0.07); pointer-events:none;
    }
    .borrow-step {
        display: flex; align-items: flex-start; gap: 0.75rem;
    }
    .borrow-step-num {
        width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
        background: linear-gradient(135deg, var(--spu-pink, #eb008b), #c4006b);
        color: white; font-weight: 800; font-size: 13px;
        box-shadow: 0 4px 12px rgba(235,0,139,0.3);
    }

    /* Count badge */
    .game-count-badge {
        display: inline-flex; align-items: center; gap: 6px;
        padding: 5px 14px; border-radius: 999px;
        background: rgba(124,58,237,0.08);
        border: 1px solid rgba(124,58,237,0.18);
        color: #6d28d9; font-size: 13px; font-weight: 700;
    }

    /* Card clickable cue */
    .bg-card { cursor: pointer; }
    .bg-card-view-hint {
        position: absolute; inset: 0;
        display: flex; align-items: center; justify-content: center;
        opacity: 0; transition: opacity 0.3s ease;
        pointer-events: none;
    }
    .bg-card:hover .bg-card-view-hint { opacity: 1; }
    .bg-card-view-hint span {
        display: inline-flex; align-items: center; gap: 6px;
        padding: 8px 16px; border-radius: 999px;
        background: rgba(255,255,255,0.95);
        color: #1f2937; font-size: 12px; font-weight: 700;
        box-shadow: 0 6px 18px rgba(0,0,0,0.25);
        transform: translateY(6px);
        transition: transform 0.3s ease;
    }
    .bg-card:hover .bg-card-view-hint span { transform: translateY(0); }

    /* ========== DETAIL MODAL ========== */
    .bg-modal-overlay {
        position: fixed; inset: 0; z-index: 100;
        background: rgba(13,13,26,0.72);
        backdrop-filter: blur(6px);
        display: flex; align-items: center; justify-content: center;
        padding: 1rem;
    }
    .bg-modal-panel {
        background: white;
        border-radius: 1.75rem;
        max-width: 600px; width: 100%;
        max-height: 90vh; overflow-y: auto;
        position: relative;
        box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    }
    .bg-modal-close {
        position: absolute; top: 14px; right: 14px; z-index: 5;
        width: 38px; height: 38px; border-radius: 999px;
        display: flex; align-items: center; justify-content: center;
        background: rgba(255,255,255,0.92);
        color: #374151; font-size: 15px;
        box-shadow: 0 4px 14px rgba(0,0,0,0.18);
        transition: all 0.25s ease;
        cursor: pointer; border: none;
    }
    .bg-modal-close:hover { background: var(--spu-pink,#eb008b); color: white; transform: rotate(90deg); }

    .bg-modal-cover-wrap {
        position: relative;
        width: 100%;
        background: linear-gradient(135deg, #fff5f9, #f3f1f8);
        display: flex; align-items: center; justify-content: center;
        max-height: 320px; overflow: hidden;
        border-radius: 1.75rem 1.75rem 0 0;
    }
    .bg-modal-cover-wrap img {
        width: 100%; max-height: 320px; object-fit: cover; display: block;
    }
    .bg-modal-cover-noimg {
        width: 100%; height: 260px;
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        color: #d1bcd4;
        background: linear-gradient(135deg, #fdf2f8, #f5f3ff);
    }

    .bg-modal-body { padding: 1.75rem 2rem 2.25rem; }

    .bg-modal-title {
        font-family: 'Kanit', sans-serif;
        font-weight: 800; font-size: 1.5rem; color: #111827;
        line-height: 1.35; margin-bottom: 1.25rem;
    }

    .bg-modal-meta-item {
        display: flex; gap: 12px; align-items: flex-start;
        padding: 14px 16px; border-radius: 14px;
        background: #faf9fb;
        border: 1px solid #f0eef5;
    }
    .bg-modal-meta-icon {
        width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
        background: rgba(235,0,139,0.1);
        color: var(--spu-pink,#eb008b); font-size: 14px;
    }
    .bg-modal-meta-label {
        font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
        text-transform: uppercase; color: #9ca3af; margin-bottom: 4px;
    }
    .bg-modal-meta-value {
        font-size: 14.5px; font-weight: 600; color: #374151; line-height: 1.6;
        word-break: break-word;
    }

    .bg-modal-actions {
        display: flex; flex-wrap: wrap; gap: 0.75rem;
    }
    .bg-modal-btn-primary {
        flex: 1; min-width: 200px;
        display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        padding: 0.85rem 1.5rem;
        border-radius: 1rem;
        font-family: 'Kanit', sans-serif; font-weight: 700; font-size: 14.5px;
        color: white; text-decoration: none;
        background: linear-gradient(135deg, var(--spu-pink,#eb008b), #c4006b);
        box-shadow: 0 8px 22px rgba(235,0,139,0.35);
        transition: all 0.3s ease;
    }
    .bg-modal-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(235,0,139,0.48); color: white; text-decoration: none; }
    .bg-modal-btn-secondary {
        display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        padding: 0.85rem 1.25rem;
        border-radius: 1rem;
        font-family: 'Kanit', sans-serif; font-weight: 600; font-size: 14px;
        color: #4b5563; text-decoration: none;
        background: #f3f4f6;
        border: 1px solid #e5e7eb;
        transition: all 0.25s ease;
    }
    .bg-modal-btn-secondary:hover { background: #e5e7eb; color: #1f2937; text-decoration: none; }