body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

:root {
    --primary-color: #f60;
    --text-primary: #333;
    --text-secondary: #666;
    --mobile-padding: 1rem;
    --max-width: 1100px;
    --header-height: 70px;
}

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

.game-detail {
    /* padding-top: var(--header-height); */
    /* min-height: 100vh; */
    /* background: #f5f5f5; */
}

.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-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.2rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 3rem;
    text-align: left;
}

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

.description-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.description-section p {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 1.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-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.like-btn {
    background: #4CAF50;
    color: white;
}

.unlike-btn {
    background: #f44336;
    color: white;
}

.feedback-btn {
    background: #2196F3;
    color: white;
    width: auto;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 13px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feedback-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

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

.feedback-modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

.feedback-modal h3 {
    margin-bottom: 15px;
    color: #333;
}

.feedback-modal textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    resize: vertical;
}

.feedback-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.feedback-modal button {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.feedback-modal .cancel-feedback {
    background: #f5f5f5;
    color: #333;
}

.feedback-modal .submit-feedback {
    background: #2196F3;
    color: white;
}

.feedback-modal button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 手机端反馈弹窗样式 */
.mobile-feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.mobile-feedback-modal-content {
    background: white;
    padding: 15px;
    border-radius: 8px;
    width: 95%;
    max-width: 95vw;
}

.mobile-feedback-modal h3 {
    margin-bottom: 12px;
    color: #333;
    font-size: 1.1rem;
}

.mobile-feedback-modal textarea {
    width: 100%;
    height: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 12px;
    resize: vertical;
    font-size: 15px;
}

.mobile-feedback-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.mobile-feedback-modal button {
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.mobile-feedback-modal .cancel-feedback {
    background: #f5f5f5;
    color: #333;
}

.mobile-feedback-modal .submit-feedback {
    background: #2196F3;
    color: white;
}

/* PC 端样式 */
.desktop-game-container {
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: 620px;
    margin: 48px auto 40px auto;
    background: #181A1B;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35), 0 1.5px 8px rgba(0, 0, 0, 0.18);
    border: none;
}

.desktop-game-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #181A1B;
    /* border-radius: 0 0 24px 24px; */
}

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

.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: 1100px) {
    .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 */
.balatro-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: var(--header-height);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    gap: 3rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    margin-right: 2rem;
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 8px;
}

.logo-text {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    margin-left: -1rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active::after {
    width: 100%;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        gap: 1.5rem;
    }

    .logo-container {
        margin-right: 1rem;
    }

    .nav-links {
        gap: 1.5rem;
        margin-left: -0.5rem;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

}

@media (max-width: 600px) {
    .nav-container {
        padding: 0 0.8rem;
        gap: 1rem;
    }

    .logo-container {
        margin-right: 0.5rem;
    }

    .nav-links {
        gap: 1rem;
        margin-left: -0.3rem;
    }

    .nav-links a {
        font-size: 1rem;
    }
}

/* Game Description Styles */
.game-description {
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 18px 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0px 7px 10px 4px #5d6b844d;

}

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

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

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

.description-section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

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

.feature-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-item:before {
    content: "•";
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* 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);
}

/* 页脚样式 */
.site-footer {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #eee;
    background: #fff;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

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

.footer-separator {
    margin: 0 10px;
    color: #ddd;
}

.footer-copyright {
    color: #999;
    font-size: 12px;
}

@media (max-width: 768px) {
    .site-footer {
        margin-top: 20px;
        padding: 15px 0;
    }

    .footer-link {
        font-size: 13px;
    }

    .footer-separator {
        margin: 0 8px;
    }

    .footer-copyright {
        font-size: 11px;
    }
}



.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;
}