:root { 
    --primary: #77dd77; --secondary: #ffb7b2; --accent: #84b6f4; --gold: #ffd700;
    --bg: #fdfbfb; --text: #444; --red: #ff6b6b; --green: #2ecc71;
}
body { margin: 0; font-family: 'Quicksand', sans-serif; background: var(--bg); color: var(--text); }
.web-container { display: flex; height: 100vh; width: 100vw; }
.sidebar { width: 260px; background: white; padding: 30px 20px; border-right: 1px solid #eee; display: flex; flex-direction: column; }
.logo { font-size: 1.8rem; color: var(--primary); font-weight: bold; margin-bottom: 40px; text-align: center; }
.nav-btn { background: none; border: none; padding: 15px; text-align: left; font-size: 1rem; cursor: pointer; border-radius: 12px; margin-bottom: 8px; transition: 0.3s; color: #666; font-weight: 600; }
.nav-btn.active, .nav-btn:hover { background: var(--primary); color: white; }
.stats-box { margin-top: auto; background: #f4f9f4; padding: 20px; border-radius: 15px; }
.content { flex: 1; padding: 40px; overflow-y: auto; }
.tab-content { display: none; animation: fadeIn 0.4s; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Garden, Inventory, Seed */
.garden-wrapper { max-width: 800px; margin: 0 auto; }
.garden-stage { background: white; padding: 40px; border-radius: 30px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.05); margin-bottom: 30px; }
#plant-avatar { font-size: 140px; transition: transform 0.5s; display: inline-block; }
.progress-container { width: 100%; height: 20px; background: #eee; border-radius: 10px; margin: 20px 0; overflow: hidden; }
#growth-bar { width: 0%; height: 100%; background: var(--primary); transition: 1s; }
.btn-water { background: #4fc3f7; color: white; padding: 12px 30px; border: none; border-radius: 50px; cursor: pointer; font-weight: bold; font-size: 1.1rem; box-shadow: 0 4px 10px rgba(79, 195, 247, 0.4); }
.btn-harvest { background: var(--gold); color: #8a6d3b; padding: 12px 30px; border: none; border-radius: 50px; cursor: pointer; font-weight: bold; animation: pulse 1s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
.inventory-section { background: white; padding: 20px; border-radius: 20px; min-height: 150px; text-align: center; }
.inventory-grid { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; justify-content: center; }
.inv-item { background: #f9f9f9; padding: 10px 20px; border-radius: 15px; border: 1px solid #eee; display: flex; align-items: center; gap: 10px; animation: popIn 0.5s; }
.inv-icon { font-size: 2rem; }
.inv-count { font-weight: bold; color: var(--primary); font-size: 1.2rem; }
@keyframes popIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.card-box { background: white; padding: 40px; border-radius: 30px; text-align: center; max-width: 650px; margin: 0 auto; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.word-display h1 { font-size: 3rem; margin: 10px 0; color: var(--primary); }
.phonetic-row { display: flex; justify-content: center; gap: 15px; color: #888; font-size: 1.3rem; margin-bottom: 30px; font-style: italic; }
.btn-audio, .btn-audio-small { background: #eee; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: 0.2s; }
.btn-audio:hover { background: var(--accent); color: white; }
.btn-audio-small { width: auto; height: auto; padding: 5px 15px; font-size: 0.9rem; border-radius: 20px; }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.opt-btn { padding: 20px; border: 2px solid #eee; background: white; border-radius: 15px; font-size: 1rem; cursor: pointer; font-weight: bold; transition: 0.2s; }
.opt-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Game Styles */
.game-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 30px; }
.game-item { padding: 20px; border: 2px solid #eee; border-radius: 20px; cursor: pointer; transition: 0.3s; background: #fdfdfd; }
.game-item:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(119, 221, 119, 0.2); }
.game-icon { font-size: 2.5rem; margin-bottom: 10px; }
.btn-back { background: none; border: none; font-size: 1rem; color: #888; cursor: pointer; float: left; margin-bottom: 10px; }
.hidden { display: none !important; }
.btn-check { background: var(--primary); color: white; border: none; padding: 12px 30px; border-radius: 20px; font-weight: bold; cursor: pointer; margin-top: 20px; }
.btn-reset { background: #eee; color: #666; border: none; padding: 12px 30px; border-radius: 20px; font-weight: bold; cursor: pointer; margin-top: 20px; margin-left: 10px; }

/* Hangman, Match, Rapid */
.blanks-container { display: flex; justify-content: center; gap: 10px; margin: 30px 0; flex-wrap: wrap; }
.blank-char { width: 40px; height: 50px; border-bottom: 3px solid #ccc; font-size: 2rem; font-weight: bold; display: flex; justify-content: center; align-items: flex-end; }
.blank-char.solved { border-bottom-color: var(--primary); color: var(--primary); }
.keyboard-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; max-width: 500px; margin: 0 auto; }
.key-btn { padding: 12px; border: 1px solid #eee; background: white; border-radius: 8px; cursor: pointer; font-weight: bold; }
.key-btn.correct { background: var(--primary); color: white; }
.key-btn.wrong { background: var(--secondary); color: white; opacity: 0.6; }

.match-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin: 30px 0; }
.match-card { background: var(--accent); color: white; height: 80px; display: flex; align-items: center; justify-content: center; border-radius: 15px; font-weight: bold; cursor: pointer; font-size: 1rem; transition: 0.3s; padding: 5px; text-align: center; }
.match-card.selected { background: var(--secondary); box-shadow: 0 0 10px var(--secondary); }
.match-card.matched { opacity: 0; visibility: hidden; }

.rapid-score { font-size: 1.5rem; font-weight: bold; margin-bottom: 10px; color: var(--primary); }
.timer-bar-bg { width: 100%; height: 10px; background: #eee; border-radius: 5px; overflow: hidden; margin-bottom: 20px; }
#rapid-timer-bar { height: 100%; background: var(--red); width: 100%; transition: width 0.1s linear; }
.rapid-card { background: #f8f9fa; padding: 20px; border-radius: 20px; margin-bottom: 20px; }
.rapid-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.btn-rapid { padding: 20px; border: none; border-radius: 15px; font-size: 1.2rem; font-weight: bold; color: white; cursor: pointer; }
.btn-true { background: var(--green); box-shadow: 0 5px 0 #27ae60; }
.btn-false { background: var(--red); box-shadow: 0 5px 0 #c0392b; }

/* Listen & Scramble */
.btn-listen-play { background: var(--accent); color: white; width: 120px; height: 120px; border-radius: 50%; border: none; font-size: 1.2rem; cursor: pointer; box-shadow: 0 10px 20px rgba(132, 182, 244, 0.4); }
#listen-input { padding: 15px; font-size: 1.2rem; text-align: center; width: 80%; border-radius: 15px; border: 2px solid #eee; margin-top: 20px; outline: none; }
.scramble-container { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; min-height: 60px; margin: 20px 0; padding: 10px; border-radius: 15px; }
.source-zone { background: #f9f9f9; border: 2px dashed #eee; }
.answer-zone { border-bottom: 2px solid var(--primary); }
.scramble-tile { width: 45px; height: 45px; background: white; border: 2px solid var(--accent); color: var(--accent); font-weight: bold; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 1.2rem; cursor: pointer; transition: 0.2s; box-shadow: 0 3px 0 #eee; }

/* Word Rain */
.rain-stats { display: flex; justify-content: space-between; font-size: 1.2rem; margin-bottom: 10px; }
.rain-area { width: 100%; height: 350px; background: #e3f2fd; border-radius: 15px; position: relative; overflow: hidden; border: 2px solid #bbdefb; }
.falling-word { position: absolute; background: white; padding: 5px 15px; border-radius: 15px; font-weight: bold; color: var(--text); box-shadow: 0 3px 10px rgba(0,0,0,0.1); white-space: nowrap; top: -40px; }
.rain-input-group { margin-top: 15px; }
#rain-input { width: 100%; padding: 15px; border-radius: 15px; border: 2px solid var(--primary); font-size: 1.2rem; outline: none; text-align: center; }
#rain-input:focus { box-shadow: 0 0 10px rgba(119, 221, 119, 0.3); }

/* Dict */
.dict-container { background: white; padding: 20px; border-radius: 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 15px; border-bottom: 1px solid #f0f0f0; }
.btn-del { color: #ff6b6b; background: none; border: none; cursor: pointer; font-weight: bold; }