/* 通用样式（继承 index.html 的风格） */
body {
    font-family: 'Segoe UI', sans-serif;
    background: #f5f7fa;
    color: #333;
    margin: 0;
    padding: 0;
    text-align: center;
}

header, section, footer {
    padding: 2em;
    text-align: center;
}

header {
    background: #4a90e2;
    color: white;
    animation: slideDown 1s ease-out forwards;
    transform: translateY(-100%);
    opacity: 0;
}

footer {
    font-size: 0.9em;
    background: #eee;
    color: #666;
    animation: slideUp 1s ease-out forwards;
    transform: translateY(100%);
    opacity: 0;
}

@keyframes slideDown {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 番茄区域 */
#tomato-img {
    width: 200px;
    height: 200px;
    margin: 20px auto;
    border-radius: 50%;
    transition: background 0.5s ease-in-out;
}

/* 红色随生长递增的渐变背景 */
.stage {
    background: radial-gradient(circle at 50% 50%, #eee, #ccc);
}

.stage-dead {
    background: #444 !important;
}

.stage[data-progress="10"]  { background: radial-gradient(circle, #f4eaea, #ccc); }
.stage[data-progress="20"]  { background: radial-gradient(circle, #fdd, #c99); }
.stage[data-progress="30"]  { background: radial-gradient(circle, #fbb, #c66); }
.stage[data-progress="40"]  { background: radial-gradient(circle, #f88, #c33); }
.stage[data-progress="50"]  { background: radial-gradient(circle, #f55, #b22); }
.stage[data-progress="60"]  { background: radial-gradient(circle, #f33, #900); }
.stage[data-progress="70"]  { background: radial-gradient(circle, #f11, #800); }
.stage[data-progress="80"]  { background: radial-gradient(circle, #e00, #700); }
.stage[data-progress="90"]  { background: radial-gradient(circle, #d00, #500); }
.stage[data-progress="100"] { background: radial-gradient(circle, #c00, #400); }

/* 成长进度条 */
.progress-container {
    width: 80%;
    max-width: 400px;
    height: 20px;
    background: #ddd;
    border-radius: 10px;
    margin: 20px auto;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(to right, #ff416c, #ff4b2b);
    transition: width 0.3s ease-in-out;
}

/* 控制按钮 */
button {
    margin: 0.5em;
    padding: 0.6em 1.2em;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    background: #4a90e2;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #357ab7;
}

/* 重新开始按钮 */
.reset-btn {
    margin-top: 1em;
    padding: 0.8em 1.5em;
    background: #e94e77;
    color: white;
    font-weight: bold;
    font-size: 1em;
}
.reset-btn:hover {
    background: #c03e61;
}

/* 返回主页按钮 */
.return-home {
    display: inline-block;
    margin-top: 1.5em;
    padding: 0.6em 1.2em;
    text-decoration: none;
    background: #4a90e2;
    color: white;
    border-radius: 8px;
    transition: background 0.3s ease;
}
.return-home:hover {
    background: #357ab7;
}

/* 弹出提示窗 */
#popup {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(255, 255, 255, 0.95);
    color: #e94e77;
    font-size: 1.2em;
    padding: 1em 2em;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.25);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 999;
    pointer-events: none;
}

#popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.hidden {
    display: none;
}

/* 移动端适配 */
@media screen and (max-width: 600px) {
    #tomato-img {
        width: 150px;
        height: 150px;
    }

    .progress-container {
        width: 90%;
    }

    button {
        width: 90%;
        margin: 0.4em auto;
        display: block;
    }
}
.progress-bar {
    position: relative;
    height: 100%;
    background: linear-gradient(to right, #ff416c, #ff4b2b);
    transition: width 0.3s ease-in-out;
}

#progress-text {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.9em;
    font-weight: bold;
    pointer-events: none;
}

@media screen and (max-width: 600px) {
    #progress-text {
        font-size: 0.8em;
        right: 6px;
    }
}
