/* 趣味互动页面基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Comic Sans MS", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #fffae6;
    color: #4a4a4a;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* 顶部欢迎区 */
.hero-section {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    padding: 50px 20px 40px;
    text-align: center;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
    position: relative;
}

.hero-content h1 {
    font-size: 28px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 10px;
}

.hero-content p {
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
}

.hero-character {
    font-size: 60px;
    margin-top: 15px;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* 主体容器 */
.interactive-container {
    padding: 20px;
    margin-top: -20px;
}

/* 游戏化卡片 */
.game-card {
    background: #fff;
    border-radius: 20px;
    padding: 24px 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border: 3px solid #fff;
    transition: transform 0.3s;
}

.card-title {
    font-size: 18px;
    color: #ff6b6b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-desc {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

/* 模块一：旅行日记 (打卡路径) */
.journey-path {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.journey-line {
    flex-grow: 1;
    height: 4px;
    background-color: #eee;
    margin: 0 5px;
    border-radius: 2px;
    position: relative;
    top: -12px;
}

.journey-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: 60px;
    user-select: none;
    touch-action: manipulation;
}

.node-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    margin-bottom: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 0 #ccc;
}

.journey-node:active .node-icon {
    transform: translateY(4px);
    box-shadow: 0 0 0 #ccc;
}

.node-text {
    font-size: 12px;
    color: #999;
    text-align: center;
    line-height: 1.2;
}

.journey-node.unlocked .node-icon {
    background-color: #ffcf70;
    box-shadow: 0 4px 0 #e6b24d;
    animation: popIn 0.5s;
}

.journey-node.unlocked .node-text {
    color: #d49514;
    font-weight: bold;
}

@keyframes popIn {
    0% { transform: scale(0.5); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.story-board {
    background: #fff9e6;
    border: 2px dashed #ffcf70;
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
    animation: fadeIn 0.3s;
}

.story-board h3 {
    color: #d49514;
    font-size: 16px;
    margin-bottom: 5px;
}

.story-board p {
    color: #666;
    font-size: 14px;
}

/* 模块二：检测仪 */
.scanner-area {
    text-align: center;
    margin: 20px 0;
}

.scan-btn {
    background: #4facfe;
    color: white;
    border: none;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 8px 0 #2b8ee3, 0 15px 20px rgba(79, 172, 254, 0.4);
    cursor: pointer;
    outline: none;
    transition: all 0.1s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

.scan-btn:active, .scan-btn.active {
    transform: translateY(8px);
    box-shadow: 0 0 0 #2b8ee3, 0 5px 10px rgba(79, 172, 254, 0.4);
    background: #399df3;
}

.scan-progress-bar {
    width: 100%;
    height: 12px;
    background: #eee;
    border-radius: 6px;
    margin-top: 30px;
    overflow: hidden;
}

.scan-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    transition: width 0.1s linear;
}

.scan-result {
    text-align: center;
    margin-top: 20px;
    animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-score {
    font-size: 48px;
    font-weight: 900;
    color: #4facfe;
    line-height: 1;
}

.result-score .unit {
    font-size: 20px;
}

.result-text {
    font-size: 14px;
    color: #666;
    margin: 10px 0;
}

.result-badge {
    display: inline-block;
    background: #e1f5fe;
    color: #1565c0;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

/* 模块三：成就证书 */
.certificate {
    background: linear-gradient(135deg, #fff6b7 0%, #f6d365 100%);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 2px solid #ffd700;
    position: relative;
    overflow: hidden;
}

.cert-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.certificate h3 {
    color: #d35400;
    font-size: 20px;
    margin-bottom: 10px;
}

.certificate p {
    color: #8c6b14;
    font-size: 14px;
    font-weight: 500;
}

.certificate .cert-sub {
    font-size: 12px;
    color: #a8852a;
    margin-top: 5px;
    font-weight: normal;
}

/* 底部按钮 */
.action-footer {
    text-align: center;
    margin: 30px 0;
}

/* --- 复杂化模块样式：原产地风情 --- */
.tourism-explore-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.explore-item {
    display: flex;
    align-items: center;
    background: #fff9e6;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #ffe8a1;
}

.explore-icon {
    font-size: 40px;
    margin-right: 15px;
}

.explore-info {
    flex-grow: 1;
}

.explore-info h4 {
    font-size: 15px;
    color: #d49514;
    margin-bottom: 5px;
}

.explore-info p {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.explore-progress-bg {
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.explore-progress-fill {
    height: 100%;
    background: #ffa726;
    width: 0%;
    transition: width 1s linear;
}

.explore-btn {
    background: #ffa726;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 0 #fb8c00;
    margin-left: 10px;
    font-size: 12px;
    min-width: 80px;
    touch-action: manipulation;
}

.explore-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #fb8c00;
}

.explore-btn:disabled {
    background: #ccc;
    box-shadow: 0 4px 0 #aaa;
    cursor: not-allowed;
}

.tourism-tip {
    font-size: 12px;
    color: #f57c00;
    margin-top: 15px;
    background: #fff3e0;
    padding: 8px;
    border-radius: 8px;
    text-align: center;
}

/* --- 复杂化模块样式：云养牛 --- */
.cow-game-area {
    background: linear-gradient(to bottom, #e0f7fa, #b2ebf2);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cow-avatar {
    font-size: 70px;
    display: inline-block;
    margin-bottom: 10px;
    transition: transform 0.3s;
}

.cow-avatar.happy {
    animation: bounce 0.5s ease-in-out;
}

.cow-avatar.eating {
    animation: eatShake 0.5s ease-in-out infinite alternate;
}

@keyframes eatShake {
    0% { transform: rotate(-10deg); }
    100% { transform: rotate(10deg); }
}

.cow-status {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 10px 15px;
    margin-bottom: 15px;
}

.status-bar {
    display: flex;
    align-items: center;
    margin: 5px 0;
    font-size: 12px;
    color: #555;
    font-weight: bold;
}

.status-bar span {
    width: 60px;
    text-align: left;
}

.bar-bg {
    flex-grow: 1;
    height: 10px;
    background: #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #66bb6a;
    transition: width 0.3s ease-out;
}

.bar-fill.bg-pink {
    background: #ff4081;
}

.cow-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.action-btn {
    background: #fff;
    border: 2px solid #00bcd4;
    color: #0097a7;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 0 #00bcd4;
    transition: all 0.1s;
    touch-action: manipulation;
}

.action-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #00bcd4;
}

.cow-message {
    font-size: 13px;
    color: #00838f;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.6);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 10px;
}

.inventory-bar {
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 12px;
    color: #333;
}

.inv-title {
    color: #555;
}

.milk-highlight {
    color: #1976d2;
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 10px;
}

.milk-production-area {
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 15px;
}

.milk-text {
    font-size: 12px;
    color: #0277bd;
    margin-bottom: 5px;
    font-weight: bold;
}

.bar-fill.bg-white {
    background: #fff;
    border: 1px solid #4fc3f7;
}

.btn-official {
    display: inline-block;
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(25, 118, 210, 0.4);
    transition: all 0.3s;
    touch-action: manipulation;
}

.btn-official:active {
    transform: scale(0.95);
}

.btn-back {
    display: inline-block;
    background: #fff;
    color: #ff6b6b;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.2);
    border: 2px solid #ff6b6b;
    transition: all 0.3s;
    touch-action: manipulation;
}

.btn-back:active {
    transform: scale(0.95);
}

/* 辅助类 */
.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
