@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #1a0b2e;
    /* Deep Purple */
    --bg-card: rgba(43, 20, 62, 0.7);
    /* Glassy Purple */
    --bg-card-hover: rgba(58, 27, 85, 0.85);
    --text-primary: #FFD700;
    /* Gold text */
    --text-secondary: #e0d6ff;
    /* Light purple-white */
    --border-gold: rgba(255, 215, 0, 0.4);
    --glow-gold: 0 0 15px rgba(255, 215, 0, 0.3);
}

body {
    background-color: var(--bg-primary);
    background-image: url('../images/bg.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: var(--text-secondary);
    font-family: 'Noto Sans Thai', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    /* Protection: Prevent text selection and images dragging */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

img {
    -webkit-user-drag: none;
    user-drag: none;
}

/* Container */
.container {
    max-width: 1200px;
}



/* Header */
.main-header {
    position: relative;
    padding: 15px 0;
    /* 增加间距以容纳更大的 Logo */
    overflow: hidden;
}

.header-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.header-v-pc,
.header-v-m {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Video covers the whole area */
}

.main-header .container {
    position: relative;
    z-index: 1;
}

.main-logo {
    height: 120px;
    /* 从 50px 调大到 120px */
    filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.7));
    transition: transform 0.3s;
}

.main-logo:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .main-logo {
        height: 60px;
        /* 手机端也同步调大 */
    }

    .main-header {
        padding: 8px 0;
    }
}

/* Section Titles */
.section-title {
    color: var(--text-primary);
    position: relative;
    display: inline-block;
    padding-bottom: 0;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid var(--border-gold);
}

/* Nav Cards */
.nav-card {
    background: linear-gradient(145deg, rgba(40, 20, 60, 0.8), rgba(20, 10, 30, 0.9));
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    /* Smooth corners */
    padding: 24px;
    /* More breathing room */
    height: 100%;
    min-height: 130px;
    /* Reduced from 160px for more compact look */
    transition: all 0.3s ease;
    /* Bouncy transition */
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Shine Effect */
.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}

.nav-card:hover::before {
    left: 100%;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 215, 0, 0.4);
    border-color: #ffd700;
    /* Golden border */
    background: linear-gradient(145deg, rgba(50, 30, 80, 0.9), rgba(30, 10, 40, 0.95));
}

/* Card Header Layout */
.card-head {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    /* Boosted spacing significantly */
}

/* Larger, cleaner Logo */
.site-logo {
    width: 56px;
    height: 56px;
    margin-right: 15px;
    border-radius: 50%;
    /* Circular */
    border: 2px solid rgba(255, 215, 0, 0.2);
    padding: 2px;
    transition: transform 0.3s;
    background: rgba(0, 0, 0, 0.2);
}

.nav-card:hover .site-logo {
    transform: rotate(360deg);
    /* Playful spin */
    border-color: #FFD700;
}

.site-info {
    overflow: hidden;
}

.site-name {
    color: #fff;
    margin-bottom: 4px;
    font-size: 18px;
    /* Larger Title */
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-url {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.5px;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.speed-badge {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.speed-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FFD700;
    box-shadow: 0 0 8px currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

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

    100% {
        opacity: 0.6;
    }
}

.btn-visit {
    background: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);
    border: none;
    padding: 6px 20px;
    border-radius: 20px;
    color: #2e003e;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

.btn-visit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.5);
    filter: brightness(1.1);
}

/* Activity Cards */
.activity-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.activity-card:hover {
    border-color: var(--text-primary);
    transform: translateY(-5px);
    box-shadow: var(--glow-gold);
}

.act-img-wrapper {
    aspect-ratio: 2 / 1;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.act-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.activity-card:hover .act-img {
    transform: scale(1.1);
}

.act-body {
    padding: 20px;
}

.act-title {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 700;
}

.act-desc {
    font-size: 14px;
    color: #dcdcdc;
    margin: 0;
    line-height: 1.6;
}

/* Navigation and Floating Sidebar */
.floating-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(20, 10, 40, 0.9);
    border: 2px solid var(--border-gold);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.sidebar-item i {
    font-size: 24px;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.sidebar-item:hover {
    background: var(--text-primary);
    color: #2e003e;
    transform: scale(1.1) translateX(-5px);
    border-color: #fff;
}

/* Footer */
.main-footer {
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #8878aa;
    font-size: 13px;
    background: rgba(10, 5, 20, 0.95);
    backdrop-filter: blur(10px);
}

/* Responsive */
@media (max-width: 768px) {
    .floating-sidebar {
        flex-direction: row;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        background: rgba(20, 10, 40, 0.98);
        padding: 8px 15px;
        gap: 12px;
        justify-content: space-between;
        border-top: 2px solid var(--text-primary);
        border-radius: 15px 15px 0 0;
    }

    .sidebar-item {
        width: auto;
        flex: 1;
        height: 54px;
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }

    .sidebar-item:hover {
        transform: none;
        background: transparent;
        color: #fff;
    }

    body {
        padding-bottom: 80px;
    }

    /* Space for navbar */
    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    /* Mobile - Stack Winners better */
    .winner-wrapper {
        margin-top: 10px;
    }

    /* Selected Websites Mobile Optimization */
    .nav-card {
        padding: 10px;
        /* Compact Padding */
        min-height: auto;
    }

    .card-head {
        margin-bottom: 8px;
        align-items: center;
    }

    .site-logo {
        width: 32px;
        /* Smaller Logo */
        height: 32px;
        margin-right: 8px;
        border-radius: 8px;
        border-width: 1px;
        /* Thinner border */
    }

    .site-info {
        min-width: 0;
        /* Allow flex child to shrink/truncate */
        flex: 1;
    }

    .site-name {
        font-size: 13px;
        white-space: nowrap;
        /* Prevent Wrap "主线\n路" */
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 2px;
    }

    .site-url {
        font-size: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        opacity: 0.8;
    }

    .card-actions {
        padding: 4px 6px;
        /* Tight padding */
        flex-direction: row;
        /* Side by side */
        justify-content: space-between;
        gap: 4px;
        background: rgba(0, 0, 0, 0.2);
    }

    .speed-badge {
        font-size: 10px;
        white-space: nowrap;
        /* Prevent wrapping */
    }

    .btn-visit {
        width: auto;
        /* Let content determine width */
        padding: 3px 10px;
        font-size: 12px;
        white-space: nowrap;
        /* Prevent "进\n入" */
        min-width: 40px;
        border-radius: 12px;
        height: auto;
        line-height: normal;
    }

    /* Activity Card Mobile Optimization */
    .activity-card {
        border-radius: 12px;
    }



    .act-body {
        padding: 15px;
    }

    .act-title {
        font-size: 16px;
        /* Reduce from 18px */
        margin-bottom: 5px;
    }

    .act-desc {
        font-size: 12px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        /* Limit to 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Reduce Header Whitespace */
    .main-header {
        padding: 15px 0 3px 0;
        /* Huge reduction from 30px */
    }

    /* Force Vertical Center */
    .main-header .container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .main-logo {
        height: 60px;
        /* Huge reduction from 90px */
    }


    /* Reduce vertical gaps between sections */
    .container.my-4,
    .container.my-5 {
        margin-top: 1rem !important;
        margin-bottom: 2rem !important;
    }
}

/* Jackpot Section */
.jackpot-banner {
    background: linear-gradient(135deg, #4b0082 0%, #1a0b2e 100%);
    border-radius: 20px;
    border: 3px solid #ff00ff;
    padding: 25px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(255, 0, 255, 0.4);
    min-height: 180px;
    margin-bottom: 20px;
}

.jackpot-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotateBg 20s linear infinite;
    pointer-events: none;
}

@keyframes rotateBg {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.jackpot-bunny {
    flex: 0 0 150px;
    margin-right: 30px;
    z-index: 2;
}

.jackpot-bunny img {
    width: 100%;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    transform: scale(1.3);
    animation: bounceBunny 2s ease-in-out infinite;
}

@keyframes bounceBunny {

    0%,
    100% {
        transform: scale(1.3) translateY(0);
    }

    50% {
        transform: scale(1.3) translateY(-10px);
    }
}

.jackpot-content {
    flex: 1;
    text-align: center;
    z-index: 2;
}

.jackpot-title {
    font-size: 64px;
    font-weight: 900;
    font-style: italic;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 5px;
    background: linear-gradient(to bottom, #fff 0%, #ff85b3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
    line-height: 1;
}

.jackpot-digits {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.digit-box {
    background: #ff85b3;
    color: #fff;
    font-size: 52px;
    font-weight: bold;
    width: 65px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3), 0 8px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 5px solid #cc6a8f;
}

.digit-comma {
    font-size: 42px;
    font-weight: bold;
    color: #ff85b3;
    align-self: flex-end;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 133, 179, 0.6);
}

@media (max-width: 768px) {
    .jackpot-banner {
        flex-direction: column;
        padding: 15px 8px;
        min-height: auto;
    }

    .jackpot-bunny {
        margin-right: 0;
        margin-bottom: 15px;
        flex: 0 0 120px;
    }

    .jackpot-title {
        font-size: 36px;
        margin-bottom: 15px;
    }

    .jackpot-digits {
        gap: 2px;
        width: 100%;
        justify-content: center;
        padding: 0;
    }

    .digit-box {
        width: 22px;
        height: 36px;
        font-size: 16px;
        border-radius: 4px;
        border-bottom-width: 2px;
    }

    .digit-comma {
        font-size: 16px;
        margin-bottom: 2px;
    }
}

/* Hot Games Section */
.hot-games-section {
    position: relative;
    z-index: 10;
}

.hot-games-label-img {
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 212, 0, 0.4));
}

@media (max-width: 768px) {
    .hot-games-label-img {
        height: 35px;
    }
}

.hot-games-title-tag {
    background: rgba(43, 20, 62, 0.9);
    /* Dark Purple to match theme */
    color: var(--text-primary);
    /* Golden Font */
    padding: 8px 30px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    display: inline-block;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-left: 4px solid var(--text-primary);
    /* Gold accent on the left */
}

.hot-game-card {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    background: #1a0b2e;
}

.hot-game-card:hover {
    transform: translateY(-5px) scale(1.05);
    /* Slightly larger zoom */
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.9), inset 0 0 10px rgba(255, 215, 0, 0.5);
    outline: 4px solid #ffd700;
    /* Thicker golden border */
    outline-offset: -4px;
    z-index: 10;
}

.hot-game-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
}

.hot-tag {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #f44336;
    /* Red Hot Tag */
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .hot-games-title-tag {
        font-size: 0.9rem;
        padding: 4px 15px;
    }

    .hot-tag {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }

    .hot-game-card {
        border-radius: 8px;
    }
}