/* =========================================================
   LAMON GAME — MMORPG PORTAL & MULTI-GAME DOWNLOAD STYLES
   Tập tin: assets/css/pages/home.css
   Tuân thủ: AI_RULES_PHP_MVC.md (Rule 8)
   ========================================================= */

:root {
    --tmgt-flame: #ea580c;
    --tmgt-flame-light: #f97316;
    --tmgt-gold: #f59e0b;
    --tmgt-gold-light: #fbbf24;
    --tmgt-cyan: #06b6d4;
    --tmgt-dark: #070b14;
    --tmgt-surface: rgba(15, 23, 42, 0.75);
    --tmgt-surface-hover: rgba(26, 37, 66, 0.88);
    --tmgt-card-border: rgba(255, 255, 255, 0.1);
    --tmgt-text-main: #f8fafc;
    --tmgt-text-muted: #94a3b8;
    --font-fantasy: 'Alegreya SC', 'Cinzel', serif;
    --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Base Body & Background */
html,
body {
    background-color: var(--tmgt-dark) !important;
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(234, 88, 12, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse at 85% 20%, rgba(245, 158, 11, 0.14) 0%, transparent 50%),
        radial-gradient(ellipse at 15% 50%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        linear-gradient(180deg, rgba(7, 11, 20, 0.85) 0%, rgba(7, 11, 20, 0.98) 100%),
        url('/images/pattern-bg.png') !important;
    background-size: cover !important;
    background-position: center top !important;
    background-attachment: fixed !important;
    color: var(--tmgt-text-main) !important;
    font-family: var(--font-ui) !important;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

.portal-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 14px 90px;
    box-sizing: border-box;
}

/* Top Header */
.portal-header {
    position: sticky;
    top: 8px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 20px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.portal-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--tmgt-flame);
}

.portal-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    font-size: 12px;
    font-weight: 700;
}

.portal-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: portalPulse 1.6s infinite ease-in-out;
}

@keyframes portalPulse {

    0%,
    100% {
        transform: scale(0.9);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

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

.portal-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.25), rgba(245, 158, 11, 0.25));
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fcd34d;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.portal-header-btn:hover {
    background: linear-gradient(135deg, #ea580c, #f59e0b);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(234, 88, 12, 0.4);
    transform: translateY(-1px);
}

/* =========================================================
   HERO BANNER CAROUSEL
   ========================================================= */
.portal-hero-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    background: #000;
}

@media (max-width: 768px) {
    .portal-hero-slider {
        aspect-ratio: 16 / 9;
        border-radius: 14px;
        margin-bottom: 18px;
    }
}

.portal-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s ease;
    transform: scale(1.02);
}

.portal-hero-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.portal-hero-slide a {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.portal-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portal-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(7, 11, 20, 0.9) 0%, rgba(7, 11, 20, 0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 30px;
}

@media (max-width: 600px) {
    .portal-slide-overlay {
        padding: 14px 16px;
    }
}

.portal-slide-badge {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 6px;
    background: linear-gradient(135deg, #ea580c, #f59e0b);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.portal-slide-title {
    margin: 0 0 6px 0;
    font-family: var(--font-fantasy);
    font-size: clamp(1.3rem, 2.8vw, 2rem);
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.portal-slide-desc {
    margin: 0;
    font-size: 13.5px;
    color: #e2e8f0;
    max-width: 650px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Carousel Controls */
.portal-slider-controls {
    position: absolute;
    bottom: 16px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.portal-slider-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.portal-slider-btn:hover {
    background: var(--tmgt-flame);
    border-color: var(--tmgt-gold);
}

.portal-slider-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.portal-dot.active {
    width: 22px;
    background: linear-gradient(90deg, #ea580c, #f59e0b);
}

/* =========================================================
   QUICK ACTION MENU
   ========================================================= */
.portal-quick-menu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

@media (max-width: 768px) {
    .portal-quick-menu {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }
}

.portal-quick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--tmgt-surface);
    border: 1px solid var(--tmgt-card-border);
    border-radius: 14px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
}

.portal-quick-item:hover {
    background: var(--tmgt-surface-hover);
    border-color: rgba(234, 88, 12, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.15);
}

.portal-quick-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.portal-quick-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}

.portal-quick-icon.flame {
    background: rgba(234, 88, 12, 0.2);
    border: 1px solid rgba(234, 88, 12, 0.4);
    color: #fb923c;
}

.portal-quick-icon.gold {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

.portal-quick-icon.blue {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.portal-quick-icon.green {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.portal-quick-text h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.portal-quick-text p {
    margin: 2px 0 0 0;
    font-size: 11.5px;
    color: var(--tmgt-text-muted);
}

/* =========================================================
   SECTION HEADERS
   ========================================================= */
.portal-section {
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .portal-section {
        margin-bottom: 24px;
    }
}

.portal-section-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 0 10px 0;
    text-align: left;
}

.portal-section-title-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    width: auto;
}

.portal-section-title {
    margin: 0;
    text-align: left;
    font-family: var(--font-fantasy);
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 40%, #fcd34d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portal-section-link {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--tmgt-gold);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-left: auto;
}

.portal-section-link:hover {
    color: #ffffff;
    transform: translateX(2px);
}

/* =========================================================
   FEATURED MMORPG GAMES GRID (BỐ CỤC NHIỀU GAME)
   ========================================================= */
.portal-games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 860px) {
    .portal-games-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

.portal-game-card {
    background: var(--tmgt-surface);
    border: 1px solid var(--tmgt-card-border);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    backdrop-filter: blur(12px);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.portal-game-card:hover {
    background: var(--tmgt-surface-hover);
    border-color: rgba(234, 88, 12, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 20px rgba(234, 88, 12, 0.15);
}

.portal-game-card:hover .portal-game-title {
    color: var(--tmgt-gold-light);
}

.portal-game-card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    text-indent: -9999px;
    overflow: hidden;
}

.portal-game-card.highlight {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.12) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.portal-game-main {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.portal-game-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.portal-game-avatar {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: #000;
    display: block;
}

.portal-game-card.highlight .portal-game-avatar {
    border-color: var(--tmgt-gold);
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.4);
}

.portal-game-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.portal-game-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.portal-game-title {
    margin: 0;
    font-family: var(--font-fantasy);
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-game-badge-hot {
    background: linear-gradient(135deg, #ea580c, #f59e0b);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

.portal-game-badge-hot.new {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
}

.portal-game-badge-hot.pink {
    background: linear-gradient(135deg, #a855f7, #ec4899);
}

.portal-game-badge-hot.blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.portal-game-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.portal-game-tag {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.portal-game-tag.genre {
    color: #fb923c;
    background: rgba(234, 88, 12, 0.15);
}

.portal-game-desc {
    margin: 2px 0 0 0;
    font-size: 12.5px;
    color: var(--tmgt-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-game-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
    position: relative;
    z-index: 2;
}

.portal-btn-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
    transition: all 0.2s ease;
    flex: 1;
}

.portal-btn-play:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.5);
    color: #ffffff;
}

.portal-btn-play.psm {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.35);
}

.portal-btn-play.tbtt {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.portal-btn-sub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
}

.portal-btn-sub:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.portal-btn-sub.view-detail {
    flex: 0.9;
}

/* =========================================================
   WELFARE & PROMOTION CARDS (PHÚC LỢI)
   ========================================================= */
.portal-promo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 680px) {
    .portal-promo-grid {
        grid-template-columns: 1fr;
    }
}

.portal-promo-card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--tmgt-surface);
    display: block;
    text-decoration: none;
    transition: all 0.25s ease;
}

.portal-promo-card:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.portal-promo-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* =========================================================
   GIFTCODE CARDS (NHẬN CODE VIP)
   ========================================================= */
.portal-giftcode-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 680px) {
    .portal-giftcode-grid {
        grid-template-columns: 1fr;
    }
}

.portal-giftcode-card {
    background: var(--tmgt-surface);
    border: 1px solid var(--tmgt-card-border);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.portal-giftcode-card:hover {
    border-color: rgba(234, 88, 12, 0.4);
    background: var(--tmgt-surface-hover);
}

.portal-giftcode-avatar {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.portal-giftcode-info {
    flex: 1;
    min-width: 0;
}

.portal-giftcode-info h4 {
    margin: 0 0 4px 0;
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-giftcode-stat {
    font-size: 12px;
    color: var(--tmgt-text-muted);
    margin: 0;
}

.portal-btn-giftcode {
    padding: 7px 14px;
    border-radius: 8px;
    background: linear-gradient(135deg, #a855f7, #7e22ce);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    border: none;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.portal-btn-giftcode:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(168, 85, 247, 0.45);
    color: #ffffff;
}

/* =========================================================
   NEWS & EVENTS (TIN TỨC MÁY CHỦ)
   ========================================================= */
/* Căn trái riêng cho tiêu đề TIN TỨC MÁY CHỦ */
.portal-section-news .portal-section-header,
.portal-section-header.news-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between !important;
    text-align: left !important;
    padding: 0 0 10px 0 !important;
}

.portal-section-news .portal-section-title-wrap,
.portal-section-header.news-header .portal-section-title-wrap {
    justify-content: flex-start !important;
    text-align: left !important;
    width: auto !important;
}

.portal-section-news .portal-section-title,
.portal-section-header.news-header .portal-section-title {
    margin: 0 !important;
    text-align: left !important;
}

.portal-section-news .portal-section-link,
.portal-section-header.news-header .portal-section-link {
    position: static !important;
    transform: none !important;
    top: auto !important;
    right: auto !important;
}

.portal-news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.portal-news-card {
    background: var(--tmgt-surface);
    border: 1px solid var(--tmgt-card-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.portal-news-card:hover {
    background: var(--tmgt-surface-hover);
    border-color: rgba(234, 88, 12, 0.45);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(234, 88, 12, 0.2);
}

.portal-news-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0b1120;
    position: relative;
}

.portal-news-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 11, 20, 0) 50%, rgba(15, 23, 42, 0.85) 100%);
    pointer-events: none;
}

.portal-news-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.portal-news-card:hover .portal-news-img-wrap img {
    transform: scale(1.05);
}

.portal-news-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    background: transparent;
}

.portal-news-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--tmgt-text-main);
    line-height: 1.45;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-news-card:hover .portal-news-title {
    color: var(--tmgt-gold-light);
}

.portal-news-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--tmgt-text-muted);
    font-weight: 400;
}

.portal-news-meta::before {
    content: '';
    display: inline-block;
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.85;
    transition: all 0.2s ease;
}

.portal-news-card:hover .portal-news-meta::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    opacity: 1;
}

/* =========================================================
   SUPPORT & COMMUNITY SECTION (Kế thừa Thần Ma Giáng Thế)
   ========================================================= */
.tmgt-support-card {
    background: linear-gradient(180deg, rgba(20, 26, 42, 0.85) 0%, rgba(10, 14, 26, 0.95) 100%);
    border: 1px solid rgba(234, 88, 12, 0.35);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.tmgt-support-card .portal-section-header,
#support .portal-section-header {
    justify-content: center;
    text-align: center;
}

.tmgt-support-card .portal-section-title-wrap,
#support .portal-section-title-wrap {
    justify-content: center;
    text-align: center;
    width: 100%;
}

.tmgt-support-card .portal-section-title,
#support .portal-section-title {
    text-align: center;
    margin: 0 auto;
}

@media (max-width: 860px) {
    .tmgt-support-card {
        padding: 16px 14px;
    }
}

.tmgt-support-alert {
    background: rgba(234, 88, 12, 0.15);
    border: 1px solid rgba(234, 88, 12, 0.35);
    border-radius: 12px;
    padding: 12px 14px;
    color: #fcd34d;
    font-size: 13.5px;
    margin-bottom: 14px;
    line-height: 1.5;
    text-align: center;
}

.tmgt-support-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

@media (max-width: 860px) {
    .tmgt-support-tiles {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.tmgt-support-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tmgt-support-tile:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: #ffffff;
}

.tmgt-support-icon {
    font-size: 22px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tmgt-support-label {
    font-size: 13.5px;
    font-weight: 600;
}


/* =========================================================
   SIDEBOTTOM NAVIGATION (Kế thừa Thần Ma Giáng Thế)
   ========================================================= */
#sidebottom-root {
    display: block;
    width: 100%;
}

#sidebottom-root .sidebottom,
.sidebottom.fixed-bottom {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: 0 !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 1180px !important;
    z-index: 9999 !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

#sidebottom-root .sidebottom .container,
.sidebottom.fixed-bottom .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

#sidebottom-root .sidebottom .bg-color {
    width: 100% !important;
    background: linear-gradient(180deg, rgba(20, 26, 42, 0.96) 0%, rgba(10, 14, 26, 0.98) 100%) !important;
    border-top: 1px solid rgba(234, 88, 12, 0.4) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6) !important;
}

#sidebottom-root .sidebottom ul {
    width: 100% !important;
    height: 62px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-around !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#sidebottom-root .sidebottom ul li {
    flex: 1 !important;
    height: 100% !important;
}

#sidebottom-root .sidebottom ul li a {
    color: #e2e8f0 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    gap: 3px !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
}

#sidebottom-root .sidebottom ul li a:hover {
    color: #ffffff !important;
    background: rgba(234, 88, 12, 0.15) !important;
}

#sidebottom-root .sidebottom ul li a.active {
    background: radial-gradient(49.41% 49.15% at 50% 50.85%, rgba(234, 88, 12, 0.85) 0, rgba(234, 88, 12, 0) 100%) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* =========================================================
   MOBILE RESPONSIVE SYSTEM (TOÀN DIỆN CHO ĐIỆN THOẠI)
   Áp dụng: max-width 768px & tối ưu sâu cho màn hình nhỏ
   ========================================================= */
@media (max-width: 768px) {

    /* 1. Base Container */
    .portal-container {
        padding: 10px 12px 85px 12px;
    }

    /* 2. Top Header */
    .portal-header {
        position: sticky;
        top: 6px;
        z-index: 1000;
        padding: 8px 12px;
        border-radius: 14px;
        gap: 8px;
        margin-bottom: 12px;
        flex-wrap: nowrap;
        background: rgba(15, 23, 42, 0.92);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    }

    .portal-brand-name {
        font-size: 13.5px;
    }

    .portal-logo-img {
        width: 28px;
        height: 28px;
    }

    .portal-badge-live {
        display: none !important;
    }

    .portal-header-actions .support-btn {
        display: none !important;
    }

    .portal-header-btn.event-btn {
        padding: 5px 10px;
        font-size: 11px;
        white-space: nowrap;
    }

    /* 3. Hero Banner Slider */
    .portal-hero-slider {
        aspect-ratio: 16 / 9;
        border-radius: 14px;
        margin-bottom: 12px;
    }

    .portal-slider-btn {
        display: none !important;
    }

    .portal-slider-controls {
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
        bottom: 8px !important;
    }

    .portal-slide-overlay {
        padding: 10px 12px 24px 12px;
        background: linear-gradient(0deg, rgba(7, 11, 20, 0.96) 0%, rgba(7, 11, 20, 0.45) 60%, transparent 100%);
    }

    .portal-slide-badge {
        font-size: 9.5px;
        padding: 2px 6px;
        margin-bottom: 3px;
    }

    .portal-slide-title {
        font-size: 1rem;
        margin-bottom: 2px;
        line-height: 1.25;
    }

    .portal-slide-desc {
        display: none !important;
    }

    /* 4. Quick Actions Menu — Thanh App 4 Nút Tinh Gọn */
    .portal-quick-menu {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
        margin-bottom: 16px !important;
    }

    .portal-quick-item {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 8px 2px !important;
        gap: 4px !important;
        border-radius: 12px !important;
    }

    .portal-quick-icon {
        width: 38px !important;
        height: 38px !important;
        font-size: 18px !important;
        border-radius: 50% !important;
        margin: 0 auto !important;
    }

    .portal-quick-icon svg {
        width: 18px !important;
        height: 18px !important;
    }

    .portal-quick-text h4 {
        font-size: 10.5px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
        font-weight: 700 !important;
        margin: 0 !important;
    }

    .portal-quick-text p {
        display: none !important;
    }

    /* 5. Section Headers */
    .portal-section {
        margin-bottom: 18px;
    }

    .portal-section-header {
        justify-content: space-between !important;
        text-align: left !important;
        margin-bottom: 10px;
        padding: 0 0 6px 0 !important;
    }

    .portal-section-title-wrap {
        justify-content: flex-start !important;
        text-align: left !important;
        width: auto !important;
    }

    .portal-section-title {
        font-size: 1.1rem !important;
        text-align: left !important;
        margin: 0 !important;
    }

    .portal-section-subtitle {
        display: none !important;
    }

    .portal-section-link {
        font-size: 11px !important;
        position: static !important;
        transform: none !important;
        margin-left: auto !important;
    }

    /* 6. Game Cards Grid — Bố Cục Thẻ Tải Game Chuẩn Mobile */
    .portal-games-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .portal-game-card {
        padding: 12px 10px !important;
        gap: 10px !important;
        border-radius: 14px !important;
    }

    .portal-game-main {
        gap: 10px !important;
    }

    .portal-game-avatar {
        width: 56px !important;
        height: 56px !important;
        border-radius: 12px !important;
    }

    .portal-game-title {
        font-size: 1.05rem !important;
    }

    .portal-game-badge-hot {
        font-size: 9px !important;
        padding: 1px 6px !important;
    }

    .portal-game-tag {
        font-size: 9.5px !important;
        padding: 1px 5px !important;
    }

    .portal-game-desc {
        font-size: 11px !important;
        line-height: 1.35 !important;
        -webkit-line-clamp: 1 !important;
        margin: 1px 0 0 0 !important;
    }

    .portal-game-actions {
        width: 100% !important;
        gap: 6px !important;
        margin-top: 2px !important;
    }

    .portal-btn-play {
        flex: 1.2 !important;
        justify-content: center !important;
        padding: 8px 6px !important;
        font-size: 11.5px !important;
        border-radius: 8px !important;
    }

    .portal-btn-sub {
        flex: 1 !important;
        justify-content: center !important;
        padding: 8px 6px !important;
        font-size: 11px !important;
        border-radius: 8px !important;
    }

    /* 7. Giftcode Cards */
    .portal-giftcode-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .portal-giftcode-card {
        padding: 8px 10px !important;
        gap: 10px !important;
        border-radius: 12px !important;
    }

    .portal-giftcode-avatar {
        width: 42px !important;
        height: 42px !important;
        border-radius: 10px !important;
    }

    .portal-giftcode-info h4 {
        font-size: 12.5px !important;
    }

    .portal-giftcode-stat {
        font-size: 10.5px !important;
    }

    .portal-btn-giftcode {
        font-size: 11px !important;
        padding: 6px 10px !important;
        border-radius: 8px !important;
        white-space: nowrap !important;
    }

    /* 8. News Cards & Section Header Mobile */
    .portal-section-news .portal-section-header,
    .portal-section-header.news-header {
        justify-content: space-between !important;
        text-align: left !important;
        padding: 0 0 6px 0 !important;
    }

    .portal-section-news .portal-section-title-wrap,
    .portal-section-header.news-header .portal-section-title-wrap {
        justify-content: flex-start !important;
        text-align: left !important;
        width: auto !important;
    }

    .portal-section-news .portal-section-title,
    .portal-section-header.news-header .portal-section-title {
        margin: 0 !important;
        text-align: left !important;
    }

    .portal-section-news .portal-section-link,
    .portal-section-header.news-header .portal-section-link {
        position: static !important;
        transform: none !important;
        top: auto !important;
        right: auto !important;
    }

    .portal-news-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .portal-news-card {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0 !important;
        gap: 0 !important;
        border-radius: 12px !important;
        background: var(--tmgt-surface) !important;
        border: 1px solid var(--tmgt-card-border) !important;
        overflow: hidden !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    }

    .portal-news-img-wrap {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
        border-radius: 0 !important;
    }

    .portal-news-body {
        padding: 12px 14px 14px !important;
        gap: 8px !important;
        background: transparent !important;
    }

    .portal-news-title {
        font-size: 13.5px !important;
        line-height: 1.4 !important;
        color: var(--tmgt-text-main) !important;
        font-weight: 600 !important;
    }

    .portal-news-meta {
        font-size: 11.5px !important;
        color: var(--tmgt-text-muted) !important;
    }

    /* 9. Support & CSKH 24/7 */
    .tmgt-support-card {
        padding: 12px 10px !important;
        border-radius: 14px !important;
    }

    .tmgt-support-card .portal-section-header,
    #support .portal-section-header {
        justify-content: center !important;
        text-align: center !important;
    }

    .tmgt-support-card .portal-section-title-wrap,
    #support .portal-section-title-wrap {
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    .tmgt-support-card .portal-section-title,
    #support .portal-section-title {
        text-align: center !important;
        margin: 0 auto !important;
    }

    .tmgt-support-alert {
        font-size: 11.5px !important;
        line-height: 1.4 !important;
        padding: 8px 10px !important;
        margin-bottom: 8px !important;
        text-align: center;
    }

    .tmgt-support-tiles {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }

    .tmgt-support-tile {
        padding: 8px 8px !important;
        gap: 8px !important;
        border-radius: 10px !important;
    }

    .tmgt-support-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: 15px !important;
        border-radius: 8px !important;
    }

    .tmgt-support-label {
        font-size: 11px !important;
    }

    /* 10. Mobile Sidebottom Navigation */
    #sidebottom-root .sidebottom,
    .sidebottom.fixed-bottom {
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
    }

    #sidebottom-root .sidebottom .bg-color {
        border-radius: 14px 14px 0 0 !important;
    }

    #sidebottom-root .sidebottom ul {
        height: 56px !important;
    }

    #sidebottom-root .sidebottom ul li a span {
        font-size: 10px !important;
    }

    #sidebottom-root .sidebottom ul li a svg {
        width: 18px !important;
        height: 18px !important;
    }
}