/* ===== PlaySpot Vibrant Kids Theme (EN) ===== */
:root {
    --ink:#0b1220; --muted:#64748b;
    --violet:#7c3aed; --cyan:#06b6d4; --lime:#22c55e; --orange:#f97316;
    --gold:#f59e0b; --rose:#ef4444; --blue:#3b82f6; --white:#ffffff;
}
* { box-sizing:border-box }
body {
    color:var(--ink);
    background:
            radial-gradient(1200px 600px at -10% -20%, #fed7aa55 0%, transparent 55%),
            radial-gradient(900px 400px at 110% -10%, #a7f3d055 0%, transparent 60%),
            linear-gradient(180deg,#ffffff 0,#f8fbff 40%, #f1f5ff 100%);
}

/* ===== Navbar ===== */
.navbar {
    background: linear-gradient(90deg, var(--violet), var(--cyan));
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
    padding: 0.6rem 1rem;
}
.navbar .navbar-brand {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.navbar .nav-link {
    color: #f8fafc !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
    transition: all .2s;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #ffe082 !important;
}

/* ===== Dropdown ===== */
.dropdown-menu {
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0,0,0,.15);
    padding: 1rem 1.5rem;
    min-width: 220px;
}
.dropdown-menu a {
    color: var(--ink);
    text-decoration: none;
    display: block;
    padding: 6px 0;
    font-weight: 500;
    transition: .2s;
}
.dropdown-menu a:hover {
    color: var(--violet);
    padding-left: 4px;
}

/* ===== Mega menu ===== */
.dropdown-mega { position: static; }
.dropdown-menu-mega {
    left: 0; right: 0; top: 100%; margin-top: 0;
    padding: 2rem 3rem;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,.15);
    background: #fff;
}
.dropdown-menu-mega .row > div h6 {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--ink);
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 6px;
}
.dropdown-menu-mega ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dropdown-menu-mega ul li a {
    font-size: .92rem;
    color: #374151;
    padding: 4px 0;
    display: block;
    transition: .2s;
}
.dropdown-menu-mega ul li a:hover {
    color: var(--violet);
    font-weight: 600;
    padding-left: 6px;
}
.dropdown-menu-mega ul li { margin-bottom: 4px; }

/* Game tile in mega */
.dropdown-menu-mega .game-tile {
    border:2px solid #fff;
    border-radius:12px;
    box-shadow:0 6px 18px rgba(0,0,0,.12);
    transition:all .3s ease;
}
.dropdown-menu-mega .game-tile:hover {
    border-color:var(--violet);
    transform:translateY(-3px);
    box-shadow:0 10px 28px rgba(0,0,0,.2);
}
.dropdown-menu-mega .thumb-43 {
    width:100%; aspect-ratio:4/3;
    object-fit:cover; display:block;
}

/* ===== Chips / Tag pills ===== */
.chip {
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:8px 14px;
    font-size:0.9rem;
    font-weight:600;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:999px;
    white-space:nowrap;
    transition:.2s;
}
.chip:hover {
    transform:translateY(-2px);
    box-shadow:0 4px 12px rgba(0,0,0,.08);
}
.chip-theme-1 { background:#ecfeff; border-color:#bae6fd; }
.chip-theme-2 { background:#fef9c3; border-color:#fde68a; }
.chip-theme-3 { background:#ffe4e6; border-color:#fecaca; }
.chip-theme-4 { background:#f5f3ff; border-color:#ddd6fe; }
.chip-theme-5 { background:#dcfce7; border-color:#bbf7d0; }

/* Tags carousel */
#tagsCarousel .owl-item { margin-right:12px !important; }
#tagsCarousel .chip { margin:0 !important; }
#tagsCarousel .chip:hover {
    background:#f3f4f6;
    border-color:#d1d5db;
    box-shadow:0 2px 6px rgba(0,0,0,.06);
}
.section-head { position:relative; }
.section-head .owl-nav-wrapper {
    margin-left:auto;
    display:flex; gap:4px;
}
.section-head .btn {
    padding:4px 6px;
    font-size:.85rem;
}

/* ===== Section boxes ===== */
.box { border-radius:20px; padding:18px; background:#fff; box-shadow:0 12px 36px rgba(0,0,0,.06);}
.box-pink { background:#ff3ea1; color:#fff; }
.box-cyan { background:linear-gradient(135deg,var(--cyan),var(--lime)); color:#fff; }
.box-gold { background:linear-gradient(135deg,var(--gold),var(--orange)); color:#fff; }
.box-blue { background:linear-gradient(135deg,#60a5fa,#34d399); color:#fff; }
.box-purple { background:linear-gradient(135deg,#a78bfa,#fb7185); color:#fff; }
.box-orange { background:linear-gradient(135deg,#f97316,#facc15); color:#fff; }

/* ===== Section Head Redesigned ===== */
.section-head {
    display:flex; align-items:center; justify-content:space-between;
    margin-bottom:14px; padding-bottom:6px;
    border-bottom:1px solid #ffffff;
}
.section-head h2 {
    font-size:1.35rem;
    font-weight:900;
    margin:0;
    letter-spacing:.3px;
    display:flex; align-items:center; gap:8px;
    color:var(--white);
}
.section-head h2 i { font-size:1.3rem; color:var(--violet); }
.section-head a {
    text-decoration:none;
    font-weight:700;
    font-size:.9rem;
    display:inline-flex; align-items:center; gap:6px;
    padding:6px 12px;
    border-radius:8px;
    background:rgba(124,58,237,.08);
    color:var(--white);
    transition:.2s;
}
.section-head a i { font-size:1rem; }
.section-head a:hover {
    background:var(--violet);
    color:#fff;
}

/* ===== Game tiles (global) ===== */
.game-tile {
    position:relative;
    border:2px solid #fff;
    border-radius:14px;
    overflow:hidden;
    background:#fff;
    display:block;
    box-shadow:0 8px 24px rgba(0,0,0,.15);
    transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.game-tile:hover {
    transform:translateY(-6px) scale(1.04);
    box-shadow:0 12px 32px rgba(0,0,0,.25);
}
.thumb-43 {
    aspect-ratio:4/3;
    width:100%;
    object-fit:cover;
    display:block;
    border-radius:6px;
    transition:transform .35s ease;
}
.game-tile:hover .thumb-43 { transform:scale(1.08); }
.tile-overlay {
    position:absolute; inset:0;
    display:flex; flex-direction:column;
    justify-content:flex-end;
    background:linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.75) 100%);
    opacity:0; transition:opacity .35s ease;
}
.game-tile:hover .tile-overlay { opacity:1; }
.overlay-body { color:#fff; padding:12px; animation:fadeUp .4s ease both; }
.overlay-title {
    font-weight:900; font-size:1rem; line-height:1.3;
    margin-bottom:2px; text-shadow:0 2px 6px rgba(0,0,0,.6);
}
.overlay-meta { font-size:.85rem; opacity:.95; font-weight:600; }
.corner-badge {
    position:absolute; top:10px; left:10px;
    background:rgba(255,255,255,.95);
    color:var(--ink);
    border-radius:999px;
    padding:4px 10px;
    font-weight:700; font-size:.75rem;
    box-shadow:0 3px 10px rgba(0,0,0,.2);
}
@keyframes fadeUp {
    from { opacity:0; transform:translateY(10px); }
    to   { opacity:1; transform:translateY(0); }
}

/* Block-specific hover borders */
.box-cyan .game-tile:hover { border-color:var(--lime); }
.box-gold .game-tile:hover { border-color:var(--gold); }
.box-blue .game-tile:hover { border-color:var(--cyan); }
.box-purple .game-tile:hover { border-color:var(--rose); }
.box-orange .game-tile:hover { border-color:var(--orange); }

/* Category tiles */
.cat-tile {
    border-radius:16px; padding:10px 12px;
    display:flex; align-items:center; gap:8px;
    background:linear-gradient(135deg,#ffffff,#f8fbff);
    border:1px solid #eef2f7;
    transition:.15s; white-space:nowrap;
}
.cat-tile:hover {
    transform:translateY(-2px);
    border-color:#e0e7ff;
    background:linear-gradient(135deg,#fdf4ff,#eff6ff);
}

/* Spotlight */
.top-spotlight {
    border-radius:24px;
    padding:18px;
    background: linear-gradient(135deg,#a78bfa,#fb7185);
    color:#fff;
    box-shadow:0 18px 60px rgba(0,0,0,.2);
}
#spotlightCarousel .game-tile { border-radius:20px; overflow:hidden; border:3px solid #fff; }
#spotlightCarousel .thumb-43 { aspect-ratio:16/9; border-radius:10px; }

/* Owl 2 rows */
.owl2row-item { display:flex; flex-direction:column; gap:12px; }
.owl2row-item .item { margin-bottom:12px; }
#mostPlayedCarousel .game-tile { border:2px solid #fff; border-radius:14px; }
#mostPlayedCarousel .game-tile:hover {
    border-color:var(--cyan);
    transform:translateY(-4px) scale(1.03);
}

/* Footer */
.footer {
    background:#0f172a; color:#cbd5e1; padding:20px 0;
}
.footer h3,.footer h4 {
    font-weight:800; font-size:1rem; margin-bottom:14px; color:#fff;
}
.footer p { color:#94a3b8; font-size:.95rem; }
.footer a { text-decoration:none; color:#cbd5e1; transition:.2s; }
.footer a:hover { color:#fff; text-decoration:underline; }
.footer ul { padding:0; margin:0; list-style:none; }
.footer ul li { margin-bottom:6px; }
.footer .d-flex a { color:#fff; }
.footer-bottom {
    border-top:1px solid #1e293b;
    margin-top:20px; padding-top:12px;
    font-size:.85rem; color:#94a3b8; text-align:center;
}

/* Popular tags simple scroll */
.tags-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}
.tags-scroll::-webkit-scrollbar { height: 6px; }
.tags-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.tags-scroll::-webkit-scrollbar-track { background: transparent; }

/* ===== All Tags Grid ===== */
.alltags-grid .cat-tile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all .2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
}
.alltags-grid .cat-tile i {
    color: #3b82f6;
    font-size: 0.95rem;
}
.alltags-grid .cat-tile:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    color: #1d4ed8;
}
.alltags-grid .cat-tile:hover i { color: #1d4ed8; }

/* Fix All Tags Grid overflow */
.alltags-grid {
    margin-left: 0;
    margin-right: 0;
    overflow-x: hidden;
}

.alltags-grid .col-6,
.alltags-grid .col-md-4,
.alltags-grid .col-lg-3 {
    padding-left: 8px;
    padding-right: 8px;
}

.alltags-grid .cat-tile {
    width: 100%;
    white-space: normal;   /* bỏ nowrap để không đẩy layout */
}


/* Game canvas */
.game-canvas {
    width:100%;
    height:600px;
    border-radius:14px;
    background:#000;
    display:block;
}

/* Loader icon */
.loader-icon {
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    width:48px;
    z-index:10;
}

/* Fullscreen button */
.fullscreen-btn {
    height:28px;
    cursor:pointer;
    transition:transform .2s;
}
.fullscreen-btn:hover { transform:scale(1.15); }

/* Gradient header */
.gradient-header {
    background:linear-gradient(135deg,#7c3aed,#06b6d4);
    color:#fff;
}

/* Colorful section head */
.colorful-head h2 {
    color:#7c3aed;
    font-weight:800;
}

/* Ad boxes */
.ad-box {
    display:flex;
    justify-content:center;
    align-items:center;
    background:#f9fafb;
    border:2px dashed #e5e7eb;
    border-radius:12px;
    padding:10px;
    color:#9ca3af;
    font-size:.9rem;
    font-weight:600;
    margin-bottom:1rem;
}
.ad-vertical { min-height:600px; }
/* Fix overflow for sidebar new games */
.newgames-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
    width: 100%;               /* fit trong box */
}

.newgames-grid li {
    list-style: none;
    overflow: hidden;          /* tránh item tràn */
}

.newgames-grid a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px;
    border-radius: 8px;
    background: #f9fafb;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    transition: 0.2s;
    overflow: hidden;          /* tránh text tràn */
}

.newgames-grid a:hover {
    background: #eef2ff;
    color: #4f46e5;
    transform: translateY(-2px);
}

.newgames-grid img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.newgames-grid span {
    flex: 1;
    min-width: 0;              /* bắt buộc text thu nhỏ */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* ===== Search Bar Styling ===== */
.search-bar {
    max-width: 400px;
    width: 100%;
}

.search-bar .form-control {
    border-radius: 999px 0 0 999px;   /* bo tròn bên trái */
    border: 2px solid #3b82f6;
    padding: 8px 14px;
    font-size: 0.95rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.05);
    transition: border-color .2s, box-shadow .2s;
}

.search-bar .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 6px rgba(37,99,235,.4);
}

.search-bar .btn {
    border-radius: 0 999px 999px 0;   /* bo tròn bên phải */
    background: linear-gradient(90deg,#3b82f6,#06b6d4);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0 16px;
    transition: .2s;
}

.search-bar .btn:hover {
    background: linear-gradient(90deg,#2563eb,#0891b2);
}

/* Mega menu titles */
.dropdown-menu-mega h6 {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Mega menu items */
.dropdown-menu-mega ul li a {
    display: block;
    padding: 4px 0;
    font-size: 0.9rem;
    color: #374151;
    transition: 0.2s;
}
.dropdown-menu-mega ul li a:hover {
    color: #3b82f6;
    transform: translateX(3px);
}
