/* ============================================
   QQ农场计时器 - 样式（已修正效率页面布局）
   ============================================ */

/* === 基础变量 === */
:root {
    --bg-primary: #f0f7e6;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #2d5016;
    --text-secondary: #5a7a42;
    --text-muted: #8ba87a;
    --accent-green: #4CAF50;
    --accent-light: #81C784;
    --accent-dark: #2E7D32;
    --accent-yellow: #FFC107;
    --accent-orange: #FF9800;
    --accent-red: #f44336;
    --border: #d4e8c2;
    --shadow: rgba(45, 80, 22, 0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --header-sticky-height: 68px;
    --tab-sticky-height: 44px;
    --plant-sticky-top: calc(var(--header-sticky-height) + var(--tab-sticky-height));
}

/* === 全局样式 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(76, 175, 80, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 193, 7, 0.08) 0%, transparent 50%);
}

#app {
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 20px;
}

/* === 顶部 === */
.app-header {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.app-header h1 {
    flex: 1;
    min-width: 0;
    font-size: 20px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-bubble-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    min-height: 36px;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    color: white;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    backdrop-filter: blur(6px);
}

.header-bubble-btn:hover {
    background: rgba(255,255,255,0.28);
}

.share-header-btn,
.settings-btn {
    width: 36px;
    min-width: 36px;
    padding: 0;
}

.share-header-btn {
    font-size: 18px;
}

.install-header-btn {
    min-width: 78px;
    padding: 0 12px;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.install-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.install-icon-svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.install-header-btn .install-btn-text {
    display: inline-block;
    line-height: 1;
}

.settings-btn {
    font-size: 18px;
}

.settings-btn:hover {
    transform: rotate(90deg);
}

/* === 标签导航 === */
.tab-nav {
    display: flex;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: var(--header-sticky-height);
    z-index: 99;
    box-shadow: 0 1px 4px var(--shadow);
}

.tab-btn {
    flex: 1;
    padding: 12px 4px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.tab-btn.active {
    color: var(--accent-dark);
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--accent-green);
    border-radius: 3px 3px 0 0;
}

.tab-btn:hover {
    color: var(--accent-dark);
    background: rgba(76, 175, 80, 0.05);
}

/* === 标签内容 === */
.tab-content {
    display: none;
    padding: 12px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* === 卡片 === */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px var(--shadow);
    border: 1px solid var(--border);
}

.card h2 {
    font-size: 17px;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* === 时间选择器 === */
.time-picker {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 16px 0 12px;
}

.wheel-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.wheel-btn {
    width: 48px;
    height: 28px;
    border: none;
    background: var(--bg-primary);
    color: var(--accent-dark);
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.wheel-btn:hover {
    background: var(--accent-light);
    color: white;
}

.wheel-btn:active {
    transform: scale(0.92);
}

.wheel-display {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-primary);
    border-radius: 12px;
    transition: all 0.15s;
    user-select: none;
}

.wheel-input {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-primary);
    border-radius: 12px;
    transition: all 0.15s;
    text-align: center;
    border: 2px solid transparent;
    outline: none;
    -moz-appearance: textfield;
}

.wheel-input::-webkit-outer-spin-button,
.wheel-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wheel-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.wheel-input:hover {
    border-color: rgba(76, 175, 80, 0.3);
}

.wheel-sep {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 20px;
}

/* === 快捷时间 === */
.quick-times {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 14px;
}

.quick-times button {
    padding: 9px 6px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.quick-times button:hover {
    border-color: var(--accent-green);
    color: var(--accent-dark);
    background: rgba(76, 175, 80, 0.08);
    transform: translateY(-1px);
}

.quick-times button:active {
    transform: scale(0.95);
}

/* === 主按钮 === */
.primary-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.secondary-btn {
    padding: 10px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    border-color: var(--accent-green);
    color: var(--accent-dark);
}

.secondary-btn:disabled,
.install-header-btn:disabled {
    opacity: 0.65;
    cursor: default;
}

.install-pwa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    width: auto;
    padding: 8px 12px;
    border-radius: 10px;
    border-color: rgba(76, 175, 80, 0.18);
    background: rgba(255,255,255,0.92);
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 600;
    box-shadow: none;
}

.install-pwa-btn .install-btn-icon {
    font-size: 14px;
}

.install-pwa-btn .install-btn-copy {
    font-weight: 600;
    letter-spacing: 0.1px;
    line-height: 1;
}

.install-pwa-btn:disabled {
    background: rgba(255,255,255,0.82);
    border-color: rgba(76, 175, 80, 0.12);
    color: var(--text-secondary);
}

.danger-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent-red);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.danger-btn:hover {
    opacity: 0.9;
}

/* === 定时器项 === */
.timer-item {
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    position: relative;
}

.timer-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.timer-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(76, 175, 80, 0.14);
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
}

.timer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.timer-label {
    font-weight: 600;
    font-size: 14px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timer-remaining {
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent-dark);
    flex-shrink: 0;
}

.progress-bar {
    height: 6px;
    background: rgba(76, 175, 80, 0.15);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 3px;
    transition: width 1s linear;
}

.timer-end-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.cancel-btn {
    padding: 4px 12px;
    border: 1px solid var(--accent-red);
    border-radius: 6px;
    background: white;
    color: var(--accent-red);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cancel-btn:hover {
    background: var(--accent-red);
    color: white;
}

/* === 植物网格 === */
.plant-search {
    margin-bottom: 12px;
}

/* === 土地类型选择器 === */
.plant-sticky-tools {
    position: sticky;
    top: var(--plant-sticky-top);
    z-index: 25;
    margin: 0 0 12px;
    padding: 10px 12px 12px;
    background: linear-gradient(180deg, rgba(240, 247, 230, 0.98) 0%, rgba(240, 247, 230, 0.94) 100%);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 232, 194, 0.9);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(45, 80, 22, 0.08);
}

.land-selector {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 8px;
}

.land-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.land-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
}

.land-btn {
    padding: 7px 4px;
    border: 2px solid var(--border);
    border-radius: 16px;
    background: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    text-align: center;
}

.land-btn:hover {
    border-color: var(--accent-green);
    background: rgba(76, 175, 80, 0.06);
}

.land-btn.active {
    border-color: var(--accent-green);
    background: rgba(76, 175, 80, 0.15);
    color: var(--accent-dark);
    font-weight: 600;
}

.land-info {
    margin-bottom: 12px;
}

.land-bonus {
    font-size: 12px;
    color: var(--text-muted);
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-primary);
    border-radius: 10px;
}

.land-filter-note {
    display: none;
}

.plant-search input {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.plant-search input:focus {
    border-color: var(--accent-green);
}

.plant-search input::placeholder {
    color: var(--text-muted);
}

.plant-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.plant-card {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.plant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
    border-color: var(--accent-green);
}

.plant-card:active {
    transform: scale(0.96);
}

.plant-card.highlight-plant {
    animation: highlightPulse 2s ease-in-out;
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

@keyframes highlightPulse {
    0%, 100% {
        border-color: #FFD700;
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
        transform: scale(1);
    }
    50% {
        border-color: #FFA500;
        box-shadow: 0 0 30px rgba(255, 165, 0, 0.7);
        transform: scale(1.05);
    }
}

.plant-name {
    width: 100%;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.plant-time {
    width: 100%;
    font-size: 11px;
    color: var(--accent-dark);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.plant-level {
    width: 100%;
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    line-height: 1.2;
}

/* 修改后的 plant-profit，支持垂直排列两行数据 */
.plant-profit {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    font-size: 10px;
    margin-top: auto;
    line-height: 1.2;
}

.plant-profit .coin {
    color: var(--accent-orange);
    white-space: nowrap;
}

/* 新增 stat-row 样式，用于每小时经验/收入 */
.stat-row {
    color: var(--accent-dark);
    white-space: nowrap;
    font-size: 10px;
}

/* === 植物卡片季次标签 === */
.plant-seasons {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 16px;
    font-size: 10px;
    color: var(--accent-dark);
    font-weight: 500;
    background: rgba(76, 175, 80, 0.1);
    padding: 1px 4px;
    border-radius: 6px;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.plant-seasons.is-placeholder {
    visibility: hidden;
}

/* === 自定义种植 === */
.custom-plant-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-plant-form input[type="text"] {
    min-height: 44px;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    background: var(--bg-primary);
}

.custom-plant-form input[type="text"]:focus {
    border-color: var(--accent-green);
}

.season-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
}

.season-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.season-counter {
    flex-shrink: 0;
}

.season-hint {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    font-size: 12px;
    color: var(--accent-dark);
    background: rgba(76, 175, 80, 0.1);
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

.season-hint:empty {
    visibility: hidden;
}

.custom-plants-list {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.custom-plants-list h3 {
    font-size: 15px;
    margin-bottom: 10px;
}

.custom-plant-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    gap: 8px;
}

.custom-plant-info {
    flex: 1;
    min-width: 0;
}

.custom-plant-name {
    font-size: 14px;
    font-weight: 600;
    display: block;
}

.custom-plant-detail {
    font-size: 12px;
    color: var(--text-muted);
}

.custom-plant-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.time-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}

.time-input-row input {
    width: 70px;
    min-height: 44px;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    text-align: center;
    outline: none;
    background: var(--bg-primary);
}

.time-input-row input:focus {
    border-color: var(--accent-green);
}

.time-input-row span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text-muted);
    font-size: 14px;
}

.hint-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

.remove-entry {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(244, 67, 54, 0.1);
    color: var(--accent-red);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-entry:hover {
    background: var(--accent-red);
    color: white;
}

/* === 睡眠方案 === */
.sleep-form {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.form-row label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-row input[type="time"] {
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-primary);
    outline: none;
}

.form-row input[type="time"]:focus {
    border-color: var(--accent-green);
}

.counter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.counter button {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    font-size: 18px;
    color: var(--accent-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.counter button:hover {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
}

.counter input {
    width: 40px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--text-primary);
    outline: none;
}

/* === 睡眠方案结果 === */
.sleep-plan-result {
    animation: fadeIn 0.5s ease;
}

.plan-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.plan-stat {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.plan-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.plan-section:last-child {
    border-bottom: none;
}

.plan-section h3 {
    font-size: 15px;
    margin-bottom: 6px;
}

.plan-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.plan-plant-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.plan-plant-emoji {
    font-size: 36px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.plan-plant-card strong {
    display: block;
    font-size: 15px;
}

.plan-plant-detail {
    font-size: 12px;
    color: var(--text-muted);
}

.small-btn {
    margin-left: auto;
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: var(--accent-green);
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.small-btn:hover {
    background: var(--accent-dark);
}

.plan-rounds {
    margin-top: 8px;
    padding-left: 12px;
}

.round-item {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0;
    border-left: 3px solid var(--accent-green);
    padding-left: 10px;
    margin-bottom: 4px;
}

.recommendations {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rec-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 10px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.rec-item.best {
    border-color: var(--accent-yellow);
    background: rgba(255, 193, 7, 0.08);
}

.rec-rank {
    font-size: 20px;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.rec-info {
    flex: 1;
    min-width: 0;
}

.rec-info strong {
    font-size: 14px;
    display: block;
}

.rec-info span {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}

.rec-eval {
    color: var(--accent-dark) !important;
    font-weight: 500;
    margin-top: 2px;
}

.plan-note {
    background: rgba(255, 193, 7, 0.08);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === 闹钟列表 === */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-text {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-size: 14px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.alert-item.active {
    border-left: 4px solid var(--accent-green);
}

.timer-feed-item {
    padding: 0;
    background: transparent;
    border-radius: 0;
    border-left: none;
}

.timer-feed-item.active {
    border-left: none;
}

.timer-feed-item .timer-item {
    width: 100%;
    margin-bottom: 0;
    border-left: 4px solid var(--accent-green);
}

.alert-item.history {
    cursor: pointer;
}

.alert-item.history:hover {
    background: var(--bg-secondary);
    box-shadow: 0 2px 8px var(--shadow);
    transform: translateY(-1px);
}

.alert-item.expired {
    opacity: 0.5;
}

.alert-status {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.alert-info {
    flex: 1;
    min-width: 0;
}

.alert-label {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alert-time {
    font-size: 12px;
    color: var(--text-muted);
}

.alert-cancel {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(244, 67, 54, 0.1);
    color: var(--accent-red);
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.alert-cancel:hover {
    background: var(--accent-red);
    color: white;
}

.alert-restart {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(76, 175, 80, 0.1);
    color: var(--accent-green);
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}

.alert-restart:hover {
    background: var(--accent-green);
    color: white;
}

/* === 历史记录 === */
.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-header h2 {
    margin: 0;
}

.history-count {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 3px 10px;
    border-radius: 10px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.history-date-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 10px 4px 4px;
    border-bottom: 1px solid var(--border);
    margin-top: 6px;
}

.history-date-label:first-child {
    margin-top: 0;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.history-item:hover {
    background: var(--bg-secondary);
    box-shadow: 0 2px 8px var(--shadow);
    transform: translateY(-1px);
}

.history-item:active {
    transform: scale(0.98);
}

.history-icon {
    font-size: 22px;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(76, 175, 80, 0.08);
    border-radius: 10px;
}

.history-info {
    flex: 1;
    min-width: 0;
}

.history-label {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    margin-top: 2px;
}

.history-restart {
    font-size: 18px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.history-item:hover .history-restart {
    opacity: 1;
}

.history-clear-wrap {
    margin-top: 16px;
    text-align: center;
}

/* === 设置弹窗 === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.setting-item.anchor-highlight {
    border-radius: 14px;
    background: rgba(255, 193, 7, 0.14);
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.28);
    padding: 10px 12px;
    margin-left: -12px;
    margin-right: -12px;
    animation: anchorPulse 1.2s ease 2;
}

@keyframes anchorPulse {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.16);
        background: rgba(255, 193, 7, 0.08);
    }
    50% {
        box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.36);
        background: rgba(255, 193, 7, 0.18);
    }
}

.modal {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    width: 100%;
    max-width: 360px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal h2 {
    font-size: 18px;
    margin-bottom: 20px;
}

.setting-item {
    margin-bottom: 16px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.setting-item label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.setting-item input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-green);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.setting-item select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
}

.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-green);
}

/* === 闹钟弹窗 === */
.alarm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    animation: alarmPulse 0.5s ease infinite alternate;
}

@keyframes alarmPulse {
    from { background: rgba(244, 67, 54, 0.7); }
    to { background: rgba(0,0,0,0.7); }
}

.alarm-popup {
    background: white;
    border-radius: 24px;
    padding: 40px 32px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.alarm-icon {
    font-size: 64px;
    animation: shake 0.5s ease infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.alarm-popup h2 {
    font-size: 22px;
    margin: 12px 0 8px;
    color: var(--accent-red);
}

.alarm-popup p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.alarm-dismiss {
    font-size: 18px;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-red), #c62828) !important;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

/* === Toast提示 === */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 400;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    max-width: 90%;
    text-align: center;
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* === 版本更新提示 === */
.toast-update {
    bottom: 80px;
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
    padding: 14px 20px;
    border-radius: 16px;
    max-width: calc(100% - 32px);
    white-space: normal;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.toast-icon {
    font-size: 18px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.toast-action {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.toast-action:hover {
    background: rgba(255, 255, 255, 0.35);
}

.toast-close {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.15);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* === 响应式 === */
@media (max-width: 360px) {
    .app-header {
        padding: 14px 16px;
    }

    .app-header h1 {
        font-size: 17px;
    }

    .install-header-btn {
        width: 30px;
        height: 30px;
    }

    .install-pwa-btn {
        width: 100%;
        justify-content: center;
    }

    .pwa-entry {
        padding: 12px;
    }

    .plant-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
    }

    .plant-card {
        padding: 6px 2px;
        min-height: 122px;
    }

    .plant-emoji {
        font-size: 24px;
    }

    .plant-name,
    .plant-time,
    .plant-level,
    .plant-profit,
    .plant-seasons {
        font-size: 9px;
    }

    .plant-seasons {
        min-height: 14px;
        padding-inline: 2px;
    }
    
    .wheel-display {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .wheel-btn {
        width: 40px;
        height: 24px;
    }

    .quick-times {
        gap: 6px;
    }

    .quick-times button,
    .land-btn {
        font-size: 11px;
        padding: 7px 2px;
    }
}

@media (min-width: 481px) {
    body {
        background: #e8f0d8;
    }
    
    #app {
        box-shadow: 0 0 30px rgba(0,0,0,0.1);
        background: var(--bg-primary);
        min-height: 100vh;
    }
}

/* === 滚动条美化 === */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* === 背景装饰粒子 === */
.bg-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    opacity: 0.15;
    animation: floatParticle linear infinite;
}

.p1 { font-size: 24px; left: 10%; animation-duration: 20s; animation-delay: 0s; }
.p2 { font-size: 18px; left: 30%; animation-duration: 25s; animation-delay: -5s; }
.p3 { font-size: 16px; left: 55%; animation-duration: 22s; animation-delay: -10s; }
.p4 { font-size: 20px; left: 75%; animation-duration: 28s; animation-delay: -15s; }
.p5 { font-size: 14px; left: 90%; animation-duration: 18s; animation-delay: -8s; }

@keyframes floatParticle {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* === 通知引导弹窗 === */
.notify-guide-dialog {
    background: white;
    border-radius: 24px;
    padding: 24px;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.22);
    animation: fadeIn 0.2s ease;
}

.notify-guide-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.16), rgba(255, 193, 7, 0.18));
    font-size: 28px;
}

.notify-guide-dialog h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.notify-guide-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.notify-guide-steps {
    margin: 14px 0 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.notify-guide-steps li + li {
    margin-top: 6px;
}

.notify-guide-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.notify-guide-actions button {
    width: auto;
    flex: 1;
}

.notify-guide-note {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(76, 175, 80, 0.08);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.6;
}

/* === 确认弹窗 === */
.confirm-dialog {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: fadeIn 0.2s ease;
}

.confirm-dialog h3 {
    font-size: 18px;
    margin-bottom: 12px;
    text-align: center;
}

.confirm-body {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.confirm-body span {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--accent-dark);
    background: rgba(76, 175, 80, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
}

.confirm-body strong {
    color: var(--text-primary);
}

.confirm-body small {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
}

/* === 种植确认弹窗 - 多季详情 === */
.seasons-detail {
    margin-top: 12px;
    padding: 10px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    text-align: left;
}

.seasons-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-align: center;
}

.season-row {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 3px 0;
    padding-left: 8px;
    border-left: 3px solid var(--accent-light);
    margin-bottom: 3px;
}

.season-row strong {
    color: var(--accent-dark);
}

.seasons-total {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
}

.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-actions .primary-btn {
    width: auto;
    flex: 1;
}

.confirm-actions .secondary-btn {
    flex: 1;
}

/* === 进度条颜色变化 === */
.progress-fill.complete {
    background: linear-gradient(90deg, var(--accent-yellow), var(--accent-orange));
}

/* === 暗色模式适配 === */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a2e12;
        --bg-secondary: #223318;
        --bg-card: #2a3d1e;
        --text-primary: #d4e8c2;
        --text-secondary: #a8c490;
        --text-muted: #6d8a5e;
        --border: #3d5a2e;
        --shadow: rgba(0, 0, 0, 0.3);
    }
    
    body {
        background-image: 
            radial-gradient(circle at 20% 80%, rgba(76, 175, 80, 0.05) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(255, 193, 7, 0.05) 0%, transparent 50%);
    }
    
    .modal, .confirm-dialog, .alarm-popup, .notify-guide-dialog {
        background: var(--bg-card);
        color: var(--text-primary);
    }
    
    .config-input {
        background: var(--bg-primary);
        color: var(--text-primary);
        border-color: var(--border);
    }

    .plant-sticky-tools {
        background: linear-gradient(180deg, rgba(26, 46, 18, 0.96) 0%, rgba(26, 46, 18, 0.92) 100%);
        border-bottom-color: rgba(61, 90, 46, 0.9);
    }

    .quick-times button,
    .land-btn,
    .secondary-btn,
    .install-pwa-btn,
    .sync-btn,
    .counter button {
        background: linear-gradient(180deg, rgba(52, 72, 40, 0.96) 0%, rgba(34, 49, 26, 0.96) 100%);
        border-color: rgba(129, 199, 132, 0.34);
        color: #dceecd;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    .quick-times button:hover,
    .land-btn:hover,
    .secondary-btn:hover,
    .install-pwa-btn:hover,
    .sync-btn:hover,
    .counter button:hover {
        background: linear-gradient(180deg, rgba(71, 104, 54, 0.98) 0%, rgba(49, 75, 38, 0.98) 100%);
        border-color: rgba(129, 199, 132, 0.58);
        color: #f7fff0;
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }

    .land-btn.active {
        background: linear-gradient(135deg, rgba(88, 139, 66, 0.92) 0%, rgba(55, 90, 42, 0.98) 100%);
        border-color: rgba(166, 223, 150, 0.72);
        color: #f8fff3;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    }

    .voice-btn {
        background: linear-gradient(180deg, rgba(49, 68, 38, 0.98) 0%, rgba(32, 46, 24, 0.98) 100%);
        border-color: rgba(129, 199, 132, 0.32);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    .setting-item.anchor-highlight {
        background: rgba(255, 193, 7, 0.18);
    }
}

/* === 云同步样式 === */
.setting-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

.pwa-entry {
    padding: 12px 14px;
    border: 1px solid rgba(76, 175, 80, 0.12);
    border-radius: 12px;
    background: rgba(76, 175, 80, 0.05);
}

.pwa-entry .setting-row label {
    margin-bottom: 0;
    color: var(--text-primary);
}

.pwa-install-desc {
    margin: 6px 0 10px;
}

.pwa-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: var(--accent-dark);
    background: rgba(76, 175, 80, 0.12);
}

.pwa-badge.muted {
    color: var(--text-muted);
    background: rgba(139, 168, 122, 0.16);
}

.pwa-badge.installed {
    color: #1f6a27;
    background: rgba(76, 175, 80, 0.2);
}

.sync-status {
    display: inline-block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(139, 168, 122, 0.15);
}

.sync-status.connected {
    color: var(--accent-dark);
    background: rgba(76, 175, 80, 0.1);
}

.sync-status.status-success {
    color: #2e7d32;
    background: rgba(76, 175, 80, 0.15);
}

.sync-status.status-warning {
    color: #f57c00;
    background: rgba(255, 152, 0, 0.1);
}

.sync-status.status-error {
    color: #c62828;
    background: rgba(244, 67, 54, 0.1);
}

.sync-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 4px;
}

.status-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(139, 168, 122, 0.15);
    color: var(--text-muted);
    font-weight: 500;
    vertical-align: middle;
}

.status-badge.connected {
    background: rgba(76, 175, 80, 0.15);
    color: var(--accent-dark);
}

.config-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: 'SF Mono', 'Menlo', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.config-input:focus {
    border-color: var(--accent-green);
}

.config-input::placeholder {
    color: var(--text-muted);
    font-family: inherit;
}

.config-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.config-hint a {
    color: var(--accent-green);
    text-decoration: none;
}

.config-hint a:hover {
    text-decoration: underline;
}

.sync-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sync-actions button {
    width: 100%;
}

.config-transfer-entry {
    padding: 12px 14px;
    border: 1px dashed rgba(76, 175, 80, 0.24);
    border-radius: 12px;
    background: rgba(76, 175, 80, 0.04);
}

.config-transfer-entry .setting-row label {
    margin-bottom: 0;
    color: var(--text-primary);
}

.config-transfer-hint {
    margin: 6px 0 12px;
    line-height: 1.6;
}

.config-transfer-actions {
    margin-top: 6px;
}

.sync-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 13px;
}

.sync-btn {
    padding: 6px 14px;
    border: 2px solid var(--accent-green);
    border-radius: 8px;
    background: transparent;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.sync-btn:hover {
    background: var(--accent-green);
    color: white;
}

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

/* === 分析页面样式（已修正布局和省略号问题） === */
.farm-level-selector {
    margin: 16px 0;
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.farm-level-selector label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.help-btn {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.help-btn:hover {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
    transform: scale(1.1);
}

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

.level-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.level-input-wrapper input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.level-input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-green);
}

.level-buttons {
    display: flex;
    gap: 4px;
}

.level-btn {
    width: 40px;
    height: 42px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.level-btn:hover {
    background: var(--accent-green);
    color: white;
    border-color: var(--accent-green);
}

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

.analysis-controls {
    margin: 16px 0;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.control-group {
    margin-bottom: 12px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.control-group .sort-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group select {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s;
}

.control-group select:focus {
    outline: none;
    border-color: var(--accent-green);
}

.analysis-result {
    margin-top: 20px;
}

.analysis-summary {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-light));
    border-radius: var(--radius-sm);
    color: white;
}

.summary-item {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.summary-label {
    font-size: 12px;
    opacity: 0.9;
}

.summary-value {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.summary-sub {
    font-size: 11px;
    opacity: 0.85;
}

.summary-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.3);
}

/* 修改分析卡片布局：移除 emoji 列，改为排名、植物信息、统计 */
.analysis-plant-card {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.analysis-plant-card:hover {
    border-color: var(--accent-green);
    transform: translateX(2px);
    box-shadow: 0 2px 8px var(--shadow);
}

.analysis-plant-rank {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    color: var(--accent-yellow);
    min-width: 32px;
}

/* 移除 analysis-plant-emoji 相关样式（不再使用） */

.analysis-plant-info {
    flex: 1;
    min-width: 0; /* 防止溢出 */
}

/* 植物名称：允许换行，不截断 */
.analysis-plant-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    word-break: break-word;
    line-height: 1.3;
}

.plant-seasons {
    display: inline-block;
    background: var(--accent-light);
    color: white;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    margin-left: 4px;
    vertical-align: middle;
}

/* 时间显示：允许换行，设置合适最大宽度 */
.analysis-plant-time {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
    max-width: 130px;
}

/* 收益和经验区域，靠右对齐 */
.analysis-plant-stats {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 55px;
}

.stat-item.income .stat-value {
    color: var(--accent-green);
    font-weight: 600;
}

.stat-item.exp .stat-value {
    color: var(--accent-yellow);
    font-weight: 600;
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.stat-value {
    font-size: 13px;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .analysis-plant-card {
        grid-template-columns: 28px 1fr auto;
        gap: 8px;
        padding: 10px;
    }

    .analysis-plant-rank {
        font-size: 14px;
        min-width: 28px;
    }

    .analysis-plant-name {
        font-size: 13px;
    }

    .analysis-plant-time {
        font-size: 11px;
        max-width: 110px;
    }

    .analysis-plant-stats {
        gap: 10px;
    }

    .stat-item {
        min-width: 50px;
    }

    .stat-value {
        font-size: 12px;
    }

    .stat-label {
        font-size: 9px;
    }

    .summary-label {
        font-size: 11px;
    }

    .summary-value {
        font-size: 13px;
    }

    .summary-sub {
        font-size: 10px;
    }
}

/* === 帮助弹窗样式 === */
.help-modal {
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.help-modal h2 {
    margin-bottom: 16px;
    font-size: 20px;
}

.help-content {
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 16px;
}

.help-section {
    margin-bottom: 20px;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h3 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.help-section p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 6px;
}

.help-section .formula {
    font-size: 13px;
    color: var(--accent-dark);
    background: var(--bg-primary);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid var(--accent-green);
    margin: 8px 0;
    font-family: 'Courier New', monospace;
}

.help-section ul {
    margin: 8px 0;
    padding-left: 20px;
}

.help-section li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 6px;
}

.help-section li strong {
    color: var(--text-primary);
}

.help-divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .help-modal {
        max-width: 90vw;
        max-height: 85vh;
    }

    .help-content {
        max-height: 70vh;
    }

    .help-section h3 {
        font-size: 15px;
    }

    .help-section p,
    .help-section li {
        font-size: 13px;
    }
}

/* === 云同步帮助样式 === */
.sync-help-modal {
    max-width: 580px;
    max-height: 85vh;
}

.sync-help-modal .help-content {
    max-height: 65vh;
}

/* 步骤列表 */
.step-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-light));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.step-content h4 {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.step-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}

/* 模拟浏览器界面 */
.step-image {
    margin: 12px 0;
}

.mock-browser {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.browser-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

.browser-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.browser-dot.red {
    background: #ff5f57;
}

.browser-dot.yellow {
    background: #ffbd2e;
}

.browser-dot.green {
    background: #28c840;
}

.browser-url {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: #888;
    font-family: 'Courier New', monospace;
}

.browser-content {
    padding: 16px;
    min-height: 120px;
}

/* Token 创建表单模拟 */
.token-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-row {
    margin-bottom: 12px;
}

.form-row label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

/* 网址复制框 */
.url-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-primary);
    border: 2px solid var(--accent-green);
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
}

.url-box code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--accent-dark);
    word-break: break-all;
    line-height: 1.4;
}

.copy-url-btn {
    flex-shrink: 0;
    background: var(--accent-green);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-url-btn:hover {
    background: var(--accent-light);
}

/* 警告提示 */
.step-warning {
    padding: 10px 12px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 6px;
    border-left: 3px solid #ff9800;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.step-warning strong {
    color: #ff9800;
}

.form-input {
    background: #3d3d3d;
    border: 1px solid #4d4d4d;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    color: #f0f0f0;
}

.form-select {
    background: #3d3d3d;
    border: 1px solid #4d4d4d;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    color: #f0f0f0;
    display: inline-block;
}

.form-row.highlight {
    background: rgba(76, 175, 80, 0.1);
    border-radius: 6px;
    padding: 8px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox {
    width: 18px;
    height: 18px;
    background: var(--accent-green);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.form-action {
    margin-top: 16px;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
}

.btn.primary {
    background: #238636;
    color: white;
}

/* Server酱 首页模拟 */
.serverchan-home {
    max-width: 400px;
    margin: 0 auto;
}

.login-section {
    text-align: center;
    margin-bottom: 20px;
}

.login-hint {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

.github-login-btn {
    background: #24292e;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.github-icon {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #24292e;
}

.sendkey-section {
    background: #f6f8fa;
    border-radius: 8px;
    padding: 16px;
}

.sendkey-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.sendkey-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sendkey-value code {
    flex: 1;
    background: white;
    padding: 10px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #24292e;
    word-break: break-all;
}

.copy-btn {
    font-size: 14px;
    cursor: pointer;
}

.sendkey-hint {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

/* 配置流程演示 */
.config-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: 12px;
}

.config-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 300px;
}

.config-step.success {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border-color: transparent;
    color: white;
}

.config-number {
    width: 28px;
    height: 28px;
    background: var(--accent-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.config-step.success .config-number {
    background: rgba(255, 255, 255, 0.25);
}

.config-text {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

.config-arrow {
    color: var(--accent-green);
    font-size: 16px;
}

/* 步骤提示 */
.step-note {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 6px;
    border-left: 3px solid var(--accent-green);
    font-size: 13px;
    color: var(--text-secondary);
}

.step-note code {
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--accent-dark);
}

/* 功能网格 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.feature-item {
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
}

.feature-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.feature-item h4 {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 600;
}

.feature-item p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* FAQ 列表 */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    padding: 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.faq-question {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.faq-answer {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .sync-help-modal {
        max-width: 95vw;
        max-height: 90vh;
    }

    .sync-help-modal .help-content {
        max-height: 75vh;
    }

    .step-item {
        flex-direction: column;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .browser-content {
        min-height: 100px;
        padding: 12px;
    }

    .token-form,
    .serverchan-home {
        max-width: 100%;
    }
}