/* ==========================================
   Stardew Journal - 星露谷日记
   Pixel Art RPG Style CSS
   ========================================== */

:root {
    --bg-primary: #2d1b0e;
    --bg-secondary: #3d2b1e;
    --bg-tertiary: #4a3728;
    --bg-card: #f5e6c8;
    --bg-card-dark: #e8d5a8;
    --bg-input: #fdf6e3;
    --text-primary: #3d2b1e;
    --text-secondary: #6b5744;
    --text-light: #f5e6c8;
    --text-muted: #8b7355;
    --text-highlight: #e8a832;
    --accent-gold: #e8a832;
    --accent-green: #4caf50;
    --accent-blue: #5b9bd5;
    --accent-red: #e74c3c;
    --accent-purple: #9b59b6;
    --accent-orange: #e67e22;
    --accent-pink: #e91e8c;
    --accent-teal: #1abc9c;
    --health-color: #e74c3c;
    --learning-color: #5b9bd5;
    --social-color: #e67e22;
    --creativity-color: #9b59b6;
    --productivity-color: #f39c12;
    --mood-1: #e74c3c;
    --mood-2: #e67e22;
    --mood-3: #f1c40f;
    --mood-4: #2ecc71;
    --mood-5: #3498db;
    --border-color: #8b7355;
    --border-light: #c9b896;
    --shadow-color: rgba(0,0,0,0.3);
    --font-pixel: 'Press Start 2P', cursive;
    --font-body: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(74, 55, 40, 0.5) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(74, 55, 40, 0.3) 0%, transparent 50%),
        repeating-linear-gradient(0deg, transparent, transparent 4px, rgba(0,0,0,0.02) 4px, rgba(0,0,0,0.02) 8px);
}

.pixel-border {
    border: 3px solid var(--border-color);
    box-shadow: inset 0 0 0 1px var(--border-light), 3px 3px 0px rgba(0,0,0,0.15);
    border-radius: 4px;
}

/* Loading Screen */
.loading-screen {
    position: fixed; inset: 0; background: var(--bg-primary);
    display: flex; align-items: center; justify-content: center; z-index: 9999;
    background-image: radial-gradient(circle at 50% 40%, rgba(232, 168, 50, 0.1) 0%, transparent 60%);
}
.loading-content { text-align: center; padding: 32px; }
.loading-icon { font-size: 64px; animation: bounce 1.5s ease-in-out infinite; margin-bottom: 24px; }
.game-title { font-family: var(--font-pixel); font-size: 28px; color: var(--accent-gold); text-shadow: 3px 3px 0px var(--bg-secondary), 0 0 20px rgba(232, 168, 50, 0.3); margin-bottom: 8px; letter-spacing: 2px; }
.game-subtitle { font-size: 20px; color: var(--text-light); opacity: 0.8; margin-bottom: 32px; letter-spacing: 4px; }
.loading-bar-container { width: 300px; height: 20px; background: var(--bg-secondary); border: 3px solid var(--border-color); border-radius: 4px; margin: 24px auto; overflow: hidden; position: relative; }
.loading-bar-container::before { content: ''; position: absolute; inset: 2px; border: 1px solid rgba(255,255,255,0.1); border-radius: 2px; }
.loading-bar { height: 100%; background: linear-gradient(180deg, #7ec850 0%, #4caf50 50%, #388e3c 100%); width: 0%; transition: width 0.3s ease; position: relative; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.2); }
.loading-bar::after { content: ''; position: absolute; top: 2px; left: 4px; right: 4px; height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; }
.loading-text { color: var(--text-light); font-size: 14px; opacity: 0.7; }
.start-btn { margin-top: 24px; font-size: 16px; padding: 12px 32px; animation: pulse 2s ease-in-out infinite; }

/* App Layout */
.app { max-width: 1200px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* Status Bar */
.status-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; background: var(--bg-secondary); border-bottom: 3px solid var(--border-color); position: sticky; top: 0; z-index: 100; box-shadow: 0 3px 10px rgba(0,0,0,0.3); }
.status-left { display: flex; align-items: center; gap: 8px; }
.avatar-container { width: 40px; height: 40px; background: var(--bg-tertiary); border: 2px solid var(--border-color); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.player-info { display: flex; flex-direction: column; }
.player-name { color: var(--text-light); font-size: 14px; font-weight: bold; }
.player-title { color: var(--accent-gold); font-size: 11px; opacity: 0.8; }
.status-center { display: flex; align-items: center; gap: 16px; color: var(--text-light); font-size: 13px; }
.weather-display, .season-display, .day-display { display: flex; align-items: center; gap: 4px; padding: 4px 8px; background: var(--bg-tertiary); border-radius: 4px; border: 1px solid rgba(255,255,255,0.1); }
.status-right { display: flex; align-items: center; gap: 16px; }
.currency-display { display: flex; align-items: center; gap: 4px; color: var(--text-light); font-size: 14px; font-weight: bold; }
.coin-icon { color: var(--accent-gold); font-size: 16px; filter: drop-shadow(0 0 4px rgba(232, 168, 50, 0.5)); }
.star-icon { font-size: 16px; filter: drop-shadow(0 0 4px rgba(100, 200, 255, 0.5)); }

/* XP Bar */
.xp-bar-container { height: 18px; background: var(--bg-secondary); border-bottom: 2px solid var(--border-color); position: relative; overflow: hidden; }
.xp-bar { height: 100%; background: linear-gradient(180deg, #64b5f6 0%, #42a5f5 50%, #1e88e5 100%); transition: width 0.5s ease; position: relative; }
.xp-bar::after { content: ''; position: absolute; top: 2px; left: 4px; right: 4px; height: 3px; background: rgba(255,255,255,0.25); border-radius: 2px; }
.xp-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-family: var(--font-pixel); color: white; text-shadow: 1px 1px 0px rgba(0,0,0,0.5); letter-spacing: 1px; }

/* Navigation Tabs */
.nav-tabs { display: flex; background: var(--bg-tertiary); border-bottom: 3px solid var(--border-color); overflow-x: auto; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tab { flex: 1; min-width: 80px; padding: 8px 16px; background: transparent; border: none; color: var(--text-light); opacity: 0.6; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: all 0.2s; font-family: var(--font-body); font-size: 13px; position: relative; }
.nav-tab:hover { opacity: 0.8; background: rgba(255,255,255,0.05); }
.nav-tab.active { opacity: 1; background: var(--bg-secondary); }
.nav-tab.active::after { content: ''; position: absolute; bottom: -3px; left: 0; right: 0; height: 3px; background: var(--accent-gold); }
.tab-icon { font-size: 20px; }
.tab-label { font-size: 11px; white-space: nowrap; }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; background: var(--bg-primary); }
.tab-content { flex: 1; padding: 16px; }
.panel { display: none; animation: fadeIn 0.3s ease; }
.panel.active { display: block; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 8px; border-bottom: 2px solid var(--border-color); }
.panel-header h2 { color: var(--text-light); font-size: 20px; text-shadow: 2px 2px 0px rgba(0,0,0,0.3); }
.panel-date { color: var(--accent-gold); font-size: 14px; }

/* Buttons */
.pixel-btn { font-family: var(--font-body); font-size: 14px; padding: 8px 16px; border: 3px solid var(--border-color); background: var(--bg-card); color: var(--text-primary); cursor: pointer; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--border-light), 2px 2px 0px rgba(0,0,0,0.15); transition: all 0.15s; position: relative; }
.pixel-btn:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--border-light), 3px 3px 0px rgba(0,0,0,0.2); }
.pixel-btn:active { transform: translateY(1px); box-shadow: inset 0 0 0 1px var(--border-light), 1px 1px 0px rgba(0,0,0,0.1); }
.primary-btn { background: linear-gradient(180deg, #7ec850 0%, #4caf50 100%); color: white; border-color: #388e3c; text-shadow: 1px 1px 0px rgba(0,0,0,0.2); }
.primary-btn:hover { background: linear-gradient(180deg, #8ed460 0%, #5cbf60 100%); }
.secondary-btn { background: var(--bg-card); color: var(--text-primary); }
.danger-btn { background: linear-gradient(180deg, #ef5350 0%, #e74c3c 100%); color: white; border-color: #c0392b; text-shadow: 1px 1px 0px rgba(0,0,0,0.2); }
.small-btn { padding: 4px 10px; font-size: 12px; }

/* Inputs */
.pixel-input { font-family: var(--font-body); font-size: 14px; padding: 8px 12px; border: 3px solid var(--border-color); background: var(--bg-input); color: var(--text-primary); border-radius: 4px; box-shadow: inset 2px 2px 0px rgba(0,0,0,0.1); width: 100%; outline: none; transition: border-color 0.2s; }
.pixel-input:focus { border-color: var(--accent-gold); box-shadow: inset 2px 2px 0px rgba(0,0,0,0.1), 0 0 0 2px rgba(232, 168, 50, 0.2); }
.pixel-select { font-family: var(--font-body); font-size: 14px; padding: 8px 12px; border: 3px solid var(--border-color); background: var(--bg-input); color: var(--text-primary); border-radius: 4px; width: 100%; outline: none; cursor: pointer; }

/* Journal */
.mood-section, .events-section, .diary-section { background: var(--bg-card); border: 3px solid var(--border-color); border-radius: 4px; padding: 16px; margin-bottom: 16px; box-shadow: inset 0 0 0 1px var(--border-light), 3px 3px 0px rgba(0,0,0,0.1); }
.mood-section h3, .events-section h3, .diary-section h3 { color: var(--text-primary); font-size: 16px; margin-bottom: 16px; }
.mood-selector { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.mood-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 16px; background: var(--bg-card-dark); border: 3px solid var(--border-light); border-radius: 8px; cursor: pointer; transition: all 0.2s; min-width: 70px; font-family: var(--font-body); }
.mood-btn:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
.mood-btn.selected { border-color: var(--accent-gold); background: rgba(232, 168, 50, 0.15); box-shadow: 0 0 12px rgba(232, 168, 50, 0.3); transform: translateY(-3px); }
.mood-emoji { font-size: 28px; transition: transform 0.2s; }
.mood-btn:hover .mood-emoji { transform: scale(1.2); }
.mood-label { font-size: 11px; color: var(--text-secondary); }
.event-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.event-tag { padding: 6px 12px; background: var(--bg-card-dark); border: 2px solid var(--border-light); border-radius: 20px; cursor: pointer; font-family: var(--font-body); font-size: 13px; color: var(--text-secondary); transition: all 0.2s; }
.event-tag:hover { background: rgba(232, 168, 50, 0.1); border-color: var(--accent-gold); }
.event-tag.selected { background: rgba(232, 168, 50, 0.2); border-color: var(--accent-gold); color: var(--text-primary); }
.diary-input { width: 100%; min-height: 180px; padding: 16px; border: 3px solid var(--border-color); background: var(--bg-input); color: var(--text-primary); font-family: var(--font-body); font-size: 15px; line-height: 1.8; border-radius: 4px; resize: vertical; outline: none; box-shadow: inset 2px 2px 0px rgba(0,0,0,0.08); }
.diary-input:focus { border-color: var(--accent-gold); }
.diary-input::placeholder { color: var(--text-muted); opacity: 0.6; }
.diary-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.word-count { color: var(--text-muted); font-size: 12px; }
.diary-actions { display: flex; gap: 8px; }

/* Recent Entries */
.recent-entries { margin-top: 24px; }
.recent-entries h3 { color: var(--text-light); margin-bottom: 16px; }
.entries-list { display: flex; flex-direction: column; gap: 8px; }
.entry-card { background: var(--bg-card); border: 3px solid var(--border-color); border-radius: 4px; padding: 16px; box-shadow: inset 0 0 0 1px var(--border-light), 3px 3px 0px rgba(0,0,0,0.1); cursor: pointer; transition: all 0.2s; }
.entry-card:hover { transform: translateX(4px); box-shadow: inset 0 0 0 1px var(--border-light), 5px 3px 0px rgba(0,0,0,0.15); }
.entry-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.entry-date { font-size: 12px; color: var(--text-muted); }
.entry-mood { font-size: 18px; }
.entry-preview { font-size: 14px; color: var(--text-secondary); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.entry-tags { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.entry-tag-badge { font-size: 10px; padding: 2px 6px; background: var(--bg-card-dark); border-radius: 10px; color: var(--text-muted); }

/* Habits */
.habits-streak-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.streak-card { background: var(--bg-card); border: 3px solid var(--border-color); border-radius: 4px; padding: 16px; text-align: center; box-shadow: inset 0 0 0 1px var(--border-light), 3px 3px 0px rgba(0,0,0,0.1); }
.streak-number { font-family: var(--font-pixel); font-size: 24px; color: var(--accent-gold); text-shadow: 2px 2px 0px rgba(0,0,0,0.1); }
.streak-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.habits-list { display: flex; flex-direction: column; gap: 8px; }
.habit-card { background: var(--bg-card); border: 3px solid var(--border-color); border-radius: 4px; padding: 16px; display: flex; align-items: center; gap: 16px; box-shadow: inset 0 0 0 1px var(--border-light), 3px 3px 0px rgba(0,0,0,0.1); transition: all 0.2s; }
.habit-card.completed { background: rgba(76, 175, 80, 0.1); border-color: var(--accent-green); }
.habit-check { width: 36px; height: 36px; border: 3px solid var(--border-color); border-radius: 4px; background: var(--bg-card-dark); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: all 0.2s; flex-shrink: 0; }
.habit-check:hover { border-color: var(--accent-green); background: rgba(76, 175, 80, 0.1); }
.habit-check.checked { background: var(--accent-green); border-color: #388e3c; color: white; }
.habit-icon { font-size: 24px; flex-shrink: 0; }
.habit-info { flex: 1; }
.habit-name { font-size: 15px; font-weight: bold; color: var(--text-primary); }
.habit-meta { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.habit-streak { display: flex; align-items: center; gap: 3px; color: var(--accent-orange); }
.habit-xp-reward { color: var(--accent-blue); }
.habit-delete { background: none; border: none; cursor: pointer; font-size: 16px; opacity: 0.4; transition: opacity 0.2s; padding: 4px; }
.habit-delete:hover { opacity: 1; }

/* Calendar */
.calendar-container { background: var(--bg-card); border: 3px solid var(--border-color); border-radius: 4px; padding: 16px; box-shadow: inset 0 0 0 1px var(--border-light), 3px 3px 0px rgba(0,0,0,0.1); }
.calendar-nav { display: flex; align-items: center; gap: 8px; }
.calendar-month-label { color: var(--text-light); font-size: 16px; min-width: 120px; text-align: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-weekday { text-align: center; font-size: 12px; color: var(--text-muted); padding: 8px 4px; font-weight: bold; }
.calendar-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid var(--border-light); border-radius: 4px; cursor: pointer; transition: all 0.2s; position: relative; min-height: 60px; background: var(--bg-input); font-size: 14px; }
.calendar-day:hover { border-color: var(--accent-gold); transform: scale(1.05); z-index: 2; }
.calendar-day.today { border-color: var(--accent-gold); box-shadow: 0 0 8px rgba(232, 168, 50, 0.4); }
.calendar-day.has-entry { font-weight: bold; }
.calendar-day .day-number { font-size: 14px; color: var(--text-primary); }
.calendar-day .day-mood { font-size: 16px; margin-top: 2px; }
.calendar-day.other-month { opacity: 0.3; }
.calendar-day .day-habits { display: flex; gap: 2px; position: absolute; bottom: 2px; }
.calendar-day .habit-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-green); }
.calendar-day.mood-1 { background: rgba(231, 76, 60, 0.1); }
.calendar-day.mood-2 { background: rgba(230, 126, 34, 0.1); }
.calendar-day.mood-3 { background: rgba(241, 196, 15, 0.1); }
.calendar-day.mood-4 { background: rgba(46, 204, 113, 0.1); }
.calendar-day.mood-5 { background: rgba(52, 152, 219, 0.1); }
.calendar-legend { display: flex; gap: 16px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-muted); }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; }
.legend-dot.mood-1 { background: var(--mood-1); }
.legend-dot.mood-2 { background: var(--mood-2); }
.legend-dot.mood-3 { background: var(--mood-3); }
.legend-dot.mood-4 { background: var(--mood-4); }
.legend-dot.mood-5 { background: var(--mood-5); }
.legend-dot.no-entry { background: var(--bg-card-dark); border: 1px solid var(--border-light); }
.calendar-detail { margin-top: 16px; background: var(--bg-card); border: 3px solid var(--border-color); border-radius: 4px; padding: 16px; box-shadow: inset 0 0 0 1px var(--border-light), 3px 3px 0px rgba(0,0,0,0.1); }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.skill-card { background: var(--bg-card); border: 3px solid var(--border-color); border-radius: 4px; padding: 16px; box-shadow: inset 0 0 0 1px var(--border-light), 3px 3px 0px rgba(0,0,0,0.1); transition: all 0.2s; }
.skill-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--border-light), 3px 5px 0px rgba(0,0,0,0.15); }
.skill-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.skill-header h3 { font-size: 16px; color: var(--text-primary); }
.skill-icon { font-size: 24px; }
.skill-bar-container { height: 14px; background: var(--bg-card-dark); border: 2px solid var(--border-color); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.skill-bar { height: 100%; transition: width 0.5s ease; position: relative; }
.skill-bar::after { content: ''; position: absolute; top: 1px; left: 3px; right: 3px; height: 3px; background: rgba(255,255,255,0.25); border-radius: 1px; }
[data-skill="health"] .skill-bar { background: linear-gradient(180deg, #ef5350 0%, #e74c3c 100%); }
[data-skill="learning"] .skill-bar { background: linear-gradient(180deg, #64b5f6 0%, #5b9bd5 100%); }
[data-skill="social"] .skill-bar { background: linear-gradient(180deg, #ff9800 0%, #e67e22 100%); }
[data-skill="creativity"] .skill-bar { background: linear-gradient(180deg, #ab47bc 0%, #9b59b6 100%); }
[data-skill="productivity"] .skill-bar { background: linear-gradient(180deg, #ffc107 0%, #f39c12 100%); }
.skill-level { font-family: var(--font-pixel); font-size: 14px; color: var(--accent-gold); margin-bottom: 4px; }
.skill-xp { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.skill-perks { font-size: 12px; color: var(--text-secondary); }
.perk-item { display: flex; align-items: center; gap: 4px; padding: 2px 0; }
.perk-item.locked { opacity: 0.4; }
.perk-item.unlocked { color: var(--accent-green); }
.skill-points { display: flex; align-items: center; gap: 4px; color: var(--text-light); }
.sp-icon { font-size: 16px; }
.sp-count { font-family: var(--font-pixel); font-size: 14px; color: var(--accent-gold); }
.sp-label { font-size: 12px; opacity: 0.7; }
.skill-tree-visual { background: var(--bg-card); border: 3px solid var(--border-color); border-radius: 4px; padding: 16px; box-shadow: inset 0 0 0 1px var(--border-light), 3px 3px 0px rgba(0,0,0,0.1); }
.skill-tree-visual h3 { color: var(--text-primary); margin-bottom: 16px; text-align: center; }
.tree-container { display: flex; justify-content: center; align-items: center; padding: 24px; position: relative; min-height: 200px; }
.tree-center { width: 80px; height: 80px; background: var(--accent-gold); border: 4px solid #c0882a; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; box-shadow: 0 0 20px rgba(232, 168, 50, 0.4); z-index: 2; }
.tree-branch { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tree-node { width: 50px; height: 50px; border: 3px solid var(--border-color); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--bg-card); transition: all 0.3s; }
.tree-node.active { box-shadow: 0 0 10px rgba(232, 168, 50, 0.5); border-color: var(--accent-gold); }
.tree-node-label { font-size: 10px; color: var(--text-secondary); text-align: center; }

/* Shop */
.shop-balance { display: flex; align-items: center; gap: 4px; font-size: 18px; font-weight: bold; color: var(--accent-gold); }
.shop-categories { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.shop-cat-btn { padding: 6px 14px; background: var(--bg-card); border: 2px solid var(--border-color); border-radius: 20px; cursor: pointer; font-family: var(--font-body); font-size: 13px; color: var(--text-secondary); transition: all 0.2s; }
.shop-cat-btn:hover { border-color: var(--accent-gold); }
.shop-cat-btn.active { background: var(--accent-gold); color: white; border-color: #c0882a; }
.shop-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.shop-item { background: var(--bg-card); border: 3px solid var(--border-color); border-radius: 4px; padding: 16px; box-shadow: inset 0 0 0 1px var(--border-light), 3px 3px 0px rgba(0,0,0,0.1); display: flex; flex-direction: column; transition: all 0.2s; }
.shop-item:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--border-light), 3px 5px 0px rgba(0,0,0,0.15); }
.shop-item.owned { opacity: 0.7; border-color: var(--accent-green); }
.shop-item.equipped { border-color: var(--accent-gold); box-shadow: 0 0 10px rgba(232, 168, 50, 0.3); }
.shop-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.shop-item-icon { font-size: 28px; }
.shop-item-info h4 { font-size: 14px; color: var(--text-primary); }
.shop-item-desc { font-size: 12px; color: var(--text-muted); flex: 1; margin-bottom: 8px; line-height: 1.4; }
.shop-item-price { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.price-tag { display: flex; align-items: center; gap: 4px; font-weight: bold; color: var(--accent-gold); }
.buy-btn { padding: 4px 12px; font-size: 12px; }
.equip-btn { padding: 4px 12px; font-size: 12px; background: var(--accent-gold); color: white; border-color: #c0882a; }

/* Achievements */
.achievement-counter { color: var(--accent-gold); font-size: 16px; font-weight: bold; }
.achievements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.achievement-card { background: var(--bg-card); border: 3px solid var(--border-color); border-radius: 4px; padding: 16px; display: flex; align-items: center; gap: 16px; box-shadow: inset 0 0 0 1px var(--border-light), 3px 3px 0px rgba(0,0,0,0.1); transition: all 0.2s; }
.achievement-card.unlocked { border-color: var(--accent-gold); background: rgba(232, 168, 50, 0.08); }
.achievement-card.locked { opacity: 0.5; }
.achievement-icon { font-size: 32px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--bg-card-dark); border: 2px solid var(--border-color); border-radius: 8px; flex-shrink: 0; }
.achievement-card.unlocked .achievement-icon { background: var(--accent-gold); border-color: #c0882a; }
.achievement-card.locked .achievement-icon { filter: grayscale(1); }
.achievement-info h4 { font-size: 14px; color: var(--text-primary); margin-bottom: 2px; }
.achievement-desc { font-size: 12px; color: var(--text-muted); line-height: 1.3; }
.achievement-reward { font-size: 11px; color: var(--accent-gold); margin-top: 4px; }

/* Profile */
.profile-content { display: flex; flex-direction: column; gap: 16px; }
.profile-card { background: var(--bg-card); padding: 24px; display: flex; gap: 24px; align-items: flex-start; }
.profile-avatar-area { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.profile-avatar { width: 80px; height: 80px; background: var(--bg-card-dark); border: 4px solid var(--border-color); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.profile-equipped-title { font-size: 12px; color: var(--accent-gold); text-align: center; }
.profile-info { flex: 1; }
.profile-stats, .profile-inventory, .profile-pets { background: var(--bg-card); padding: 16px; }
.profile-stats h3, .profile-inventory h3, .profile-pets h3 { color: var(--text-primary); margin-bottom: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.stat-item { display: flex; align-items: center; gap: 8px; padding: 8px; background: var(--bg-card-dark); border-radius: 4px; }
.stat-icon { font-size: 20px; }
.stat-info { display: flex; flex-direction: column; }
.stat-label { font-size: 11px; color: var(--text-muted); }
.stat-value { font-size: 14px; font-weight: bold; color: var(--text-primary); }
.inventory-grid, .pets-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.inventory-item, .pet-item { width: 60px; height: 60px; background: var(--bg-card-dark); border: 2px solid var(--border-color); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 28px; cursor: pointer; transition: all 0.2s; position: relative; }
.inventory-item:hover, .pet-item:hover { transform: scale(1.1); border-color: var(--accent-gold); }
.inventory-item .item-tooltip, .pet-item .item-tooltip { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--bg-secondary); color: var(--text-light); padding: 4px 8px; border-radius: 4px; font-size: 10px; white-space: nowrap; display: none; z-index: 10; }
.inventory-item:hover .item-tooltip, .pet-item:hover .item-tooltip { display: block; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; animation: fadeIn 0.2s; }
.modal-content { background: var(--bg-card); padding: 24px; max-width: 450px; width: 90%; max-height: 80vh; overflow-y: auto; }
.modal-content h3 { color: var(--text-primary); margin-bottom: 16px; font-size: 18px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; font-weight: bold; }
.icon-picker { display: flex; flex-wrap: wrap; gap: 4px; }
.icon-option { width: 40px; height: 40px; border: 2px solid var(--border-light); border-radius: 4px; background: var(--bg-card-dark); cursor: pointer; font-size: 20px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.icon-option:hover { border-color: var(--accent-gold); }
.icon-option.selected { border-color: var(--accent-gold); background: rgba(232, 168, 50, 0.2); box-shadow: 0 0 8px rgba(232, 168, 50, 0.3); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 24px; }

/* Notifications */
.notification-area { position: fixed; top: 80px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.notification { background: var(--bg-secondary); border: 3px solid var(--border-color); border-radius: 4px; padding: 8px 16px; color: var(--text-light); font-size: 13px; box-shadow: 3px 3px 0px rgba(0,0,0,0.3); animation: slideIn 0.3s ease, slideOut 0.3s ease 2.7s; display: flex; align-items: center; gap: 8px; pointer-events: auto; min-width: 200px; }
.notification.success { border-color: var(--accent-green); }
.notification.warning { border-color: var(--accent-orange); }
.notification.info { border-color: var(--accent-blue); }
.notification.gain { border-color: var(--accent-gold); }
.notification-icon { font-size: 18px; }

/* Celebration */
.celebration-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 3000; animation: fadeIn 0.3s; }
.celebration-content { background: var(--bg-card); border: 4px solid var(--accent-gold); border-radius: 8px; padding: 32px; text-align: center; max-width: 400px; width: 90%; box-shadow: 0 0 40px rgba(232, 168, 50, 0.3), inset 0 0 0 2px var(--border-light); animation: celebrateBounce 0.5s ease; }
.celebration-icon { font-size: 64px; margin-bottom: 16px; animation: celebrateSpin 1s ease; }
.celebration-content h2 { font-family: var(--font-pixel); color: var(--accent-gold); font-size: 20px; margin-bottom: 8px; text-shadow: 2px 2px 0px rgba(0,0,0,0.2); }
.celebration-content p { color: var(--text-secondary); margin-bottom: 16px; }
.celebration-rewards { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.reward-badge { display: flex; align-items: center; gap: 4px; padding: 4px 10px; background: var(--bg-card-dark); border: 2px solid var(--accent-gold); border-radius: 20px; font-size: 13px; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100px); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes celebrateBounce { 0% { transform: scale(0.3); opacity: 0; } 50% { transform: scale(1.05); } 70% { transform: scale(0.95); } 100% { transform: scale(1); opacity: 1; } }
@keyframes celebrateSpin { 0% { transform: rotate(0deg) scale(0.5); opacity: 0; } 50% { transform: rotate(180deg) scale(1.2); } 100% { transform: rotate(360deg) scale(1); opacity: 1; } }
@keyframes xpGain { 0% { transform: scale(1); } 50% { transform: scale(1.15); filter: brightness(1.3); } 100% { transform: scale(1); } }
.xp-gain-animation { animation: xpGain 0.4s ease; }

/* Responsive */
@media (max-width: 768px) {
    .status-bar { flex-wrap: wrap; gap: 8px; }
    .status-center { order: 3; width: 100%; justify-content: center; }
    .nav-tab { min-width: 60px; padding: 4px 8px; }
    .tab-icon { font-size: 18px; }
    .tab-label { font-size: 10px; }
    .skills-grid { grid-template-columns: 1fr; }
    .habits-streak-summary { grid-template-columns: repeat(3, 1fr); }
    .mood-selector { gap: 4px; }
    .mood-btn { min-width: 55px; padding: 4px 8px; }
    .mood-emoji { font-size: 22px; }
    .shop-items { grid-template-columns: 1fr; }
    .achievements-grid { grid-template-columns: 1fr; }
    .profile-card { flex-direction: column; align-items: center; }
    .game-title { font-size: 20px; }
    .calendar-day { min-height: 45px; }
}
@media (max-width: 480px) {
    .habits-streak-summary { grid-template-columns: 1fr; }
    .diary-actions { flex-direction: column; width: 100%; }
    .diary-footer { flex-direction: column; gap: 8px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
::selection { background: var(--accent-gold); color: var(--bg-primary); }

/* ==========================================
   Auth Screen
   ========================================== */
.auth-screen {
    position: fixed; inset: 0; background: var(--bg-primary);
    display: flex; align-items: center; justify-content: center; z-index: 9999;
    background-image: radial-gradient(circle at 50% 40%, rgba(232, 168, 50, 0.08) 0%, transparent 60%);
}
.auth-content {
    text-align: center; padding: 32px; max-width: 400px; width: 90%;
}
.auth-form {
    background: var(--bg-card); border: 3px solid var(--border-color); border-radius: 4px;
    padding: 24px; margin-top: 24px; box-shadow: inset 0 0 0 1px var(--border-light), 3px 3px 0px rgba(0,0,0,0.15);
}
.auth-form .form-group { margin-bottom: 16px; text-align: left; }
.auth-form .form-group label { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; font-weight: bold; display: block; }
.auth-btn { width: 100%; margin-top: 8px; font-size: 16px; padding: 12px; }
.auth-switch { margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.auth-switch a { color: var(--accent-gold); text-decoration: none; font-weight: bold; }
.auth-switch a:hover { text-decoration: underline; }

/* ==========================================
   Couple Panel
   ========================================== */
.couple-content { display: flex; flex-direction: column; gap: 16px; }

.couple-invite-card { background: var(--bg-card); padding: 20px; }
.invite-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.invite-action-card { background: var(--bg-card-dark); padding: 16px; text-align: center; }
.invite-action-card h4 { color: var(--text-primary); margin-bottom: 8px; }
.invite-code-box {
    font-family: var(--font-pixel); font-size: 24px; color: var(--accent-gold);
    background: var(--bg-card-dark); border: 3px dashed var(--accent-gold);
    padding: 12px 24px; border-radius: 8px; letter-spacing: 6px; display: inline-block;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.2);
}

/* Partner Card */
.partner-card { background: var(--bg-card); padding: 20px; }
.partner-header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.partner-avatar-area { position: relative; }
.partner-avatar {
    width: 64px; height: 64px; background: var(--bg-card-dark);
    border: 4px solid var(--accent-pink); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 32px;
    box-shadow: 0 0 12px rgba(233, 30, 140, 0.3);
}
.partner-info { flex: 1; }
.partner-name { font-size: 18px; font-weight: bold; color: var(--text-primary); }
.partner-level { font-family: var(--font-pixel); font-size: 12px; color: var(--accent-gold); margin-top: 2px; }
.partner-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.partner-status-item {
    background: var(--bg-card-dark); padding: 10px 12px; border-radius: 4px;
    display: flex; flex-direction: column; gap: 2px;
}
.partner-status-item .status-label { font-size: 11px; color: var(--text-muted); }
.partner-status-item .status-value { font-size: 13px; color: var(--text-primary); font-weight: bold; }

.partner-mood-emoji { font-size: 18px; margin-right: 4px; }

/* Couple Stats */
.couple-stats { background: var(--bg-card); padding: 20px; text-align: center; }
.couple-stats h3 { color: var(--text-primary); margin-bottom: 16px; }
.couple-streak-display { margin: 16px 0; }
.couple-streak-number {
    font-family: var(--font-pixel); font-size: 48px; color: var(--accent-pink);
    text-shadow: 3px 3px 0px rgba(0,0,0,0.1); line-height: 1;
}
.couple-streak-label { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.couple-sub-stats { font-size: 12px; color: var(--text-muted); }
.couple-sub-stats strong { color: var(--accent-gold); }

/* Encourage Section */
.encourage-section { background: var(--bg-card); padding: 16px; }
.encourage-section h3 { color: var(--text-primary); margin-bottom: 12px; }
.quick-encourage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quick-encourage-btn {
    padding: 10px; background: var(--bg-card-dark); border: 2px solid var(--border-light);
    border-radius: 8px; cursor: pointer; font-family: var(--font-body); font-size: 13px;
    color: var(--text-secondary); transition: all 0.2s;
}
.quick-encourage-btn:hover {
    border-color: var(--accent-pink); background: rgba(233, 30, 140, 0.08);
    transform: translateY(-2px); box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* Whisper Section */
.whisper-section { background: var(--bg-card); padding: 16px; }
.whisper-header-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.whisper-header-bar h3 { color: var(--text-primary); margin: 0; }
.whisper-input-area { display: flex; gap: 8px; align-items: flex-end; }
.whisper-textarea {
    flex: 1; min-height: 50px; resize: none; font-size: 14px;
    border: 3px solid var(--border-color); border-radius: 4px;
    padding: 8px 12px; background: var(--bg-input); color: var(--text-primary);
    font-family: var(--font-body); outline: none; width: 100%;
}
.whisper-textarea:focus { border-color: var(--accent-pink); }
.whisper-textarea::placeholder { color: var(--text-muted); opacity: 0.6; }

/* Whisper Badge on Tab */
.nav-tab { position: relative; }
.whisper-badge {
    position: absolute; top: 2px; right: 8px;
    background: var(--accent-pink); color: white;
    font-size: 10px; font-weight: bold; min-width: 18px; height: 18px;
    border-radius: 9px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 6px rgba(233, 30, 140, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

/* Message Popup */
.message-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 4000; animation: fadeIn 0.3s;
}
.message-popup {
    background: var(--bg-card); padding: 32px; max-width: 360px; width: 90%;
    text-align: center; animation: celebrateBounce 0.5s ease;
    border-color: var(--accent-pink);
}
.message-popup-icon { font-size: 56px; margin-bottom: 12px; }
.message-popup-sender { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.message-popup-content {
    font-size: 18px; color: var(--text-primary); line-height: 1.6;
    padding: 16px; background: var(--bg-card-dark); border-radius: 8px;
    margin-bottom: 12px; border: 2px dashed var(--border-light);
}
.message-popup-time { font-size: 11px; color: var(--text-muted); margin-bottom: 16px; }

/* Whisper Panel */
.whisper-panel {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 3500; animation: fadeIn 0.3s;
}
.whisper-panel-content {
    background: var(--bg-card); max-width: 500px; width: 90%; max-height: 70vh;
    display: flex; flex-direction: column;
}
.whisper-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px; border-bottom: 2px solid var(--border-light);
}
.whisper-panel-header h3 { color: var(--text-primary); margin: 0; }
.whispers-list {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
}
.whisper-card {
    background: var(--bg-card-dark); border: 2px solid var(--border-light);
    border-radius: 8px; padding: 12px; transition: all 0.2s;
}
.whisper-card.unread {
    border-color: var(--accent-pink);
    background: rgba(233, 30, 140, 0.05);
    box-shadow: 0 0 8px rgba(233, 30, 140, 0.15);
}
.whisper-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.whisper-icon { font-size: 18px; }
.whisper-type { font-size: 11px; color: var(--accent-pink); font-weight: bold; }
.whisper-time { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.whisper-from { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.whisper-text { font-size: 14px; color: var(--text-primary); line-height: 1.6; }

/* Couple responsive */
@media (max-width: 768px) {
    .invite-actions { grid-template-columns: 1fr; }
    .partner-status-grid { grid-template-columns: 1fr; }
    .quick-encourage-grid { grid-template-columns: repeat(2, 1fr); }
}