/* ============================================
   FunsGang - Free Online Gaming Platform
   Core Styles & Layout System
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #0f0e17;
    color: #fffffe;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ============================================
   Site Header & Navigation
   ============================================ */

.gh-header {
    background: linear-gradient(180deg, #1a1832 0%, #0f0e17 100%);
    border-bottom: 1px solid rgba(255, 107, 107, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.gh-header-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
}

.gh-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.gh-brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.25);
}

.gh-brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ff6b6b, #ffa36b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gh-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.gh-nav a {
    color: #a7a4b8;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 7px 13px;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.gh-nav a:hover,
.gh-nav a.gh-active {
    color: #fffffe;
    background: rgba(255, 107, 107, 0.12);
}

.gh-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.gh-menu-btn img {
    width: 26px;
    height: 26px;
}

/* Mobile nav overlay */
.gh-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
}

.gh-nav-overlay.gh-visible {
    display: block;
}

.gh-mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -260px;
    width: 260px;
    height: 100%;
    background: #1a1832;
    z-index: 999;
    padding: 72px 20px 20px;
    transition: right 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid rgba(255, 107, 107, 0.1);
}

.gh-mobile-nav.gh-open {
    right: 0;
}

.gh-mobile-nav a {
    display: block;
    color: #a7a4b8;
    font-size: 0.95rem;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.2s;
}

.gh-mobile-nav a:hover {
    color: #ff6b6b;
}

.gh-mobile-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
}

.gh-mobile-close img {
    width: 22px;
    height: 22px;
}

/* ============================================
   Page Container
   ============================================ */

.gh-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* ============================================
   Section Titles
   ============================================ */

.gh-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.2);
}

.gh-section-head h2 {
    color: #fffffe;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.gh-section-head .gh-more-btn {
    width: 26px;
    height: 26px;
    cursor: pointer;
    transition: transform 0.2s;
}

.gh-section-head .gh-more-btn:hover {
    transform: translateX(3px);
}

/* ============================================
   Game Card Grid
   ============================================ */

.gh-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.gh-card {
    background: #1e1c2e;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
}

.gh-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 107, 107, 0.2);
}

.gh-card a {
    display: block;
}

.gh-card-thumb {
    width: 100%;
    aspect-ratio: 1 / 1.1;
    overflow: hidden;
}

.gh-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gh-card:hover .gh-card-thumb img {
    transform: scale(1.06);
}

.gh-card-label {
    padding: 9px 11px;
}

.gh-card-label p {
    font-size: 0.8rem;
    font-weight: 600;
    color: #e8e6f0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

/* Featured grid */
.gh-grid-hot {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    background: #1a1832;
    border-radius: 14px;
    border: 1px solid rgba(255, 107, 107, 0.08);
}

.gh-grid-hot .gh-card-thumb {
    aspect-ratio: 1 / 1;
}

/* ============================================
   Game Detail Page
   ============================================ */

.gh-detail-hero {
    display: flex;
    gap: 28px;
    align-items: center;
    padding: 28px;
    background: #1e1c2e;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 22px;
}

.gh-detail-poster {
    flex-shrink: 0;
    width: 260px;
}

.gh-detail-poster img {
    width: 100%;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.gh-detail-info {
    flex: 1;
}

.gh-detail-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fffffe;
    margin-bottom: 10px;
}

.gh-detail-info .gh-desc {
    font-size: 0.92rem;
    color: #a7a4b8;
    line-height: 1.7;
    margin-bottom: 18px;
}

.gh-detail-info .gh-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.gh-detail-info .gh-tag {
    padding: 4px 12px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 20px;
    font-size: 0.78rem;
    color: #ff6b6b;
}

.gh-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fffffe;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.gh-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Game iframe container */
.gh-iframe-box {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 480px;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 22px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.gh-iframe-box iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Gameplay tips section */
.gh-tips-panel {
    background: #1e1c2e;
    border-radius: 14px;
    padding: 26px;
    margin-bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.gh-tips-panel h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fffffe;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6b6b;
}

.gh-tips-panel p {
    font-size: 0.9rem;
    color: #a7a4b8;
    line-height: 1.8;
    margin-bottom: 12px;
}

.gh-tips-panel ul {
    padding-left: 20px;
    list-style: disc;
}

.gh-tips-panel ul li {
    font-size: 0.9rem;
    color: #a7a4b8;
    line-height: 1.8;
    margin-bottom: 6px;
}

/* ============================================
   Content Pages (About, Privacy, etc.)
   ============================================ */

.gh-article {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 20px;
}

.gh-article h1 {
    font-size: 1.7rem;
    font-weight: 700;
    color: #fffffe;
    margin-bottom: 6px;
}

.gh-article .gh-updated {
    font-size: 0.82rem;
    color: #6b6880;
    margin-bottom: 22px;
}

.gh-article h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fffffe;
    margin: 26px 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ff6b6b;
}

.gh-article h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #e8e6f0;
    margin: 18px 0 8px;
}

.gh-article p {
    font-size: 0.9rem;
    color: #a7a4b8;
    line-height: 1.8;
    margin-bottom: 14px;
}

.gh-article ul,
.gh-article ol {
    padding-left: 22px;
    margin-bottom: 14px;
    list-style: disc;
}

.gh-article ul li,
.gh-article ol li {
    font-size: 0.9rem;
    color: #a7a4b8;
    line-height: 1.8;
    margin-bottom: 6px;
}

.gh-article a {
    color: #ff6b6b;
    text-decoration: underline;
}

/* FAQ styles */
.gh-faq-item {
    background: #1e1c2e;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.gh-faq-item h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fffffe;
    margin: 0 0 8px;
    border: none;
    padding: 0;
}

.gh-faq-item p {
    margin: 0;
    color: #a7a4b8;
}

/* ============================================
   404 Error Page
   ============================================ */

.gh-error-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px 20px;
}

.gh-error-wrap h1 {
    font-size: 5.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b6b, #ffa36b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 14px;
}

.gh-error-wrap h2 {
    font-size: 1.3rem;
    color: #fffffe;
    margin-bottom: 10px;
}

.gh-error-wrap p {
    font-size: 0.95rem;
    color: #a7a4b8;
    margin-bottom: 26px;
    max-width: 480px;
}

.gh-error-wrap .gh-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fffffe;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.gh-error-wrap .gh-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.35);
}

/* ============================================
   Footer
   ============================================ */

.gh-footer {
    background: #1a1832;
    color: #a7a4b8;
    padding: 28px 20px 18px;
    margin-top: 36px;
    border-top: 1px solid rgba(255, 107, 107, 0.08);
}

.gh-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.gh-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-bottom: 18px;
}

.gh-footer-links a {
    color: #6b6880;
    font-size: 0.82rem;
    transition: color 0.2s;
}

.gh-footer-links a:hover {
    color: #ff6b6b;
}

.gh-footer-copy {
    text-align: center;
    font-size: 0.78rem;
    color: #4a4860;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ============================================
   Scroll Actions (Back to Top / Home)
   ============================================ */

.gh-scroll-actions {
    position: fixed;
    bottom: 72px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 900;
}

.gh-scroll-actions button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fffffe;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gh-scroll-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

.gh-scroll-actions button img {
    width: 18px;
    height: 18px;
}

/* ============================================
   Channel / Category Page Hero
   ============================================ */

.gh-channel-hero {
    text-align: center;
    padding: 36px 20px;
    margin-bottom: 28px;
    background: linear-gradient(135deg, #1a1832 0%, #2d1f4e 100%);
    border-radius: 14px;
    border: 1px solid rgba(255, 107, 107, 0.1);
}

.gh-channel-hero h1 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fffffe;
}

.gh-channel-hero p {
    font-size: 0.92rem;
    color: #a7a4b8;
    max-width: 580px;
    margin: 0 auto;
}

.gh-channel-count {
    font-size: 0.82rem;
    color: #6b6880;
    margin-bottom: 18px;
}

.gh-more-section {
    margin-top: 36px;
}

.gh-more-section .gh-section-head {
    background: linear-gradient(135deg, #2d1f4e, #1a1832);
}

/* ============================================
   Responsive - Tablet
   ============================================ */

@media (max-width: 1024px) {
    .gh-grid,
    .gh-grid-hot {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    .gh-detail-hero {
        flex-direction: column;
        text-align: center;
    }

    .gh-detail-poster {
        width: 200px;
    }

    .gh-detail-info .gh-tags {
        justify-content: center;
    }
}

/* ============================================
   Responsive - Mobile
   ============================================ */

@media (max-width: 768px) {
    .gh-header-inner {
        height: 54px;
        padding: 0 14px;
    }

    .gh-brand-icon {
        width: 32px;
        height: 32px;
    }

    .gh-brand-name {
        font-size: 1.15rem;
    }

    .gh-nav {
        display: none;
    }

    .gh-menu-btn {
        display: block;
    }

    .gh-mobile-nav {
        display: block;
    }

    .gh-container {
        padding: 16px 14px;
    }

    .gh-grid,
    .gh-grid-hot {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .gh-section-head {
        padding: 10px 14px;
    }

    .gh-section-head h2 {
        font-size: 0.98rem;
    }

    .gh-detail-hero {
        padding: 18px;
        gap: 18px;
    }

    .gh-detail-poster {
        width: 160px;
    }

    .gh-detail-info h1 {
        font-size: 1.2rem;
    }

    .gh-iframe-box {
        height: 52vh;
        min-height: 320px;
    }

    .gh-article {
        padding: 20px 14px;
    }

    .gh-article h1 {
        font-size: 1.35rem;
    }

    .gh-footer-links {
        gap: 10px;
    }

    .gh-scroll-actions {
        bottom: 56px;
        right: 14px;
    }

    .gh-channel-hero {
        padding: 26px 14px;
    }

    .gh-channel-hero h1 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .gh-grid,
    .gh-grid-hot {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .gh-card-label {
        padding: 7px 9px;
    }

    .gh-card-label p {
        font-size: 0.72rem;
    }
}

/* ============================================
   Legal / Info Content Pages
   ============================================ */

.gh-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.gh-page h1 {
    font-size: 2rem;
    color: #ff6b6b;
    margin-bottom: 8px;
}

.gh-page .gh-page-date {
    color: #a7a9be;
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.gh-page h2 {
    font-size: 1.3rem;
    color: #ee5a24;
    margin: 32px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 107, 107, 0.15);
}

.gh-page p {
    color: #d4d4dc;
    margin-bottom: 14px;
    font-size: 0.95rem;
    line-height: 1.75;
}

.gh-page ul {
    margin: 10px 0 18px 20px;
    list-style: disc;
}

.gh-page ul li {
    color: #d4d4dc;
    margin-bottom: 8px;
    font-size: 0.93rem;
    line-height: 1.7;
}

.gh-page strong {
    color: #fffffe;
}

.gh-page a {
    color: #ff6b6b;
    text-decoration: underline;
}

.gh-page a:hover {
    color: #ee5a24;
}

.gh-faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 107, 107, 0.1);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

.gh-faq-item h3 {
    font-size: 1.05rem;
    color: #fffffe;
    margin-bottom: 10px;
}

.gh-faq-item p {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .gh-page {
        padding: 28px 16px 48px;
    }

    .gh-page h1 {
        font-size: 1.6rem;
    }

    .gh-page h2 {
        font-size: 1.15rem;
    }
}
