/* ============================================
   Jyxon.top - Gaming Platform Design System
   Bright, clean, modern color scheme
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f0f2f5;
    color: #1f2937;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

a:hover { opacity: 0.8; }

ul, ol { list-style: none; }

img {
    max-width: 100%;
    display: block;
}

/* ============================================
   HEADER — Two-row layout
   ============================================ */

.jx-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.jx-header-top {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px 0;
}

.jx-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.jx-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.jx-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.jx-brand-name {
    font-size: 1.5rem;
    font-weight: 900;
    color: #22c55e;
    letter-spacing: -0.5px;
}

.jx-brand-tagline {
    font-size: 0.68rem;
    color: #9ca3af;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.jx-search-box {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 0 16px;
    width: 280px;
    transition: border-color 0.2s;
}

.jx-search-box:focus-within {
    border-color: #22c55e;
    background: #ffffff;
}

.jx-search-box input {
    background: none;
    border: none;
    outline: none;
    color: #1f2937;
    font-size: 0.88rem;
    padding: 10px 8px;
    width: 100%;
}

.jx-search-box input::placeholder {
    color: #9ca3af;
}

.jx-search-icon {
    width: 18px;
    height: 18px;
    opacity: 0.4;
}

/* Nav row */
.jx-nav-row {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.jx-nav-row::-webkit-scrollbar { display: none; }

.jx-nav-row a {
    color: #6b7280;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 12px 16px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.jx-nav-row a:hover,
.jx-nav-row a.jx-active {
    color: #22c55e;
    border-bottom-color: #22c55e;
    opacity: 1;
}

.jx-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.jx-menu-btn img { width: 24px; height: 24px; }

/* Mobile nav */
.jx-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.jx-nav-overlay.jx-visible { display: block; }

.jx-mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: #ffffff;
    z-index: 999;
    padding: 72px 24px 24px;
    transition: right 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid #e5e7eb;
}

.jx-mobile-nav.jx-open { right: 0; }

.jx-mobile-nav a {
    display: block;
    color: #6b7280;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}

.jx-mobile-nav a:hover { color: #22c55e; }

.jx-mobile-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    cursor: pointer;
}

.jx-mobile-close img { width: 22px; height: 22px; }

/* ============================================
   CONTAINER
   ============================================ */

.jx-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   SECTION TITLES
   ============================================ */

.jx-sec-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1f2937;
    margin: 36px 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jx-sec-title span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jx-sec-title .jx-sec-icon {
    width: 22px;
    height: 22px;
}

.jx-sec-title .jx-sec-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: #9ca3af;
    padding: 5px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    transition: all 0.2s;
}

.jx-sec-title .jx-sec-link:hover {
    color: #22c55e;
    border-color: #22c55e;
    opacity: 1;
}

/* ============================================
   GAME CARD
   ============================================ */

.jx-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 12px;
}

.jx-card {
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    transition: all 0.25s;
}

.jx-card:hover {
    transform: translateY(-3px);
    border-color: #22c55e;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.jx-card a { display: block; }

.jx-card-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}

.jx-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.jx-card:hover .jx-card-thumb img {
    transform: scale(1.05);
}

.jx-card-label {
    padding: 10px 12px;
}

.jx-card-label p {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.jx-card-label .jx-card-type {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 4px;
}

/* ============================================
   HORIZONTAL GAME CARD
   ============================================ */

.jx-hcard {
    display: flex;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.25s;
    margin-bottom: 12px;
}

.jx-hcard:hover {
    border-color: #22c55e;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.jx-hcard-thumb {
    width: 180px;
    min-height: 120px;
    flex-shrink: 0;
    overflow: hidden;
}

.jx-hcard-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jx-hcard-body {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.jx-hcard-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
}

.jx-hcard-body p {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jx-hcard-body .jx-hcard-meta {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.72rem;
    color: #9ca3af;
}

.jx-hcard-body .jx-hcard-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   GAME DETAIL PAGE
   ============================================ */

.jx-detail-hero {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.jx-detail-poster {
    flex-shrink: 0;
    width: 240px;
}

.jx-detail-poster img {
    width: 100%;
    border-radius: 10px;
}

.jx-detail-info { flex: 1; }

.jx-detail-info h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 10px;
}

.jx-detail-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.jx-detail-meta span {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 14px;
    background: #f3f4f6;
    color: #6b7280;
}

.jx-detail-meta .jx-detail-type {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.jx-desc {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.75;
    margin-bottom: 20px;
}

.jx-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: #22c55e;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.jx-play-btn:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

/* Guide section */
.jx-guide-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.jx-guide-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.jx-guide-section p {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.8;
}

/* ============================================
   BREADCRUMB NAVIGATION
   ============================================ */

.jx-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 0;
    font-size: 0.82rem;
    color: #9ca3af;
}

.jx-breadcrumb a {
    color: #6b7280;
    font-weight: 500;
    transition: color 0.2s;
}

.jx-breadcrumb a:hover {
    color: #22c55e;
    opacity: 1;
}

.jx-breadcrumb span:last-child {
    color: #1f2937;
    font-weight: 600;
}

/* Iframe */
.jx-iframe-box {
    width: 100%;
    height: 72vh;
    min-height: 500px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.jx-iframe-box iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.jx-more-section { margin-top: 36px; }

/* ============================================
   CONTENT / LEGAL PAGES
   ============================================ */

.jx-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.jx-page h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #22c55e;
    margin-bottom: 8px;
}

.jx-page .jx-page-date {
    color: #9ca3af;
    font-size: 0.88rem;
    margin-bottom: 28px;
}

.jx-page h2 {
    font-size: 1.25rem;
    color: #374151;
    margin: 32px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
}

.jx-page p {
    color: #4b5563;
    margin-bottom: 14px;
    font-size: 0.93rem;
    line-height: 1.75;
}

.jx-page ul {
    margin: 10px 0 18px 20px;
    list-style: disc;
}

.jx-page ul li {
    color: #4b5563;
    margin-bottom: 8px;
    font-size: 0.91rem;
    line-height: 1.7;
}

.jx-page strong { color: #1f2937; }

.jx-page a {
    color: #22c55e;
    text-decoration: underline;
}

.jx-faq-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px 22px;
    margin-bottom: 10px;
}

.jx-faq-item h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px;
}

.jx-faq-item p {
    margin: 0;
    color: #6b7280;
}

/* ============================================
   FOOTER — Multi-column dark footer
   ============================================ */

.jx-footer {
    background: #1f2937;
    border-top: none;
    padding: 40px 24px 20px;
    margin-top: 48px;
}

.jx-footer-inner {
    max-width: 1320px;
    margin: 0 auto;
}

.jx-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.jx-footer-brand p {
    font-size: 0.84rem;
    color: #9ca3af;
    line-height: 1.7;
    margin-top: 12px;
    max-width: 320px;
}

.jx-footer-col h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: #d1d5db;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.jx-footer-col a {
    display: block;
    color: #9ca3af;
    font-size: 0.84rem;
    padding: 4px 0;
    transition: color 0.2s;
}

.jx-footer-col a:hover { color: #22c55e; opacity: 1; }

.jx-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
    font-size: 0.78rem;
    color: #6b7280;
}

/* ============================================
   SCROLL TO TOP
   ============================================ */

.jx-scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 900;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.jx-scroll-top:hover {
    background: #22c55e;
    border-color: #22c55e;
}

.jx-scroll-top:hover img {
    filter: brightness(0) invert(1);
}

.jx-scroll-top img {
    width: 18px;
    height: 18px;
}

/* ============================================
   CHANNEL / CATEGORY PAGE
   ============================================ */

.jx-channel-hero {
    text-align: center;
    padding: 40px 24px;
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.jx-channel-hero h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 10px;
}

.jx-channel-hero p {
    font-size: 0.92rem;
    color: #6b7280;
    max-width: 560px;
    margin: 0 auto;
}

.jx-channel-count {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-top: 12px;
}

/* ============================================
   RESPONSIVE — Tablet
   ============================================ */

@media (max-width: 1024px) {
    .jx-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    .jx-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .jx-detail-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .jx-detail-poster { width: 200px; }

    .jx-detail-meta { justify-content: center; }

    .jx-hcard-thumb { width: 140px; }

    .jx-search-box { width: 220px; }
}

/* ============================================
   RESPONSIVE — Mobile
   ============================================ */

@media (max-width: 768px) {
    .jx-header-top {
        padding: 10px 16px 0;
    }

    .jx-brand-icon { width: 34px; height: 34px; }
    .jx-brand-name { font-size: 1.25rem; }
    .jx-brand-tagline { display: none; }

    .jx-search-box {
        width: 160px;
        padding: 0 12px;
    }

    .jx-search-box input { font-size: 0.82rem; }

    .jx-nav-row { display: none; }
    .jx-menu-btn { display: block; }
    .jx-mobile-nav { display: block; }

    .jx-container { padding: 0 16px; }

    .jx-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .jx-detail-hero { padding: 20px; gap: 16px; }
    .jx-detail-poster { width: 160px; }
    .jx-detail-info h1 { font-size: 1.3rem; }

    .jx-iframe-box { height: 52vh; min-height: 340px; }

    .jx-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .jx-footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .jx-channel-hero { padding: 28px 16px; }
    .jx-channel-hero h1 { font-size: 1.4rem; }

    .jx-hcard { flex-direction: column; }
    .jx-hcard-thumb { width: 100%; min-height: 160px; }

    .jx-scroll-top { bottom: 16px; right: 16px; }
}

@media (max-width: 480px) {
    .jx-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .jx-card-label { padding: 8px 10px; }
    .jx-card-label p { font-size: 0.74rem; }

    .jx-search-box { width: 130px; }
}

/* Legal pages mobile */
@media (max-width: 768px) {
    .jx-page { padding: 28px 16px 48px; }
    .jx-page h1 { font-size: 1.6rem; }
    .jx-page h2 { font-size: 1.1rem; }
}
