/* ===== Design System Variables ===== */
:root {
    /* Colors - Primary */
    --primary-color: #f60;
    --primary-hover: #ff7b1a;
    --primary-light: #fff3e6;
    
    /* Colors - Semantic */
    --color-success: #4caf50;
    --color-success-light: #e8f5e9;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;
    
    /* Colors - Neutral */
    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Layout */
    --mobile-padding: 1rem;
    --max-width: 1000px;
    --header-height: 70px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: var(--font-sans);
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
}

/* ===== Global Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: var(--line-height-normal);
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
}


.game-preview {
    position: relative;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem var(--mobile-padding);
    padding-top: calc(1rem);
}

.game-preview iframe {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 0.5rem;
    background: #000;
}

.detail-thumbnail-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0px 7px 10px 4px #5d6b844d;
    transition: box-shadow 0.3s ease;
    aspect-ratio: 1/1;
}

.detail-thumbnail-container::before {
    content: "";
    display: block;
    padding-top: 100%;
}

.detail-thumbnail-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 3;
    text-align: center;
}

.detail-thumbnail-header h1 {
    font-size: 1.5rem;
    color: white;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 100%;
}

.detail-thumbnail-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 3;
}

.detail-game-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.meta {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.meta-item:hover {
    background: rgba(0, 0, 0, 0.7);
}

.meta-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.meta-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
}

.rating .meta-value {
    color: var(--primary-color);
}

.plays .meta-value {
    color: #4caf50;
}

.play-now-btn {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    width: fit-content;
    height: fit-content;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 2rem;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 4;
    white-space: nowrap;
    opacity: 1;
    text-align: center;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

.play-now-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: #ff7b1a;
}

/* ===== Game Cards Grid Section ===== */
.games-section {
    max-width: var(--max-width);
    margin: var(--spacing-lg) auto;
    padding: 0;
}

.games-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.game-card-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--spacing-md);
}

.game-card {
    text-decoration: none;
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all var(--transition-normal);
    position: relative;
}

.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.08);
}

.game-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.game-card-tag {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-card-tag svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.game-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-sm) var(--spacing-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

@media (max-width: 768px) {
    .games-section {
        padding: 0 var(--mobile-padding);
    }
    
    .game-card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm);
    }
    
    .game-card img {
        aspect-ratio: 1;
    }
    
    .game-card-tag {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    .game-card-tag svg {
        width: 10px;
        height: 10px;
    }
    
    .game-card-title {
        font-size: 0.75rem;
        padding: var(--spacing-sm);
    }
}

/* ===== Game Description Section ===== */
.game-description {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.game-description h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: left;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 2rem;
    text-align: left;
}

.description-section {
    margin-bottom: 2.5rem;
}

.description-section h3 {
    color: #1a1a2e;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.description-section p {
    color: #64748b;
    line-height: 1.75;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.feature-list,
.mode-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li,
.mode-list li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 1.1rem;
}

.feature-list li:before,
.mode-list li:before {
    content: "•";
    color: var(--accent-color);
    position: absolute;
    left: 0;
}

.text-link {
    color: var(--accent-color);
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .game-description {
        padding: 1.5rem;
    }

    .game-description h2 {
        font-size: 1.8rem;
    }

    .intro-text {
        font-size: 1.1rem;
    }

    .description-section h3 {
        font-size: 1.3rem;
    }

    .description-section p,
    .feature-list li,
    .mode-list li {
        font-size: 1rem;
    }
}

/* 手机端样式 */
.mobile-game-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: transparent;
}

.mobile-game-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

.back-to-details {
    position: fixed;
    top: 80px;
    left: 0;
    transform: translateY(-50%);
    z-index: 1010;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 0 8px 8px 0;
    width: 32px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    color: white;
    backdrop-filter: blur(4px);
    transition: background 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
    padding: 0;
    touch-action: none;
    user-select: none;
}

.fullscreen-btn {
    position: fixed;
    top: 140px;
    left: 0;
    transform: translateY(-50%);
    z-index: 1010;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 0 8px 8px 0;
    width: 32px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    backdrop-filter: blur(4px);
    transition: background 0.3s ease;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
    padding: 0;
    touch-action: none;
    user-select: none;
}

.back-to-details:active,
.fullscreen-btn:active {
    cursor: grabbing;
    background: rgba(0, 0, 0, 0.9);
}

.back-to-details svg,
.fullscreen-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
    stroke: white;
    stroke-width: 1;
}

.mobile-game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

.mobile-game-overlay .loading-content {
    text-align: center;
    padding: 2rem;
    width: 80%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-game-overlay .loading-text {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mobile-game-overlay .progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.mobile-game-overlay .progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.1s linear;
}

@media (max-width: 480px) {
    .game-preview {
        padding: 0.5rem var(--mobile-padding);
        padding-top: calc(2rem);
    }

    .game-preview iframe {
        aspect-ratio: 16/9;
    }

    .detail-thumbnail-header {
        padding: 1rem;
        text-align: center;
    }

    .detail-thumbnail-header h1 {
        font-size: 1.2rem;
        text-align: center;
        width: 100%;
    }

    .detail-thumbnail-footer {
        padding: 1rem;
    }


    .meta {
        gap: 0.4rem;
    }

    .meta-item {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }

    .meta-label,
    .meta-value {
        font-size: 0.8rem;
    }

    .play-now-btn {
        padding: 0.8rem 2.5rem;
        font-size: 1.1rem;
        animation: pulse 2s infinite;
    }

    .back-to-details {
        top: 12px;
        left: 0;
        width: 32px;
        height: 40px;
    }

    .fullscreen-btn {
        top: 64px;
        left: 0;
        width: 32px;
        height: 40px;
    }

    .back-to-details svg,
    .fullscreen-btn svg {
        width: 20px;
        height: 20px;
    }

    .mobile-game-overlay .loading-content {
        padding: 1.5rem;
        max-width: 250px;
    }

    .mobile-game-overlay .loading-text {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .mobile-game-overlay .progress-bar-container {
        height: 4px;
    }
}

.user-feedback {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

/* Feedback Button - 右下角浮动按钮 */
.feedback-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.feedback-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feedback-btn:active {
    transform: scale(0.95);
}

.feedback-btn svg {
    width: 24px;
    height: 24px;
}

/* PC端反馈弹窗样式 */
.feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.feedback-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 480px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    animation: modalSlideIn 0.3s ease;
}

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

.feedback-modal h3 {
    margin-bottom: var(--spacing-md);
    color: #1a1a2e;
    font-size: 1.25rem;
    font-weight: 600;
}

.feedback-modal textarea {
    width: 100%;
    height: 120px;
    padding: var(--spacing-md);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    resize: vertical;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    transition: all var(--transition-fast);
}

.feedback-modal textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.feedback-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
}

.feedback-modal button {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.feedback-modal .cancel-feedback {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.feedback-modal .cancel-feedback:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #475569;
}

.feedback-modal .submit-feedback {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
}

.feedback-modal .submit-feedback:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 26, 46, 0.3);
}

/* 手机端反馈弹窗适配 */
@media (max-width: 768px) {
    .feedback-modal {
        align-items: flex-start;
        padding-top: 12vh;
        transition: padding-top 0.3s ease;
    }
    
    .feedback-modal.keyboard-open {
        padding-top: 3vh;
    }
    
    .feedback-modal-content {
        width: 92%;
        max-width: 400px;
        padding: var(--spacing-lg);
        max-height: 85vh;
        overflow-y: auto;
    }
}

/* 保留旧的移动端反馈弹窗样式（兼容） */
.mobile-feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 3000;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    transition: padding-top 0.3s ease;
}

.mobile-feedback-modal.keyboard-open {
    padding-top: 5vh;
    align-items: flex-start;
}

.mobile-feedback-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    width: 92%;
    max-width: 400px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    animation: modalSlideIn 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-feedback-modal h3 {
    margin-bottom: var(--spacing-md);
    color: #1a1a2e;
    font-size: 1.1rem;
    font-weight: 600;
}

.mobile-feedback-modal textarea {
    width: 100%;
    height: 100px;
    padding: var(--spacing-sm);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    resize: vertical;
    font-size: 16px; /* 防止iOS缩放 */
    font-family: inherit;
    background: #fff;
    transition: all var(--transition-fast);
}

.mobile-feedback-modal textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.mobile-feedback-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
}

.mobile-feedback-modal button {
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.mobile-feedback-modal .cancel-feedback {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-feedback-modal .submit-feedback {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
}

@media (max-width: 768px) {
    .feedback-btn {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }
    
    .feedback-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* PC 端样式 */
.desktop-game-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 563px;
    margin: 48px auto 40px auto;
    background: #1a1a2e;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.desktop-game-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #1a1a2e;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: var(--radius-lg);
}

.game-overlay .loading-content {
    text-align: center;
    padding: 2rem;
    width: 80%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-overlay .loading-text {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.game-overlay .progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.game-overlay .progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.1s linear;
}

.play-button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 2rem;
    padding: 1.2rem 3.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: not-allowed;
    transition: all 0.3s ease;
    opacity: 0.7;
    min-width: 200px;
    white-space: nowrap;
    display: none;
}

.play-button.ready {
    cursor: pointer;
    opacity: 1;
    animation: pulse 2s infinite;
}

.play-button.ready:hover {
    transform: scale(1.05);
    background: #ff7b1a;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

@media (max-width: 1400px) {
    .desktop-game-container {
        max-width: 1000px;
    }
}

@media (max-width: 1000px) {
    .desktop-game-container {
        max-width: 800px;
    }
}

@media (max-width: 992px) {
    .desktop-game-container {
        max-width: 700px;
    }
}

/* Toast 提示样式 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.toast.show {
    opacity: 1;
}

@media (max-width: 480px) {
    .toast {
        top: 16px;
        padding: 10px 20px;
        font-size: 13px;
        max-width: 85%;
    }
}

/* Header Navigation Styles */
/* ===== Modern Header Styles ===== */
.balatro-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    backdrop-filter: blur(12px);
    z-index: 1000;
    height: var(--header-height);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.logo-container:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 42px;
    width: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.logo-text {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    align-items: center;
}

.nav-links li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    position: relative;
    transition: all 0.2s ease;
    display: inline-block;
}

.nav-links li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links li a.active {
    color: #fff;
    background: var(--primary-color);
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
}

/* Mobile Menu Button */
.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    padding-top: 90px;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    z-index: 100;
    box-shadow: none;
}

.sidebar.open {
    right: 0;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.sidebar-links {
    list-style: none;
    padding: 0 1rem;
}

.sidebar-links li {
    margin-bottom: 0.25rem;
}

.sidebar-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.sidebar-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(4px);
}

.sidebar-links a.active {
    background: var(--primary-color);
    color: #fff;
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.show {
    opacity: 1;
}


/* Mobile Styles */
@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }

    .menu-btn {
        display: flex;
    }

    .nav-container {
        padding: 0 var(--mobile-padding);
    }
}

/* Game Description Styles */
.game-description {
    max-width: var(--max-width);
    margin: var(--spacing-xl) auto;
    padding: var(--spacing-xl) var(--spacing-xl);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
    .game-description {
        margin: 2rem 1rem;
    }
}

.description-content {
    display: grid;
    gap: 2rem;
}

.description-section {
    margin-bottom: 2rem;
}

.description-section h2 {
    color: #1a1a2e;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid transparent;
    background: linear-gradient(90deg, #1a1a2e, #16213e) padding-box,
                linear-gradient(90deg, var(--primary-color), #60a5fa) border-box;
    background-clip: text;
    -webkit-background-clip: text;
    position: relative;
}

.description-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #60a5fa);
    border-radius: 2px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all var(--transition-fast);
}

.feature-item:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    transform: translateX(4px);
}

.feature-item:before {
    content: "";
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--primary-color), #60a5fa);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Footer Styles */
.balatro-footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem var(--mobile-padding);
    margin-top: 3rem;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Game Container Styles */
.game-container {
    margin-top: var(--header-height);
    /* Add margin-top equal to header height */
    padding: 1rem;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 页脚样式 */
/* ===== Modern Footer Styles ===== */
.site-footer {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    color: #fff;
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: #fff;
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

.footer-section p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: var(--line-height-relaxed);
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-list li {
    margin-bottom: var(--spacing-sm);
}

.footer-links-list a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color var(--transition-fast), transform var(--transition-fast);
    display: inline-block;
}

.footer-links-list a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-lg);
    text-align: center;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .site-footer {
        padding: var(--spacing-xl) 0 var(--spacing-md);
    }

    .footer-container {
        padding: 0 var(--mobile-padding);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}



.ad-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100% !important;
    min-height: 100vh !important;
    /* 兼容某些布局 */
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* flex-direction: row; */
}

.ad-content {
    position: relative;
    background: white;
    width: 500px;
    height: 400px;
    border-radius: 8px;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
}

.ad-content .ad-content {
    width: 500px;
    height: 400px;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: red;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}

.countdown {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}

/* ===== Level Answers Grid ===== */
.level-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.level-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    background: var(--color-success-light);
    border: 2px solid var(--color-success);
    color: #2e7d32;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.level-grid a:hover {
    background: var(--color-success);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .level-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: var(--spacing-xs);
    }
    
    .level-grid a {
        padding: var(--spacing-sm);
        font-size: 0.75rem;
    }
}

/* ===== Level Answer Detail Page ===== */
.answer-category {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.answer-category h3 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.answer-words {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.answer-word {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-primary);
}

.level-nav {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.level-nav a {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.level-nav a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Level Detail Card */
.level-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.level-card h1 {
    margin: var(--spacing-xs) 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.level-card h2 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
    color: var(--text-primary);
}

.level-meta {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Category Cards */
.category {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
    transition: all var(--transition-fast);
}

.category:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.category h3 {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.words {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.word {
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid #e6eefc;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.word:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Level Controls */
.level-controls {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

.level-controls button {
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.level-controls button.primary {
    background: var(--primary-color);
    color: #fff;
    border: none;
}

.level-controls button.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.level-controls button.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.level-controls button.secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

/* Near Levels Navigation */
#nav-near {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

#nav-near a {
    text-decoration: none;
}

#nav-near a button,
#nav-near span {
    display: block;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

#nav-near a button {
    background: linear-gradient(135deg, #f8fbff 0%, #f0f7ff 100%);
    color: var(--primary-color);
    border: 1px solid #e6eefc;
}

#nav-near a button:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateX(4px);
}

#nav-near span {
    background: linear-gradient(135deg, var(--color-success-light) 0%, #e8f5e9 100%);
    color: #2e7d32;
    font-weight: 700;
    border: 2px solid var(--color-success);
}

/* Answer Raw Display */
.answer-raw {
    white-space: pre-wrap;
    background: var(--bg-tertiary);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

/* Not Found State */
.notfound {
    color: #b02a37;
    padding: var(--spacing-lg);
    text-align: center;
    background: #fff5f5;
    border-radius: var(--radius-md);
    border: 1px solid #f5c2c7;
}

/* Sample Image */
img.sample {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-top: var(--spacing-md);
}

.hint {
    color: var(--text-secondary);
    margin-top: var(--spacing-sm);
    font-size: 0.95rem;
}