@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;900&family=JetBrains+Mono:wght@400;700&family=Noto+Serif+SC:wght@400;600;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 中国风配色 - 西宁元素 */
    --primary-red: #c8102e;
    --primary-gold: #d4af37;
    --primary-blue: #1e5a8e;
    --accent-orange: #f47920;
    --accent-green: #00a650;
    --bg-cream: #fef9f3;
    --bg-paper: #f5ebe0;
    --bg-silk: #fff8e7;
    --text-ink: #2c2416;
    --text-secondary: #6b5d4f;
    --border-gold: rgba(212, 175, 55, 0.3);
    --shadow-soft: rgba(44, 36, 22, 0.1);
}

body {
    font-family: 'Noto Serif SC', 'Poppins', serif;
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-silk) 50%, var(--bg-paper) 100%);
    color: var(--text-ink);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 中国风装饰背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(200, 16, 46, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

.screen {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo-container {
    text-align: center;
    margin-bottom: 60px;
    animation: logoEntrance 1s ease;
}

@keyframes logoEntrance {
    0% { opacity: 0; transform: scale(0.5) rotate(-10deg); }
    60% { transform: scale(1.1) rotate(2deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

.main-title {
    font-size: 64px;
    font-weight: 900;
    letter-spacing: 8px;
    margin-bottom: 20px;
    font-family: 'Noto Serif SC', serif;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-gold) 50%, var(--primary-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(200, 16, 46, 0.3));
    animation: textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% { filter: drop-shadow(0 2px 8px rgba(200, 16, 46, 0.3)); }
    50% { filter: drop-shadow(0 4px 16px rgba(212, 175, 55, 0.5)); }
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    letter-spacing: 3px;
    font-weight: 400;
    margin-bottom: 20px;
}

/* 中国风装饰图案 */
.decorative-pattern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 24px;
    color: var(--primary-gold);
    margin-top: 15px;
    animation: patternFloat 4s ease-in-out infinite;
}

@keyframes patternFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.pattern-left, .pattern-right {
    animation: rotate 8s linear infinite;
}

.pattern-left {
    animation-direction: normal;
}

.pattern-right {
    animation-direction: reverse;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.pattern-center {
    font-size: 16px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* 美食画廊 */
.food-gallery {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 50px;
    text-align: center;
}

.gallery-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-ink);
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.gallery-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-gold), var(--primary-red));
    border-radius: 2px;
}

.food-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.food-card {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-gold);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 24px var(--shadow-soft);
}

.food-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-gold), var(--primary-red));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.food-card:hover::before {
    transform: scaleX(1);
}

.food-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(200, 16, 46, 0.2);
    border-color: var(--primary-gold);
}

.food-image {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.food-card:hover .food-image {
    transform: scale(1.1);
}

.food-info {
    padding: 20px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 1));
}

.food-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.food-desc {
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.food-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.9), rgba(212, 175, 55, 0.9));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.4s ease;
    color: white;
}

.food-card:hover .food-overlay {
    opacity: 1;
}

.food-overlay i {
    font-size: 60px;
    animation: playPulse 1.5s ease-in-out infinite;
}

@keyframes playPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.food-overlay span {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 2px;
}

.difficulty-selector {
    width: 500px;
    height: 300px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px dashed var(--glass-border);
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    margin-bottom: 60px;
}

.upload-zone:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-blue);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.2);
}

.upload-zone.dragover {
    border-color: var(--accent-light-blue);
    background: rgba(59, 130, 246, 0.05);
    transform: scale(1.05);
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    color: var(--accent-blue);
    animation: float 3s ease-in-out infinite;
    font-size: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.upload-icon i {
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.3));
    transition: all 0.3s ease;
}

.upload-zone:hover .upload-icon i {
    transform: scale(1.1);
    filter: drop-shadow(0 0 25px rgba(59, 130, 246, 0.6));
}

.upload-text {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.upload-subtext {
    font-size: 14px;
    color: var(--text-secondary);
}

.difficulty-selector {
    text-align: center;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.difficulty-cards {
    display: flex;
    gap: 30px;
}

.difficulty-card {
    width: 180px;
    height: 220px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 25px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.difficulty-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.4s;
}

.difficulty-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.2);
}

.difficulty-card:hover::before {
    opacity: 0.08;
}

.difficulty-card.active {
    border-color: var(--accent-blue);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
}

.difficulty-card.active::before {
    opacity: 0.12;
}

.card-icon {
    font-size: 60px;
    margin-bottom: 20px;
    color: var(--accent-blue);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.difficulty-card:hover .card-icon {
    transform: scale(1.2) rotate(10deg);
    color: var(--accent-light-blue);
}

.difficulty-card.active .card-icon {
    color: var(--accent-blue);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.difficulty-card h4 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.difficulty-card p {
    font-size: 16px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

#gameScreen {
    padding: 30px;
    width: 100%;
    box-sizing: border-box;
}

.game-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-gold);
    border-radius: 20px;
    padding: 15px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    box-shadow: 0 8px 24px var(--shadow-soft);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-buttons {
    display: flex;
    gap: 15px;
}

.icon-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-gold);
    border-radius: 15px;
    color: var(--primary-red);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    position: relative;
    overflow: hidden;
}

.icon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-gold));
    opacity: 0;
    transition: opacity 0.4s;
    border-radius: 15px;
}

.icon-btn i {
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.icon-btn:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 40px rgba(200, 16, 46, 0.3);
    border-color: var(--primary-gold);
}

.icon-btn:hover::before {
    opacity: 0.15;
}

.icon-btn:hover i {
    transform: scale(1.2) rotate(360deg);
    color: var(--primary-red);
}

.icon-btn:active {
    transform: translateY(-4px) scale(1.05);
}

/* 一键拼图测试按钮特殊样式 */
.auto-win-btn {
    background: linear-gradient(135deg, var(--accent-orange), var(--primary-gold)) !important;
    animation: testBtnPulse 2s ease-in-out infinite;
}

.auto-win-btn i {
    color: white !important;
}

.auto-win-btn:hover {
    transform: translateY(-8px) scale(1.15) !important;
    box-shadow: 0 15px 40px rgba(244, 121, 32, 0.5) !important;
}

@keyframes testBtnPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(244, 121, 32, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 10px rgba(244, 121, 32, 0);
    }
}

.game-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    position: relative;
}

.puzzle-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    flex: 0 0 auto;
}

.puzzle-board {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 3px solid var(--border-gold);
    border-radius: 30px;
    padding: 15px;
    box-shadow: 0 10px 40px var(--shadow-soft);
    position: relative;
    display: grid;
    gap: 6px;
    max-width: calc(100vw - 100px);
    box-sizing: border-box;
}

.puzzle-board::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-gold), var(--primary-red));
    border-radius: 30px;
    opacity: 0.3;
    z-index: -1;
    animation: borderPulse 3s ease-in-out infinite;
}

@keyframes borderPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

.puzzle-piece {
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.puzzle-piece::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.puzzle-piece:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(200, 16, 46, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    z-index: 10;
}

.puzzle-piece:hover::after {
    border-color: var(--primary-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}

.puzzle-piece.dragging {
    opacity: 0.5;
    transform: scale(1.1) rotate(5deg);
    cursor: grabbing;
}

.puzzle-piece.correct {
    animation: correctPulse 0.6s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 30px rgba(34, 197, 94, 0.8); }
}

.puzzle-piece.correct::after {
    border-color: #22c55e;
    animation: greenGlow 1s ease;
}

@keyframes greenGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(34, 197, 94, 0); }
    50% { box-shadow: 0 0 30px rgba(34, 197, 94, 0.8); }
}

.progress-bar {
    width: 100%;
    max-width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-gold);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-gold), var(--primary-red));
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.preview-panel {
    width: 300px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-gold);
    border-radius: 25px;
    padding: 20px;
    box-shadow: 0 8px 32px var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: absolute;
    right: 30px;
    top: 0;
}

.preview-panel.hidden {
    transform: translateX(calc(100% + 60px));
    opacity: 0;
    pointer-events: none;
}

.preview-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(212, 175, 55, 0.2);
}

.preview-header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.preview-panel img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.overlay.active {
    display: flex;
    opacity: 1;
}

.overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 20px;
    box-shadow: 0 0 100px rgba(59, 130, 246, 0.4);
    animation: zoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#victoryScreen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #fef9f3 0%, #fff8e7 50%, #f5ebe0 100%);
    z-index: 2000;
}

/* 中国风装饰背景 */
#victoryScreen::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(200, 16, 46, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

#confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.victory-content {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: victoryEntrance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes victoryEntrance {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.victory-icon {
    font-size: 80px;
    color: var(--primary-gold);
    margin-bottom: 20px;
    animation: trophyBounce 1s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.4));
}

@keyframes trophyBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

.victory-title {
    margin-bottom: 35px;
}

.victory-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-top: 10px;
    letter-spacing: 2px;
    font-weight: 400;
}

/* 胜利信息卡片 - 一个大卡片包含介绍和二维码 */
.victory-info-card {
    display: flex;
    gap: 40px;
    align-items: stretch;
    max-width: 900px;
    width: 90%;
    margin: 30px auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 3px solid var(--border-gold);
    border-radius: 25px;
    padding: 35px;
    box-shadow: 0 15px 50px var(--shadow-soft);
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.victory-info-card.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 左侧美食介绍区域 */
.food-intro-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 右侧二维码区域 */
.qrcode-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(200, 16, 46, 0.05));
    border-radius: 20px;
    border: 2px dashed var(--border-gold);
}

.qrcode-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-ink);
    text-align: center;
}

.qrcode-header i {
    font-size: 18px;
    color: var(--primary-gold);
}

.qrcode-wrapper {
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 8px 24px var(--shadow-soft);
}

.qrcode-image {
    display: block;
    border-radius: 10px;
}

.intro-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-gold);
}

.intro-decoration {
    font-size: 28px;
    color: var(--primary-gold);
    animation: rotate 8s linear infinite;
}

.intro-header h3 {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-red);
    letter-spacing: 2px;
    margin: 0;
}

.intro-text {
    font-size: 18px;
    line-height: 2;
    color: var(--text-ink);
    text-align: justify;
    margin: 20px 0;
    text-indent: 2em;
}

.intro-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-gold);
}

.intro-label {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-gold));
    color: white;
    border-radius: 20px;
    font-size: 16px;
    letter-spacing: 1px;
    font-weight: 600;
}

.qrcode-card {
    display: block;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-gold);
    border-radius: 30px;
    padding: 25px 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.qrcode-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 1);
    border-color: var(--primary-gold);
    box-shadow: 0 20px 60px rgba(212, 175, 55, 0.3);
}

.qrcode-card:hover .qrcode-wrapper {
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.4);
}

.success-text {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-gold) 50%, var(--primary-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(200, 16, 46, 0.3));
    animation: successShine 3s ease-in-out infinite;
}

@keyframes successShine {
    0%, 100% { 
        filter: drop-shadow(0 2px 8px rgba(200, 16, 46, 0.3));
    }
    50% { 
        filter: drop-shadow(0 4px 16px rgba(212, 175, 55, 0.5));
    }
}

.qrcode-container {
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.qrcode-container.show {
    opacity: 1;
    transform: translateY(0);
}

.victory-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.primary-btn, .secondary-btn {
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-gold));
    color: white;
    box-shadow: 0 10px 30px rgba(200, 16, 46, 0.3);
}

.primary-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #a00d24, #b8941f);
    opacity: 0;
    transition: opacity 0.4s;
}

.primary-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.primary-btn:hover::after {
    width: 300px;
    height: 300px;
}

.primary-btn:hover {
    transform: translateY(-8px) scale(1.08);
    box-shadow: 0 20px 60px rgba(200, 16, 46, 0.5);
}

.primary-btn:hover::before {
    opacity: 1;
}

.primary-btn span, .primary-btn i {
    position: relative;
    z-index: 1;
}

.primary-btn i {
    font-size: 20px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.primary-btn:hover i {
    transform: scale(1.2) rotate(360deg);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 2px solid var(--border-gold);
    color: var(--primary-red);
}

.secondary-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-gold));
    opacity: 0;
    transition: opacity 0.4s;
    border-radius: 20px;
}

.secondary-btn span, .secondary-btn i {
    position: relative;
    z-index: 1;
}

.secondary-btn i {
    font-size: 20px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.secondary-btn:hover {
    transform: translateY(-8px) scale(1.08);
    border-color: var(--primary-gold);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
}

.secondary-btn:hover::before {
    opacity: 0.15;
}

.secondary-btn:hover span,
.secondary-btn:hover i {
    color: white;
}

.secondary-btn:hover i {
    transform: scale(1.2) rotate(-360deg);
}

.primary-btn:active, .secondary-btn:active {
    transform: translateY(-4px) scale(1.02);
}

@media (max-width: 1200px) {
    .game-container {
        flex-direction: column;
        align-items: center;
    }
    .preview-panel {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 42px;
        letter-spacing: 3px;
    }
    
    .subtitle {
        font-size: 14px;
        letter-spacing: 1px;
    }
    
    .decorative-pattern {
        font-size: 18px;
        gap: 15px;
    }
    
    .food-cards {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .food-card {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .game-header {
        flex-wrap: wrap;
    }
    
    .success-text {
        font-size: 36px;
        letter-spacing: 2px;
    }
    
    .victory-subtitle {
        font-size: 14px;
    }
    
    .victory-info-card {
        flex-direction: column;
        gap: 25px;
        padding: 25px;
    }
    
    .qrcode-section {
        padding: 15px;
    }
    
    .intro-header h3 {
        font-size: 26px;
    }
    
    .intro-text {
        font-size: 16px;
        line-height: 1.8;
    }
    
    .intro-decoration {
        font-size: 22px;
    }
    
    .qrcode-image {
        width: 180px;
        height: 180px;
    }
    
    .qrcode-header {
        font-size: 14px;
    }
    
    .intro-label {
        font-size: 14px;
        padding: 8px 18px;
    }
    
    .victory-icon {
        font-size: 60px;
        margin-bottom: 15px;
    }
    
    .victory-title {
        margin-bottom: 25px;
    }
    
    .qrcode-container {
        margin-bottom: 30px;
    }
    
    .qrcode-wrapper {
        padding: 15px;
    }
    
    .qrcode-header {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .qrcode-header i {
        font-size: 18px;
    }
    
    .victory-buttons {
        flex-direction: column;
        width: 90%;
        max-width: 300px;
        margin: 0 auto;
        gap: 15px;
    }
    
    .primary-btn, .secondary-btn {
        width: 100%;
        padding: 15px 30px;
        font-size: 16px;
    }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-gradient);
}

::selection {
    background: var(--accent-sky);
    color: var(--text-primary);
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    animation: ripple 0.6s ease-out;
}

.puzzle-piece, .difficulty-card, .icon-btn, .primary-btn, .secondary-btn {
    user-select: none;
    -webkit-user-select: none;
}

/* 优惠券页面样式 */
#couponScreen {
    background: linear-gradient(135deg, #fef9f3 0%, #fff8e7 50%, #f5ebe0 100%);
    min-height: 100vh;
    padding: 20px;
}

.coupon-container {
    max-width: 500px;
    margin: 0 auto;
}

.coupon-header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease;
}

.coupon-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(200, 16, 46, 0.3);
}

.coupon-icon i {
    font-size: 36px;
    color: white;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.coupon-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-ink);
    margin-bottom: 10px;
}

.coupon-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.coupon-card {
    display: flex;
    background: linear-gradient(135deg, var(--primary-red), #e63946);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(200, 16, 46, 0.3);
    margin-bottom: 30px;
    position: relative;
    transition: transform 0.3s ease;
}

.coupon-card:hover {
    transform: translateY(-5px);
}

.coupon-card.used {
    opacity: 0.7;
    filter: grayscale(0.3);
}

.coupon-left {
    flex: 0 0 120px;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.coupon-amount {
    display: flex;
    align-items: flex-start;
    line-height: 1;
}

.coupon-amount .currency {
    font-size: 20px;
    margin-top: 8px;
}

.coupon-amount .value {
    font-size: 48px;
    font-weight: 700;
}

.coupon-condition {
    font-size: 12px;
    margin-top: 10px;
    opacity: 0.9;
}

.coupon-divider {
    position: relative;
    width: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.coupon-divider .circle {
    width: 20px;
    height: 20px;
    background: #fef9f3;
    border-radius: 50%;
    position: absolute;
}

.coupon-divider .circle.top {
    top: -10px;
}

.coupon-divider .circle.bottom {
    bottom: -10px;
}

.coupon-divider .dashed-line {
    flex: 1;
    border-left: 2px dashed rgba(255, 255, 255, 0.3);
    margin: 15px 0;
}

.coupon-right {
    flex: 1;
    padding: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.coupon-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.coupon-validity {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.use-btn {
    background: white;
    color: var(--primary-red);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}

.use-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.use-btn:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

.shops-section, .navigation-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px var(--shadow-soft);
    border: 2px solid var(--border-gold);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-gold);
}

.section-header i {
    font-size: 24px;
    color: var(--primary-gold);
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-ink);
}

.shops-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shop-card {
    background: linear-gradient(to bottom, #fff, #faf8f5);
    border: 1px solid var(--border-gold);
    border-radius: 15px;
    padding: 18px;
    transition: all 0.3s ease;
}

.shop-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(200, 16, 46, 0.1);
    border-color: var(--primary-gold);
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.shop-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-ink);
}

.shop-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-gold);
    font-weight: 600;
}

.shop-rating i {
    font-size: 14px;
}

.shop-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.shop-address, .shop-distance {
    display: flex;
    align-items: center;
    gap: 6px;
}

.shop-address i, .shop-distance i {
    color: var(--primary-red);
    font-size: 12px;
}

.shop-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.1), rgba(212, 175, 55, 0.1));
    color: var(--primary-red);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    border: 1px solid var(--border-gold);
}

.shop-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.call-btn {
    background: rgba(30, 90, 142, 0.1);
    color: var(--primary-blue);
}

.call-btn:hover {
    background: var(--primary-blue);
    color: white;
}

.nav-action-btn {
    background: rgba(200, 16, 46, 0.1);
    color: var(--primary-red);
}

.nav-action-btn:hover {
    background: var(--primary-red);
    color: white;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-btn {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-gold));
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(200, 16, 46, 0.3);
}

.back-section {
    text-align: center;
    margin-top: 30px;
}

.back-btn {
    background: transparent;
    border: 2px solid var(--border-gold);
    color: var(--text-secondary);
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--border-gold);
    color: var(--text-ink);
}

.map-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.map-modal.active {
    display: flex;
}

.map-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-gold));
    color: white;
}

.map-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.map-body {
    padding: 20px;
}

.map-placeholder {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.05), rgba(212, 175, 55, 0.05));
    border-radius: 15px;
    margin-bottom: 20px;
}

.map-placeholder i {
    font-size: 48px;
    color: var(--primary-gold);
    margin-bottom: 15px;
}

.map-placeholder p {
    color: var(--text-ink);
    font-weight: 500;
}

.map-placeholder .map-tip {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.location-info {
    text-align: center;
}

.location-info h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-ink);
    margin-bottom: 10px;
}

.location-info p {
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.location-info i {
    color: var(--primary-red);
}

.start-nav-btn {
    margin-top: 20px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-gold));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.start-nav-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(200, 16, 46, 0.3);
}

.qrcode-tip {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 10px;
}

@media (max-width: 600px) {
    .coupon-card {
        flex-direction: column;
    }
    
    .coupon-left {
        flex: none;
        padding: 20px;
    }
    
    .coupon-divider {
        display: none;
    }
    
    .shop-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .shop-actions {
        flex-direction: column;
    }
}

.all-shops-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shop-nav-item {
    background: linear-gradient(to bottom, #fff, #faf8f5);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.shop-nav-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-ink);
    margin-bottom: 8px;
}

.shop-nav-item p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.shop-nav-item i {
    color: var(--primary-red);
}

.call-btn {
    text-decoration: none;
}
