:root {
    --gold: #f7c462;
    --red: #c61d2b;
    --deep: #3b0f18;
    --cream: #fff3d6;
    --ink: #2b1f1a;
}

* {
    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 15% 15%, rgba(255, 247, 223, 0.8), transparent 40%),
        radial-gradient(circle at 85% 20%, rgba(255, 205, 128, 0.6), transparent 45%),
        linear-gradient(180deg, #fff7e6 0%, #ffe2b5 35%, #ffd7b0 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, #fbe3b2 0%, #fff8e7 40%, #ffd3a5 100%);
    border: 2px solid #f6c982;
    box-shadow: 0 10px 30px rgba(61, 27, 27, 0.12);
    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: var(--red);
    color: #fff;
    letter-spacing: 2px;
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
    font-size: 14px;
}

.hero h1 {
    margin: 16px 0 8px;
    font-size: 36px;
    color: var(--deep);
}

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

.panel {
    margin-top: 22px;
    background: #fff9ee;
    border: 1px solid #f5d4a1;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(56, 25, 25, 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(--red);
    margin-bottom: 14px;
}

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

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

.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: #f1d29e;
    border: 1px solid #e8c27e;
    cursor: pointer;
}

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

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

.btn.primary {
    background: linear-gradient(135deg, #f04a4a, #b8172c);
    color: #fff;
    box-shadow: 0 8px 16px rgba(183, 23, 44, 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: #7b3f30;
}

.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, #f9d08c, #fde7bc);
    border-radius: 12px;
    border: 1px solid #f0c885;
    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, #f04a4a, #b8172c);
    color: #fff;
    transform: scale(1.04);
    box-shadow: 0 8px 16px rgba(183, 23, 44, 0.35);
}

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

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

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

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

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

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

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

.hidden {
    display: none;
}

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