* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 加载遮罩层样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
    opacity: 0;
}

.loading-overlay:not(.hidden) {
    pointer-events: auto;
    opacity: 1;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(230, 162, 60, 0.2);
    border-top-color: #e6a23c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #e6a23c;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 【性能优化】GPU 加速 */
.game-card,
.game-image,
.game-overlay,
.play-btn,
.launch-btn {
    will-change: transform, opacity;
}

.game-card {
    will-change: auto; /* 移除 will-change，让浏览器自动优化 */
}

.logo-text {
    font-size: 28px;
    font-weight: 400;
    color: #e6a23c;
    margin-right: 8px;
    white-space: nowrap;
    font-style: italic;
}
.logo-text span{
    font-size: 35px;
    font-weight: 800;
    color: #fff;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background-color: #0a0a0a;
    color: #fff;
    min-height: 100vh;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: #1a1a1a;
    border-radius: 9999px;
    padding: 10px 16px;
}

.search-icon {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    margin-right: 12px;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 16px;
}

.search-input::placeholder {
    color: #6b7280;
}

.search-btn {
    color: #e6a23c;
    font-weight: 500;
    margin-left: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s;
    white-space: nowrap;
}

.search-btn:hover {
    color: #f0b856;
}

.service-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #e6a23c;
    color: #000;
    padding: 8px 12px;
    border-radius: 9999px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}

.service-btn:hover {
    background-color: #f0b856;
}

.service-btn svg {
    width: 16px;
    height: 16px;
}

/* Features Bar */
.features-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
}

.feature-item svg {
    width: 18px;
    height: 18px;
    color: #9ca3af;
}

.feature-divider {
    width: 1px;
    height: 14px;
    background-color: rgba(255, 255, 255, 0.2);
}

@media (min-width: 768px) {
    .service-btn {
        padding: 10px 16px;
        font-size: 16px;
    }
    .service-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 768px) {
    .features-bar {
        display: none; /* Hidden by default on tablet/mobile unless we specify */
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 12px 8px;
        gap: 8px;
        flex-wrap: wrap; /* Allow wrapping for mobile layout */
    }
    .logo-text {
        font-size: 18px;
        order: -2; /* Top row */
        flex: 1; /* Take up available space to push service button */
    }
    .logo-text span{
        font-size: 28px;
    }
    .features-bar {
        display: flex;
        width: 100%;
        order: 0; /* Bottom row */
        justify-content: space-between;
        margin: 0;
        gap: 4px;
        margin-top: 10px;
    }
    .feature-item {
        font-size: 12px;
        gap: 4px;
    }
    .feature-item svg {
        width: 14px;
        height: 14px;
    }
    .search-box {
        padding: 8px 12px;
        order: -1; /* Middle row */
        width: 100%; /* Full width on new line */
        margin-top: 0;
    }
    .search-icon {
        margin-right: 8px;
    }
    .search-btn {
        margin-left: 8px;
    }
    .service-btn {
        padding: 8px;
        order: -2; /* Top row */
        width: auto;
    }
    .search-input {
        min-width: 0;
    }


    /* Mobile Game Card Fix */
    /* Removed block display for launch-btn to keep it inline with category */
}

/* 【新增】超小屏幕适配（320px - 375px）*/
@media (max-width: 375px) {
    .header-content {
        padding: 10px 6px;
        gap: 6px;
    }

    .logo-text {
        font-size: 16px;
    }

    .logo-text span {
        font-size: 24px;
    }

    .logo-url {
        font-size: 12px !important;
    }

    .search-box {
        padding: 6px 10px;
    }

    .search-icon {
        width: 16px;
        height: 16px;
        margin-right: 6px;
    }

    .search-input {
        font-size: 14px;
    }

    .search-btn {
        font-size: 14px;
        margin-left: 6px;
    }

    .service-btn {
        padding: 6px 8px;
        font-size: 12px;
        gap: 4px;
    }

    .service-btn svg {
        width: 14px;
        height: 14px;
    }

    .feature-item {
        font-size: 11px;
        gap: 3px;
    }

    .feature-item svg {
        width: 12px;
        height: 12px;
    }

    .feature-divider {
        height: 12px;
    }

    /* 调整功能特性文字在超小屏幕上的显示 */
    .features-bar {
        gap: 3px;
    }
}

/* 【新增】极小屏幕适配（320px）*/
@media (max-width: 320px) {
    .header-content {
        padding: 8px 4px;
        gap: 4px;
    }

    .logo-text {
        font-size: 14px;
    }

    .logo-text span {
        font-size: 20px;
    }

    .logo-url {
        display: none; /* 隐藏 URL 以节省空间 */
    }

    .search-box {
        padding: 6px 8px;
    }

    .search-icon {
        width: 14px;
        height: 14px;
        margin-right: 4px;
    }

    .search-input {
        font-size: 13px;
    }

    .search-input::placeholder {
        font-size: 12px;
    }

    .search-btn {
        font-size: 13px;
        margin-left: 4px;
    }

    .service-btn {
        padding: 5px 6px;
        font-size: 11px;
        gap: 3px;
    }

    .service-btn svg {
        width: 12px;
        height: 12px;
    }

    .feature-item {
        font-size: 10px;
        gap: 2px;
    }

    .feature-item svg {
        width: 11px;
        height: 11px;
    }

    .feature-divider {
        height: 10px;
    }
}

/* Main Content */
.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 16px;
    overflow-x: auto; /* Allow horizontal scrolling if needed */
    white-space: nowrap; /* Prevent wrapping */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
}

.tabs::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.tab-btn {
    font-size: 18px;
    font-weight: 500;
    padding-bottom: 8px;
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
    flex-shrink: 0; /* Prevent buttons from shrinking */
}

@media (max-width: 480px) {
    .tabs {
        justify-content: flex-start; /* Align to start for scrolling */
        gap: 20px;
        padding: 0 16px; /* Add padding for better touch/scroll experience */
    }
    .tab-btn {
        font-size: 16px; /* Slightly smaller font on mobile */
    }
}

.tab-btn:hover {
    color: #d1d5db;
}

.tab-btn.active {
    color: #e6a23c;
}

.tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 2px;
    background-color: #e6a23c;
    border-radius: 9999px;
}

/* Categories */
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 16px;
}

.category-btn {
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    background-color: #1a1a1a;
    color: #d1d5db;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.category-btn:hover {
    background-color: #252525;
}

.category-btn.active {
    background-color: #e6a23c;
    color: #000;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

@media (min-width: 640px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Game Card */
.game-card {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    background-color: #000; /* 【保持】卡片背景纯黑色 */
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.game-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.game-image-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #000; /* 【保持】容器背景纯黑色 */
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top center;
    transition: all 0.3s;
    background-color: #000; /* 【保持】图片背景纯黑色 */
    display: block;
}

.game-card:hover .game-image {
    transform: scale(1.1);
    filter: brightness(0.5);
}

.game-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.play-btn {
    background-color: #e6a23c;
    color: #000;
    padding: 10px 24px;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s;
}

.play-btn:hover {
    background-color: #f0b856;
}

.game-info {
    padding: 5px;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px;
}

.game-meta {
    min-width: 0;
}

.game-title {
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    line-height: 1.4;
}

.game-category {
    font-size: 12px;
    color: #9ca3af;
    margin-top:0px;
}

.launch-btn {
    background-color: #e6a23c;
    color: #000;
    padding: 2px 15px;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 11px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;

    /* Reset block styles */
    display: inline-block;
    width: auto;
    text-align: center;
}

.launch-btn:hover {
    background-color: #f0b856;
}

.game-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
}

/* Sticky Header Group */
.sticky-header-group {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
}

/* Reset header sticky */
.header {
    position: relative;
    top: auto;
    z-index: auto;
    background-color: transparent;
    backdrop-filter: none;
    border-bottom: none;
}

.tabs-bar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0;
}

.tabs-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

.tabs {
    margin-bottom: 0; /* Remove bottom margin */
}

/* Back to Top */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background-color: #e6a23c;
    color: #000;
    border-radius: 50%;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: all 0.3s;
}
#backToTop:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.6);
}
#backToTop svg {
    width: 24px;
    height: 24px;
}

@media (min-width: 768px) {
    .game-title {
        font-size: 16px;
    }
    .game-category {
        font-size: 14px;
    }
    .launch-btn {
        padding: 4px 30px;
        font-size: 12px;
    }

}

/* Download Section */
.download-section {
    text-align: center;
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
    color: #fff;
}

.download-header {
    margin-bottom: 40px;
}

.slogan-main {
    font-size: 24px;
    font-weight: normal;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: #fff;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .slogan-main {
        flex-wrap: wrap;
        white-space: normal;
    }
}

.device-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.device-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 16px;
    color: #a1a1aa;
}

.device-tag svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    flex-shrink: 0; /* 【新增】防止图标被压缩 */
    min-width: 24px; /* 【新增】确保最小宽度 */
    min-height: 24px; /* 【新增】确保最小高度 */
}

.slogan-sub {
    font-size: 32px;
    font-weight: bold;
    color: #fff;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.dl-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.dl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.dl-btn.android,
.dl-btn.mac,
.dl-btn.win {
    background: transparent;
    border: 1px solid #e6a23c;
    color: #e6a23c;
}

.dl-btn.android:hover,
.dl-btn.mac:hover,
.dl-btn.win:hover,
.dl-btn.ios:hover {
    background-color: #e6a23c;
    color: #000;
    box-shadow: 0 0 15px rgba(230, 162, 60, 0.3);
}

.dl-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #e6a23c;
    color: #000;
    font-size: 12px;
    padding: 4px 12px;
    border-bottom-right-radius: 12px;
    font-weight: bold;
}

/* Modal & Footer & Mobile Fixes */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 16px;
    position: relative;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 90%;
    width: 320px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.1);
}

.qr-container {
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: inline-block;
}

.qr-img {
    width: 100%;

    display: block;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.footer {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 40px;
    background-color: #0a0a0a;
}

/* Hide game overlay */
.game-overlay {
    display: none !important;
}

/* iOS Button */
.dl-btn.ios {
    background: transparent;
    border: 1px solid #e6a23c;
    color: #e6a23c;
}

/* 加载更多按钮样式 */
.load-more-btn {
  padding: 12px 32px;
  background: linear-gradient(135deg, #e6a23c 0%, #f0b856 100%);
  color: #000;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(230, 162, 60, 0.3);
}

.load-more-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(230, 162, 60, 0.4);
}

.load-more-btn:active:not(:disabled) {
  transform: translateY(0);
}

.load-more-btn:disabled {
  background: #cccccc;
  color: #666666;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.no-more-games p {
  font-size: 14px;
  color: #999;
  padding: 20px;
}

@media (max-width: 768px) {
    /* Mobile Categories Grid Fix - Enforced */
    .categories {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 8px !important;
        justify-content: start !important;
    }
    .category-btn {
        width: 100% !important;
        text-align: center;
        padding: 6px 4px;
        min-width: 0;
        font-size: 13px;
        margin: 0 !important;
    }
}

/* 骨架屏样式 */
.game-card-skeleton{background:#1a1a1a;border-radius:8px;overflow:hidden;margin-bottom:16px}
.skeleton-image{height:200px;background:linear-gradient(90deg,#2a2a2a 25%,#333 50%,#2a2a2a 75%);background-size:200% 100%;animation:shimmer 1.5s infinite}
.skeleton-title{height:20px;margin:12px;background:linear-gradient(90deg,#2a2a2a 25%,#333 50%,#2a2a2a 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:4px}
.skeleton-meta{height:16px;margin:0 12px 12px;background:linear-gradient(90deg,#2a2a2a 25%,#333 50%,#2a2a2a 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:4px;width:60%}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* 游戏图片懒加载占位 */
.game-image{background:#1a1a1a;min-height:150px;transition:opacity 0.3s}
.game-image.loaded{background:none;opacity:1}
.download-section{display:none!important}

/* 性能优化 */
.header,.tabs-bar,.categories,.game-grid{will-change:auto}
.loading-overlay{pointer-events:none;opacity:0;transition:opacity 0.3s}
.loading-overlay:not(.hidden){pointer-events:auto;opacity:1}

/* 渐进式图片 */
.game-image-wrapper{position:relative;overflow:hidden}
.game-image-placeholder{position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(135deg,#2a2a2a 0%,#1a1a1a 100%)}

/* Logo 网址动画效果 */
@keyframes glow {
    0%, 100% {
        color: #e6a23c;
        text-shadow: 0 0 5px rgba(230, 162, 60, 0.3);
    }
    50% {
        color: #ffc107;
        text-shadow: 0 0 15px rgba(255, 193, 7, 0.6), 0 0 20px rgba(230, 162, 60, 0.4);
    }
}

.logo-url {
    transition: all 0.3s ease;
    cursor: pointer;
}

.logo-url:hover {
    color: #ffc107 !important;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
    transform: scale(1.02);
}

/* ========== 大转盘抽奖浮动层样式 ========== */
.lucky-draw-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: all 0.3s ease;
}

.lucky-draw-modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.lucky-draw-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
    border-radius: 24px;
    border: 2px solid rgba(230, 162, 60, 0.3);
    box-shadow: 0 0 60px rgba(230, 162, 60, 0.3), inset 0 0 30px rgba(230, 162, 60, 0.1);
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 【新增】移动端大转盘弹窗适配 */
@media (max-width: 480px) {
    .lucky-draw-modal {
        width: 95%;
        max-height: 95vh;
        border-radius: 16px;
    }

    .lucky-draw-header {
        padding: 16px 12px 12px;
    }

    .lucky-draw-title {
        font-size: 22px;
        letter-spacing: 1px;
    }

    .lucky-draw-content {
        padding: 16px;
        gap: 24px;
    }

    .wheel-wrapper {
        width: 240px;
        height: 240px;
    }

    .wheel-pointer {
        top: -24px;
        width: 32px;
        height: 40px;
    }

    .wheel-pointer::before {
        border-left: 16px solid transparent;
        border-right: 16px solid transparent;
        border-top: 32px solid #e6a23c;
    }

    .spin-button {
        padding: 14px 36px;
        font-size: 18px;
    }

    .prizes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .prize-item {
        padding: 10px;
    }

    .prize-icon {
        font-size: 20px;
    }

    .prize-name {
        font-size: 13px;
    }

    .prize-probability {
        font-size: 11px;
    }
}

/* 【新增】超小屏幕大转盘弹窗适配（375px）*/
@media (max-width: 375px) {
    .lucky-draw-modal {
        width: 98%;
        border-radius: 12px;
    }

    .lucky-draw-header {
        padding: 12px 10px 10px;
    }

    .lucky-draw-title {
        font-size: 20px;
    }

    .lucky-draw-content {
        padding: 12px;
        gap: 20px;
    }

    .wheel-wrapper {
        width: 200px;
        height: 200px;
    }

    .wheel-pointer {
        top: -20px;
        width: 28px;
        height: 36px;
    }

    .wheel-pointer::before {
        border-left: 14px solid transparent;
        border-right: 14px solid transparent;
        border-top: 28px solid #e6a23c;
    }

    .spin-button {
        padding: 12px 32px;
        font-size: 16px;
    }

    .prizes-info {
        padding: 12px;
    }

    .prizes-title {
        font-size: 16px;
    }
}

/* 【新增】极小屏幕大转盘弹窗适配（320px）*/
@media (max-width: 320px) {
    .lucky-draw-modal {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }

    .lucky-draw-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }

    .lucky-draw-header {
        padding: 10px 8px 8px;
    }

    .lucky-draw-title {
        font-size: 18px;
    }

    .lucky-draw-content {
        padding: 10px;
        gap: 16px;
    }

    .wheel-wrapper {
        width: 180px;
        height: 180px;
    }

    .wheel-pointer {
        top: -18px;
        width: 24px;
        height: 32px;
    }

    .wheel-pointer::before {
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
        border-top: 24px solid #e6a23c;
    }

    .spin-button {
        padding: 10px 28px;
        font-size: 14px;
    }

    .prizes-grid {
        gap: 8px;
    }

    .prize-item {
        padding: 8px;
    }

    .prize-icon {
        font-size: 18px;
    }

    .prize-name {
        font-size: 12px;
    }

    .prize-probability {
        font-size: 10px;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.lucky-draw-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.lucky-draw-close:hover {
    background: rgba(230, 162, 60, 0.3);
    transform: rotate(90deg);
}

.lucky-draw-header {
    text-align: center;
    padding: 24px 20px 16px;
}

.lucky-draw-title {
    font-size: 28px;
    font-weight: 700;
    color: #e6a23c;
    text-shadow: 0 0 20px rgba(230, 162, 60, 0.5);
    margin: 0;
    letter-spacing: 2px;
    animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(230, 162, 60, 0.5);
    }
    50% {
        text-shadow: 0 0 30px rgba(230, 162, 60, 0.8), 0 0 40px rgba(230, 162, 60, 0.4);
    }
}

.lucky-draw-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

@media (min-width: 768px) {
    .lucky-draw-content {
        flex-direction: row;
        align-items: flex-start;
    }
}

.wheel-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    position: relative;
}

.wheel-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .wheel-wrapper {
        width: 400px;
        height: 400px;
    }
}

/* 【关键修复】移动端 Canvas 自适应尺寸 */
@media (max-width: 480px) {
    .wheel-wrapper {
        width: 240px;
        height: 240px;
    }

    #wheelCanvas {
        width: 100% !important;
        height: 100% !important;
        max-width: 240px;
        max-height: 240px;
    }
}

@media (max-width: 375px) {
    .wheel-wrapper {
        width: 200px;
        height: 200px;
    }

    #wheelCanvas {
        width: 100% !important;
        height: 100% !important;
        max-width: 200px;
        max-height: 200px;
    }
}

@media (max-width: 320px) {
    .wheel-wrapper {
        width: 180px;
        height: 180px;
    }

    #wheelCanvas {
        width: 100% !important;
        height: 100% !important;
        max-width: 180px;
        max-height: 180px;
    }
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(230, 162, 60, 0.4), inset 0 0 20px rgba(230, 162, 60, 0.2);
    display: block;
}

.wheel-pointer {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 50px;
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

.wheel-pointer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #e6a23c;
    filter: drop-shadow(0 2px 4px rgba(230, 162, 60, 0.5));
}

.spin-button {
    background: linear-gradient(135deg, #e6a23c 0%, #f0b856 100%);
    border: none;
    border-radius: 50px;
    padding: 16px 48px;
    font-size: 20px;
    font-weight: 700;
    color: #000;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(230, 162, 60, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.spin-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
}

.spin-button:hover::before {
    left: 100%;
}

.spin-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(230, 162, 60, 0.6);
}

.spin-button:active {
    transform: translateY(0);
}

.spin-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.prizes-info {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(230, 162, 60, 0.2);
    display: none;
}

/* 中奖结果弹窗 */
.prize-result-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.3s ease;
}

.prize-result-modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.prize-result-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1e 100%);
    border-radius: 24px;
    border: 2px solid rgba(230, 162, 60, 0.5);
    box-shadow: 0 0 80px rgba(230, 162, 60, 0.5);
    max-width: 400px;
    width: 90%;
    padding: 40px 20px;
    text-align: center;
    animation: resultModalPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes resultModalPop {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.result-icon {
    font-size: 80px;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.result-title {
    font-size: 32px;
    font-weight: 700;
    color: #e6a23c;
    text-shadow: 0 0 20px rgba(230, 162, 60, 0.5);
    margin: 0;
}

.result-prize-name {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 8px 0;
    padding: 12px 24px;
    background: rgba(230, 162, 60, 0.2);
    border-radius: 12px;
    border: 2px solid #e6a23c;
}

.result-message {
    font-size: 16px;
    color: #d1d5db;
    margin: 8px 0;
}

.result-button {
    background: linear-gradient(135deg, #e6a23c 0%, #f0b856 100%);
    border: none;
    border-radius: 50px;
    padding: 14px 40px;
    font-size: 18px;
    font-weight: 700;
    color: #000;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(230, 162, 60, 0.4);
    margin-top: 16px;
}

.result-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(230, 162, 60, 0.6);
}

.result-button:active {
    transform: translateY(0);
}

/* 【新增】移动端中奖结果弹窗适配 */
@media (max-width: 480px) {
    .prize-result-modal {
        width: 90%;
        padding: 32px 16px;
        border-radius: 20px;
    }

    .result-icon {
        font-size: 64px;
    }

    .result-title {
        font-size: 28px;
    }

    .result-prize-name {
        font-size: 20px;
        padding: 10px 20px;
    }

    .result-message {
        font-size: 14px;
    }

    .result-button {
        padding: 12px 32px;
        font-size: 16px;
    }
}

/* 【新增】超小屏幕中奖结果弹窗适配（375px）*/
@media (max-width: 375px) {
    .prize-result-modal {
        width: 95%;
        padding: 28px 14px;
        border-radius: 16px;
    }

    .result-icon {
        font-size: 56px;
    }

    .result-title {
        font-size: 24px;
    }

    .result-prize-name {
        font-size: 18px;
        padding: 8px 16px;
    }

    .result-message {
        font-size: 13px;
    }

    .result-button {
        padding: 10px 28px;
        font-size: 14px;
    }
}

/* 【新增】极小屏幕中奖结果弹窗适配（320px）*/
@media (max-width: 320px) {
    .prize-result-modal {
        width: 98%;
        padding: 24px 12px;
        border-radius: 12px;
    }

    .result-icon {
        font-size: 48px;
    }

    .result-title {
        font-size: 22px;
    }

    .result-prize-name {
        font-size: 16px;
        padding: 6px 14px;
    }

    .result-message {
        font-size: 12px;
    }

    .result-button {
        padding: 10px 24px;
        font-size: 14px;
    }
}

/* 滚动动画 */
.wheel-spinning {
    animation: wheelShake 0.5s ease-in-out infinite;
}

@keyframes wheelShake {
    0%, 100% {
        transform: rotate(-2deg);
    }
    50% {
        transform: rotate(2deg);
    }
}

/* 礼花效果 */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #e6a23c;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    from {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}
