:root {
    --cream: #fff5dc;
    --ink: #4a2b1d;
    --accent: #ff9f3f;
    --accent-deep: #e86d00;
    --mint: #b5f0e7;
    --mint-deep: #4cc5a8;
    --caramel: #ffd6a3;
    --shadow: rgba(180, 95, 30, 0.22);
    --surface: #fffaf0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 232, 188, 0.8), transparent 42%),
        radial-gradient(circle at 80% 10%, rgba(181, 240, 231, 0.65), transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(255, 214, 163, 0.7), transparent 45%),
        linear-gradient(180deg, #fff7e3 0%, #ffe8c6 50%, #ffe0b0 100%);
    min-height: 100vh;
}

.page {
    max-width: 980px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

.hero {
    text-align: center;
    padding: 32px 24px;
    border-radius: 20px;
    background: linear-gradient(140deg, #ffe0b6 0%, #fff6e3 50%, #ffd9a6 100%);
    border: 2px solid #ffcc8b;
    box-shadow: 0 12px 28px var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: -80px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.65), transparent 65%);
    opacity: 0.6;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fff;
    letter-spacing: 2px;
    font-size: 14px;
}

.hero h1 {
    margin: 16px 0 8px;
    font-size: 36px;
    color: #6b3b1b;
}

.hero p {
    margin: 0;
    font-size: 16px;
}

.panel {
    margin-top: 22px;
    background: var(--surface);
    border: 1px solid #ffd7a1;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(95, 45, 20, 0.08);
    padding: 18px 20px 22px;
}

.panel-title {
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
    font-size: 20px;
    color: var(--accent-deep);
    margin-bottom: 14px;
}

.panel-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gate-banner {
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid #ffd9a6;
    box-shadow: 0 8px 20px rgba(180, 95, 30, 0.18);
    object-fit: cover;
}

.input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #f2c58f;
    font-size: 15px;
    background: #fff8ec;
}

.file {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.file-input {
    position: absolute;
    left: -9999px;
}

.file-btn {
    padding: 10px 14px;
    border-radius: 10px;
    background: #ffd8a6;
    border: 1px solid #f2c58f;
    cursor: pointer;
}

.file-name {
    font-size: 13px;
    color: #7b5a3b;
}

.btn {
    padding: 12px 16px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
    cursor: pointer;
    background: #ffd8a6;
    color: #5a2f1a;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
    background: linear-gradient(135deg, #ffb347, #ff7a1a);
    color: #fff;
    box-shadow: 0 8px 16px rgba(255, 122, 26, 0.35);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.hint {
    color: #8a5a38;
    font-size: 13px;
}

.attempts {
    font-size: 14px;
    color: #7b4a2c;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 10px auto 16px;
}

.grid-item {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffe1b3, #fff0cf);
    border-radius: 12px;
    border: 1px solid #f6cc95;
    font-size: 14px;
    color: #3b2319;
    text-align: center;
    padding: 6px 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.grid-item.active {
    background: linear-gradient(135deg, #ff9f3f, #ff6d1a);
    color: #fff;
    transform: scale(1.04);
    box-shadow: 0 8px 16px rgba(255, 122, 26, 0.35);
}

.rules .rule {
    font-size: 14px;
    color: #6f3a28;
    line-height: 1.6;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(60, 30, 10, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
}

.modal-card {
    width: 100%;
    max-width: 380px;
    background: #fff8ec;
    border-radius: 18px;
    padding: 22px;
    border: 1px solid #ffd09a;
    text-align: center;
}

.modal-title {
    font-size: 20px;
    color: var(--accent-deep);
    margin-bottom: 10px;
}

.modal-body {
    font-size: 16px;
    color: #3a1f1a;
    margin-bottom: 12px;
}

.voucher-line {
    font-size: 14px;
    color: #6b3b1b;
    margin: 6px 0;
}

.voucher-list {
    margin-top: 8px;
    padding: 10px;
    border-radius: 12px;
    background: #fff3df;
    border: 1px solid #ffd7a1;
    max-height: 220px;
    overflow: auto;
}

.modal-media img {
    width: 160px;
    height: auto;
}

.countdown {
    font-size: 36px;
    font-weight: bold;
    letter-spacing: 2px;
    text-align: center;
    color: var(--accent-deep);
}

.hidden {
    display: none;
}

@media (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr;
    }
}
