* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* 移除点击高亮 */
    -webkit-touch-callout: none; /* 禁用长按菜单 */
    -webkit-user-select: none; /* 禁用文本选择 */
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden; /* 防止横向滚动 */
    touch-action: manipulation; /* 优化触摸响应 */
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 800px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    color: #ff6b6b;
    font-size: 2em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.rules-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 500px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.rule-text {
    font-size: 1.1em;
    font-weight: 500;
    margin: 0;
    text-align: center;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 15px;
}

.info {
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #d4af37;
}

.info p {
    color: #333;
    margin: 5px 0;
    font-weight: bold;
}

.scratch-cards {
    margin: 30px 0;
}

.card-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.scratch-card {
    position: relative;
    width: 180px;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scratch-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.scratch-card.scratched {
    cursor: default;
}

.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 15px;
    z-index: 2;
    touch-action: none; /* 防止触摸时页面滚动 */
}

.prize-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 15px;
    z-index: 1;
    padding: 20px 0;
}

.lucky-word {
    font-size: 3em;
    font-weight: bold;
    color: #d4af37;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
.prize-amount {
    font-size: 1.6em;
    font-weight: bold;
    color: #e74c3c;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}#d4af37;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
}

.prize-type {
    font-size: 0.9em;
    color: #666;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prize-content.no-prize {
    background: linear-gradient(135deg, #e0e0e0, #f0f0f0);
}

.prize-content.no-prize .prize-amount {
    color: #999;
}

.controls {
    text-align: center;
    margin-top: 30px;
}

.reset-button {
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.reset-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffd700, #d4af37);
}

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

.stats {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #d4af37;
}

.stats p {
    color: #333;
    font-weight: bold;
    margin: 0;
}

/* 规则说明样式 */
.rules-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    border: 2px solid #d4af37;
}

.rules-section h3 {
    color: #d4af37;
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.rules-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border-left: 4px solid #d4af37;
}

.rule-number {
    background: linear-gradient(135deg, #d4af37, #ffd700);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.rule-text {
    color: #333;
    line-height: 1.6;
    font-size: 1em;
}

.rule-text strong {
    color: #d4af37;
    font-weight: bold;
}

footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }

    h1 {
        font-size: 1.8em;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 1em;
        margin-bottom: 10px;
    }

    .info {
        padding: 10px;
        margin-bottom: 15px;
    }

    .info p {
        font-size: 0.9em;
        margin: 3px 0;
    }

    .scratch-cards {
        margin: 15px 0;
    }

    .card-row {
        gap: 10px;
        margin-bottom: 10px;
    }

    .scratch-card {
        width: 100px;
        height: 120px;
    }

    .scratch-canvas {
        width: 100px;
        height: 120px;
    }

    .lucky-word {
        font-size: 1.8em;
        margin-top: 5px;
    }

    .prize-amount {
        font-size: 1em;
    }

    .prize-type {
        font-size: 0.8em;
    }

    .prize-content {
        padding: 10px 0;
    }

    .stats {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
        margin-top: 15px;
    }

    .stats p {
        font-size: 0.9em;
    }

    .rule-text {
        font-size: 0.9em;
    }

    .reset-button {
        padding: 10px 20px;
        font-size: 1em;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px 5px;
        margin: 5px;
    }

    .card-row {
        gap: 8px;
        margin-bottom: 8px;
    }

    .scratch-card {
        width: 90px;
        height: 110px;
    }

    .scratch-canvas {
        width: 90px;
        height: 110px;
    }

    .lucky-word {
        font-size: 1.6em;
    }

    .prize-amount {
        font-size: 0.9em;
    }

    .prize-type {
        font-size: 0.7em;
    }

    h1 {
        font-size: 1.5em;
    }

    .subtitle {
        font-size: 0.9em;
    }

    .rules-section {
        padding: 15px;
        margin: 15px 0;
    }

    .rules-section h3 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }

    .rule-item {
        padding: 10px;
        gap: 10px;
    }

    .rule-number {
        width: 25px;
        height: 25px;
        font-size: 0.9em;
    }

    .rule-text {
        font-size: 0.85em;
    }

    .reset-button {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    footer {
        margin-top: 15px;
        font-size: 0.8em;
    }
}

/* 超小屏幕优化 */
@media (max-width: 375px) {
    .container {
        padding: 8px 3px;
        margin: 3px;
    }

    h1 {
        font-size: 1.3em;
    }

    .subtitle {
        font-size: 0.8em;
    }

    .info {
        padding: 8px;
        margin-bottom: 10px;
    }

    .info p {
        font-size: 0.8em;
    }

    .scratch-cards {
        margin: 10px 0;
    }

    .card-row {
        gap: 6px;
        margin-bottom: 6px;
    }

    .scratch-card {
        width: 80px;
        height: 95px;
    }

    .scratch-canvas {
        width: 80px;
        height: 95px;
    }

    .lucky-word {
        font-size: 1.4em;
        margin-top: 3px;
    }

    .prize-amount {
        font-size: 0.8em;
    }

    .prize-type {
        font-size: 0.65em;
    }

    .prize-content {
        padding: 8px 0;
    }

    .reset-button {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    .rules-section {
        padding: 12px;
        margin: 12px 0;
    }

    .rules-section h3 {
        font-size: 1.1em;
        margin-bottom: 12px;
    }

    .rule-item {
        padding: 8px;
        gap: 8px;
    }

    .rule-number {
        width: 22px;
        height: 22px;
        font-size: 0.8em;
    }

    .rule-text {
        font-size: 0.8em;
    }

    footer {
        margin-top: 10px;
        font-size: 0.7em;
    }
}