/* PG风格样式 —— 仿 pglaohuji.com 深紫金色主题 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
html::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

body {
    background: linear-gradient(90deg, #0a0a2a 0%, #1a0a2e 50%, #2a1a3e 100%);
    color: #fff;
    min-height: 100vh;
    position: relative;
    line-height: 1.5;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-top: 68px;
}
body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* ========== 顶部导航栏 ========== */
.top-navbar {
    width: 100%;
    background: linear-gradient(180deg, #120626 0%, #0a0015 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}
.top-navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(245, 166, 35, 0.3) 15%, rgba(255, 200, 50, 0.9) 50%, rgba(245, 166, 35, 0.3) 85%, transparent 100%);
}
.top-navbar-inner {
    max-width: 1150px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.top-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.top-logo-img {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(255, 200, 50, 0.5));
}

/* 隐藏原有的粒子/网格/光晕装饰 */
#particleCanvas,
.grid-bg,
.glow-orb,
.glow-orb2 {
    display: none !important;
}

.container {
    position: relative;
    z-index: 2;
    max-width: 1150px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* ========== Header ========== */
.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 30px;
    background: linear-gradient(90deg, #3d1845 0%, #250d35 35%, #1f0a30 65%, #301038 100%);
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 200, 50, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}
.glass-header::before {
    display: none;
}

.title-section {
    text-align: left;
}
.title-section h1 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}
.title-section h1::before {
    content: '\1F451';
    font-size: 1.2rem;
    filter: drop-shadow(0 0 4px rgba(255, 200, 50, 0.5));
}
/* 域名橙金色 + 白色流光动画 */
.domain-shimmer {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 600;
    background: linear-gradient(90deg, #f5a623 0%, #f5a623 35%, #ffffff 50%, #f5a623 65%, #f5a623 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: domain-shimmer 5s linear infinite;
    filter: drop-shadow(0 0 6px rgba(245, 166, 35, 0.5)) drop-shadow(0 0 10px rgba(245, 166, 35, 0.25));
}
@keyframes domain-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.subtitle {
    font-size: 1.05rem;
    font-weight: 600;
    background: linear-gradient(90deg, #ffffff 0%, #ffe680 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 4px;
    letter-spacing: 1px;
    line-height: 1.3;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.4));
}
.right-panel {
    display: flex;
    align-items: center;
    gap: 6px;
}
/* 老虎机 777 元素 */
.slot-reel {
    width: 46px;
    height: 54px;
    background: linear-gradient(180deg, #ffe680 0%, #ffd700 35%, #e6b800 70%, #c9960b 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    font-weight: 900;
    color: #5c1a00;
    box-shadow:
        0 0 10px rgba(255, 200, 0, 0.6),
        0 0 20px rgba(255, 170, 0, 0.4),
        0 3px 10px rgba(0, 0, 0, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2),
        inset 2px 0 0 rgba(255, 255, 255, 0.2),
        inset -2px 0 0 rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(180, 130, 0, 0.6);
}

/* 777 依次跳动动画 */
@keyframes slot-jump {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow:
            0 0 10px rgba(255, 200, 0, 0.6),
            0 0 20px rgba(255, 170, 0, 0.4),
            0 3px 10px rgba(0, 0, 0, 0.5),
            inset 0 2px 0 rgba(255, 255, 255, 0.5),
            inset 0 -2px 0 rgba(0, 0, 0, 0.2),
            inset 2px 0 0 rgba(255, 255, 255, 0.2),
            inset -2px 0 0 rgba(0, 0, 0, 0.15);
    }
    8% {
        transform: translateY(-10px) scale(1.08);
        box-shadow:
            0 0 18px rgba(255, 220, 0, 0.9),
            0 0 36px rgba(255, 180, 0, 0.6),
            0 12px 20px rgba(0, 0, 0, 0.4),
            inset 0 2px 0 rgba(255, 255, 255, 0.6),
            inset 0 -2px 0 rgba(0, 0, 0, 0.2),
            inset 2px 0 0 rgba(255, 255, 255, 0.3),
            inset -2px 0 0 rgba(0, 0, 0, 0.15);
    }
    16% {
        transform: translateY(0) scale(1);
    }
}

.right-panel .slot-reel:nth-child(1) {
    animation: slot-jump 6s infinite ease-in-out 2s;
}
.right-panel .slot-reel:nth-child(2) {
    animation: slot-jump 6s infinite ease-in-out 4s;
}
.right-panel .slot-reel:nth-child(3) {
    animation: slot-jump 6s infinite ease-in-out 6s;
}

/* ========== 搜索栏 ========== */
.search-bar {
    display: flex;
    align-items: center;
    background: rgba(20, 8, 40, 0.8);
    border: 1px solid rgba(255, 200, 50, 0.25);
    border-radius: 30px;
    padding: 15px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.search-bar:focus-within {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 16px rgba(255, 180, 0, 0.2);
}
.search-bar i {
    color: rgba(255, 215, 0, 0.7);
    font-size: 1rem;
    margin-right: 10px;
}
.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.95rem;
}
.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ========== 分类标签 ========== */
.category-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 14px;
    margin-bottom: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.category-tabs::-webkit-scrollbar {
    display: none;
}
.tab-btn {
    flex: 0 0 auto;
    padding: 8px 20px;
    background: rgba(30, 12, 55, 0.7);
    border: 1px solid rgba(255, 200, 50, 0.2);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.tab-btn:hover {
    border-color: rgba(255, 215, 0, 0.5);
    color: #ffd700;
}
.tab-btn.active {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #3d1a00;
    border-color: #ffd700;
    box-shadow: 0 0 14px rgba(255, 180, 0, 0.4);
    font-weight: 700;
}
.tab-btn i {
    font-size: 0.85rem;
}

/* ========== 跑马灯 ========== */
.marquee-container {
    background: rgba(30, 12, 55, 0.7);
    border: 1px solid rgba(255, 200, 50, 0.2);
    border-radius: 10px;
    padding: 8px 16px;
    margin-bottom: 20px;
    overflow: hidden;
}
.marquee-text {
    display: inline-block;
    animation: marquee 18s linear infinite;
    font-size: 0.9rem;
    color: #ffd700;
    font-weight: 500;
    white-space: nowrap;
}
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ========== 分类区块 ========== */
.category-section {
    margin-bottom: 2rem;
    display: none;
}
.category-section.active {
    display: block;
}
.category-header {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.category-header::before {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 200, 50, 0.1), rgba(255, 200, 50, 0.6));
}
.category-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 200, 50, 0.6), rgba(255, 200, 50, 0.1));
}
.category-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffd700;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 180, 0, 0.6);
    flex-shrink: 0;
}
.category-count {
    display: inline-block;
    background: rgba(200, 40, 40, 0.45);
    color: #ff4444;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 80, 80, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

/* ========== 游戏卡片网格 ========== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}

.nav-card {
    background: linear-gradient(180deg, rgba(30, 12, 55, 0.9), rgba(18, 6, 38, 0.95));
    border: 1px solid rgba(255, 200, 50, 0.25);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.nav-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 8px 24px rgba(255, 180, 0, 0.3), 0 0 0 1px rgba(255, 215, 0, 0.4), inset 0 0 20px rgba(255, 215, 0, 0.1);
}

/* HOT 标签 */
.hot-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: linear-gradient(135deg, #FF2B00, #FF7F66);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 3px 9px;
    border-radius: 6px;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(201, 160, 220, 0.5);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 正在维护 标签 */
.maintenance-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: linear-gradient(135deg, #A1A1A1, #575757);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.card-icon {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #ffd700;
    background: linear-gradient(135deg, rgba(40, 15, 70, 0.9), rgba(25, 8, 50, 0.95));
    overflow: hidden;
    position: relative;
    padding: 8px 8px 0;
}
.card-icon::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, rgba(18, 6, 38, 0.6));
    pointer-events: none;
    z-index: 1;
}
.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(255, 200, 50, 0.3);
}

.card-info {
    padding: 10px 8px 12px;
    text-align: center;
    flex-shrink: 0;
    background: rgba(18, 6, 38, 0.95);
}
.card-info h3 {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.latency-badge {
    display: inline-block;
    background: rgba(255, 215, 0, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 500;
    color: #ffd700;
    margin-top: 4px;
    white-space: nowrap;
}

/* 空状态 */
.empty-state {
    background: rgba(30, 12, 55, 0.7);
    border-radius: 16px;
    padding: 3rem 1rem;
    text-align: center;
    border: 1px dashed rgba(255, 200, 50, 0.3);
    color: rgba(255, 255, 255, 0.6);
}

/* ========== Footer ========== */
.glass-footer {
    margin-top: 3rem;
    text-align: center;
    padding: 1.2rem;
    background: rgba(20, 8, 40, 0.7);
    border-radius: 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 200, 50, 0.15);
}
.glass-footer a {
    color: rgba(255, 215, 0, 0.7);
    text-decoration: none;
}

/* ========== 弹窗 ========== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.popup-container {
    background: linear-gradient(135deg, #1e0c37, #120626);
    border: 1px solid rgba(255, 200, 50, 0.3);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    padding: 24px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    color: #fff;
}
.popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 22px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
}
.popup-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* ========== iframe 弹窗 ========== */
.iframe-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    flex-direction: column;
}
.iframe-header {
    background: linear-gradient(90deg, #1e0c37, #120626);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffd700;
    font-weight: bold;
    font-size: 17px;
    border-bottom: 1px solid rgba(255, 200, 50, 0.3);
}
.iframe-close {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: none;
    color: #3d1a00;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.iframe-wrapper {
    flex: 1;
    width: 100%;
    height: calc(100% - 60px);
}
.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ========== iframe弹窗底部滚动公告 ========== */
.iframe-overlay.has-bottom-marquee .iframe-wrapper {
    height: calc(100% - 60px - 38px);
}
.iframe-bottom-marquee {
    height: 38px;
    line-height: 38px;
    background: linear-gradient(90deg, #1e0c37, #120626);
    border-top: 1px solid rgba(255, 200, 50, 0.3);
    overflow: hidden;
    padding: 0 16px;
    flex-shrink: 0;
}
.iframe-bottom-marquee-inner {
    display: inline-block;
    white-space: nowrap;
    font-size: 0.88rem;
    color: #ffd700;
    font-weight: 500;
    padding-left: 100%;
    animation: iframe-marquee-scroll 20s linear forwards;
}
.iframe-bottom-marquee-inner.loop {
    animation-iteration-count: infinite;
}
.iframe-bottom-marquee-inner.bold {
    font-weight: 700;
}
@keyframes iframe-marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* 搜索无结果隐藏 */
.nav-card.search-hidden {
    display: none;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 12px 10px 30px;
    }
    .glass-header {
        padding: 16px 16px;
        border-radius: 12px;
    }
    .title-section h1 {
        font-size: 1.35rem;
    }
    .title-section h1::before {
        font-size: 1.15rem;
    }
    .subtitle {
        font-size: 1.05rem;
        margin-top: 4px;
    }
    .right-panel {
        gap: 5px;
    }
    .slot-reel {
        width: 38px;
        height: 44px;
        font-size: 1.2rem;
    }
    .search-bar {
        padding: 8px 16px;
        margin-bottom: 18px;
    }
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .nav-card {
        border-radius: 10px;
    }
    .card-info {
        padding: 6px 4px 8px;
    }
    .card-info h3 {
        font-size: 0.72rem;
    }
    .hot-badge {
        font-size: 0.6rem;
        padding: 2px 6px;
        top: 6px;
        left: 6px;
    }
    .category-name {
        font-size: 1.15rem;
    }
    .category-header {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .category-header::before,
    .category-header::after {
        content: '';
        flex: 1;
        height: 2px;
    }
    .category-header::before {
        background: linear-gradient(90deg, transparent, rgba(255, 200, 50, 0.6));
    }
    .category-header::after {
        background: linear-gradient(90deg, rgba(255, 200, 50, 0.6), transparent);
    }
    .tab-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .glass-header {
        padding: 12px 12px;
    }
    .title-section h1 {
        font-size: 1.1rem;
        gap: 5px;
    }
    .title-section h1::before {
        font-size: 1rem;
    }
    .subtitle {
        font-size: 0.85rem;
        letter-spacing: 0.5px;
        margin-top: 3px;
    }
    .right-panel {
        gap: 4px;
        flex-shrink: 0;
    }
    .slot-reel {
        width: 30px;
        height: 36px;
        font-size: 0.95rem;
        border-radius: 6px;
    }
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}
