@charset "UTF-8";
:root {
    --bg-color: #0c0d14;
    --card-bg: #161722;
    --text-primary: #f5f6fa;
    --text-secondary: #a0a5ba;
    --theme-color: #ffb703;
    --theme-color-rgb: 255, 183, 3;
    --danger-color: #ff4d4f;
    --border-color: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    padding-bottom: 70px; /* Safe space for bottom tabbar */
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Screen Reader Only for safe SEO links */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* App Header styling */
header {
    background-color: rgba(22, 23, 34, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.app-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--theme-color);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 0 10px rgba(255, 183, 3, 0.2);
}

.search-bar-wrap {
    flex: 1;
    max-width: 500px;
}

.search-form {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-form:focus-within {
    border-color: var(--theme-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(255, 183, 3, 0.15);
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 15px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-submit-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: color 0.2s;
}

.search-submit-btn:hover {
    color: var(--theme-color);
}

/* Category Navigation (Horizontal Swipe) */
.category-nav-bar {
    padding: 8px 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.category-nav-bar::-webkit-scrollbar {
    display: none;
}

.category-nav-list {
    display: inline-flex;
    gap: 12px;
    padding: 0 15px;
}

.category-nav-link {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.category-nav-link.active, .category-nav-link:hover {
    color: var(--theme-color);
    background: rgba(255, 183, 3, 0.1);
    border-color: rgba(255, 183, 3, 0.3);
}

/* Layout wrapper */
.app-layout {
    max-width: 800px;
    margin: 15px auto;
    padding: 0 10px;
}

/* Carousel/Banner for index */
.promo-banner {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.promo-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promo-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 15px 15px;
    background: linear-gradient(to top, rgba(12,13,20,1) 0%, rgba(12,13,20,0.8) 50%, rgba(12,13,20,0) 100%);
}

.promo-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 5px;
}

/* Waterfall Stream Layout */
.waterfall-section-title {
    font-size: 16px;
    font-weight: bold;
    margin: 15px 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

.more-link {
    font-size: 12px;
    color: var(--theme-color);
    font-weight: 500;
}

.app-waterfall {
    column-count: 2;
    column-gap: 10px;
    margin-bottom: 20px;
}

.app-waterfall-card {
    break-inside: avoid;
    background-color: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.app-waterfall-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 183, 3, 0.15);
    border-color: rgba(255, 183, 3, 0.3);
}

.card-media {
    position: relative;
    width: 100%;
    padding-top: 135%; /* Portrait format for native APP feel */
    background: #232532;
    overflow: hidden;
}

.card-media-landscape {
    padding-top: 56.25%; /* 16:9 for landscape items */
}

.card-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.app-waterfall-card:hover .card-media img {
    transform: scale(1.04);
}

.card-tag {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    backdrop-filter: blur(4px);
}

.card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--theme-color);
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
}

.card-info {
    padding: 10px;
}

.card-title {
    font-size: 13px;
    font-weight: bold;
    color: var(--text-primary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    height: 36px;
}

/* Play Page Styling */
.video-player-wrap {
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    background: #000;
}

.play-detail-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.play-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.4;
}

.play-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tag-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--theme-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
}

.tag-item:hover {
    background: rgba(255, 183, 3, 0.1);
}

/* Pagination container */
.app-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
}

.pager-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: bold;
}

.pager-btn:hover {
    border-color: var(--theme-color);
    color: var(--theme-color);
}

.pager-current {
    font-size: 13px;
    color: var(--text-primary);
}

/* Fixed Bottom Tabbar */
.bottom-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 58px;
    background-color: #12131d;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
    padding-bottom: env(safe-area-inset-bottom);
}

.tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 500;
    width: 20%;
    height: 100%;
    cursor: pointer;
}

.tabbar-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.tabbar-item.active {
    color: var(--theme-color);
}

/* Grid ads card specific overlay to look native */
.ad-native-card {
    border: 1px solid rgba(255, 183, 3, 0.2) !important;
}

.ad-native-card .card-badge {
    background: #ff4d4f !important;
    color: #fff !important;
}

/* Traditional Footer styles (normally hidden from immediate view, but crawls fine) */
.seo-footer {
    padding: 20px 15px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    background-color: rgba(12, 13, 20, 0.5);
}

.footer-link-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.hot-links-mesh {
    margin: 15px 5px;
    padding: 10px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    font-size: 11px;
}

.hot-links-mesh h4 {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 12px;
}

.hot-links-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hot-link-item {
    color: var(--text-secondary);
}

.hot-link-item:hover {
    color: var(--theme-color);
}

/* Responsive adjustments */
@media screen and (max-width: 480px) {
    .app-waterfall {
        column-count: 2;
        column-gap: 8px;
    }
    .app-waterfall-card {
        margin-bottom: 8px;
    }
}

@media screen and (max-width: 768px) {
    .floating-ad {
        display: block !important;
        width: 80px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 999999 !important;
    }
}






/* GLOBAL FLOATING ADS FIX */
.floating-ad-container {
    position: absolute !important;
    top: 50%;
    transform: translateY(-50%) !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    transition: top 0.5s cubic-bezier(0.23, 1, 0.32, 1) !important;
}
.floating-ad-container-left {
    left: 10px !important;
    right: auto !important;
}
.floating-ad-container-right {
    right: 10px !important;
    left: auto !important;
}

/* Hide standalone ads to prevent FOUC (Flash of Unstyled Content) layout shift */
.floating-ad, .floating-ad-esi {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Reveal and format them correctly once JS wraps them in the container */
.floating-ad-container .floating-ad, 
.floating-ad-container .floating-ad-esi {
    position: relative !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 140px !important;
    display: block !important;
    margin: 0 !important;
}

.floating-ad img, .floating-ad-esi img {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    display: block !important;
    margin: 0 !important;
}
@media screen and (max-width: 768px) {
    .floating-ad-container .floating-ad, 
    .floating-ad-container .floating-ad-esi {
        width: 110px !important;
    }
}

