/* 55% Global Scale for perfect laptop fitting */
html { font-size: 55%; }

body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #0f0f23; color: white; display: flex; justify-content: center; align-items: center; min-height: 100vh; margin: 0; padding: 20px; }

/* Main Container: Tighter Padding */
.game-container { width: 750px; text-align: center; background: #1e1e3f; padding: 30px 40px; border-radius: 30px; box-shadow: 0 0 40px rgba(0, 0, 0, 0.8); }

/* Global Text */
.rainbow-text { font-size: 4.5rem; font-weight: 900; margin: 0; background: linear-gradient(90deg, #ff4e50, #f9d423, #00ff00, #00c6ff, #9d00ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Start Screen Settings */
#start-screen, #end-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 500px; }
.rules-box { background: #2a2a5a; padding: 25px; border-radius: 20px; margin: 25px 0; border: 4px solid #5a5aae; text-align: left; }
.rules-box h2 { color: #ffcc00; margin-top: 0; margin-bottom: 15px; text-align: center; font-size: 2.8rem; }
.rules-list { list-style: none; padding: 0; margin: 0; font-size: 1.8rem; line-height: 1.5; }
.rules-list li { margin-bottom: 12px; }

.settings-container { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 25px; width: 100%; }
.setting-box { flex: 1; text-align: left; }
.setting-box label { font-size: 1.8rem; font-weight: bold; margin-bottom: 8px; display: block; color: #ffcc00; }
.dropdown { width: 100%; padding: 15px; font-size: 1.8rem; font-weight: bold; border-radius: 12px; border: 4px solid #ffcc00; background: #2a2a5a; color: white; cursor: pointer; text-align: center; box-shadow: 0 5px 0px rgba(0,0,0,0.4); }

#start-btn { padding: 20px 60px; font-size: 2.8rem; font-weight: 900; cursor: pointer; border-radius: 80px; background: #00ff00; border: none; color: #000; box-shadow: 0 8px 0px #009900; transition: transform 0.1s; margin-top: 10px; }
#start-btn:active { transform: translateY(8px); box-shadow: none; }

/* Top Bar Stats (Tighter Margins) */
.top-bar { display: flex; justify-content: space-between; align-items: center; background: #2a2a5a; padding: 10px 30px; border-radius: 15px; margin-bottom: 15px; font-weight: bold; font-size: 2rem; border: 4px solid #4a4a9a; }
.top-middle { display: flex; align-items: center; gap: 15px; }
#value-circle { width: 55px; height: 55px; background: #ffcc00; color: #000; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: 900; font-size: 2.2rem; box-shadow: 0 0 15px rgba(255, 204, 0, 0.5); }
#score-number { color: #00ffff; font-size: 2.5rem; }
#mistake-count { color: #ff4e50; font-size: 2.5rem; }

/* The Big Color Cards - 15% Shorter! */
.card-row { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.big-card { flex: 1; min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 20px 10px; border-radius: 20px; box-shadow: 0 8px 0px rgba(0,0,0,0.3); }
.card-emoji { font-size: 4rem; margin-bottom: 5px; }
.card-text { font-size: 3rem; font-weight: 900; text-transform: lowercase; }
.card-meaning { font-size: 1.6rem; font-weight: bold; text-align: center; line-height: 1.2; margin-top: auto; padding-top: 15px; opacity: 0.85; }

.prefix-card { background: #ff4e50; color: white; }
.stem-card { background: #f9d423; color: #111; }
.suffix-card { background: #00c6ff; color: #111; }

/* 💡 СЯ LAMP - Scaled to match new shorter cards */
.sia-col { width: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sia-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; width: 100%; background: #2a2a4a; border-radius: 20px; box-shadow: inset 0 0 15px rgba(0,0,0,0.6); padding: 15px 10px; }
.sia-btn { padding: 0; border: 5px solid #555; border-radius: 50%; width: 110px; height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; font-size: 2.5rem; line-height: 1.1; opacity: 0.2; background: #111; color: #ffcc00; transition: all 0.3s ease; }
.sia-active { opacity: 1; box-shadow: 0 0 40px #ffcc00, inset 0 0 20px #ffcc00; border-color: #ffcc00; background: #fffde7; color: #d4af37; transform: scale(1.05); }
.sia-desc { font-size: 1.2rem; font-weight: bold; color: #aaa; margin-top: 10px; text-align: center; line-height: 1.1; text-transform: uppercase; }

/* Word Display - Reduced Padding */
#word-display { display: flex; justify-content: center; align-items: center; background: #111; color: #fff; font-size: 5rem; font-weight: 900; padding: 20px; border-radius: 20px; margin-bottom: 15px; letter-spacing: 4px; text-transform: uppercase; border: 5px dashed #777; box-shadow: inset 0 0 20px rgba(0,0,0,0.5); text-align: center; }

/* Timer - Thinner */
.timer-container { position: relative; margin-bottom: 15px; }
.timer-bar { width: 100%; height: 30px; background: #222; border-radius: 15px; overflow: hidden; border: 3px solid #444; }
#timer-progress { width: 100%; height: 100%; background: #9d00ff; transition: width 0.1s linear; }
#timer-text { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.6rem; text-shadow: 2px 2px 4px #000; }

/* Quiz & Buttons - Tighter Padding */
.quiz-section p { font-size: 2.2rem; font-weight: bold; margin-bottom: 15px; }
.quiz-buttons { display: flex; flex-direction: column; gap: 10px; }
.answer-btn { width: 100%; padding: 15px; cursor: pointer; border-radius: 12px; border: 4px solid #5a5aae; background: #2a2a5a; color: white; font-size: 2rem; font-weight: bold; transition: 0.2s; }
.answer-btn:hover { background: #4a4a9a; border-color: #7a7aee; }

/* Randomizer Button */
#randomizer-btn { padding: 20px 40px; font-size: 2.2rem; font-weight: 900; cursor: pointer; border-radius: 50px; background: #ffcc00; border: none; color: #000; width: 100%; margin-top: 15px; box-shadow: 0 8px 0px #b38f00; transition: transform 0.1s; }
#randomizer-btn:active { transform: translateY(8px); box-shadow: none; }
#randomizer-btn:disabled { background: #555; box-shadow: 0 8px 0px #333; cursor: not-allowed; color: #999; }

/* End Screen UI */
#wrong-words-container { background: #2a2a5a; padding: 25px; border-radius: 20px; border: 4px solid #ff4e50; width: 85%; margin-bottom: 25px; text-align: left; }
#wrong-words-container h3 { color: #ff4e50; margin-top: 0; font-size: 2.2rem; }
#wrong-words-list { font-size: 1.6rem; line-height: 1.5; padding-left: 20px; color: #fff; }
#wrong-words-list li { margin-bottom: 8px; }

.white-board { background: #ffffff; color: #333; padding: 40px; border-radius: 25px; width: 80%; margin: 20px 0; box-shadow: 0 8px 0px #ccc; }
.white-board p { font-weight: bold; margin-bottom: 15px; font-size: 1.8rem;}
.white-board input { width: 90%; padding: 15px; margin: 15px 0 25px 0; border-radius: 12px; border: 4px solid #aaa; font-size: 1.8rem; text-align: center; }
#submit-btn { padding: 20px 40px; background: #ffcc00; color: #000; font-weight: 900; font-size: 2rem; border: none; border-radius: 50px; cursor: pointer; box-shadow: 0 6px 0px #b38f00; width: 100%; transition: 0.1s; }
#submit-btn:active { transform: translateY(6px); box-shadow: none; }
.restart-btn { background: none; color: #aaa; text-decoration: underline; border: none; cursor: pointer; font-size: 1.8rem; margin-top: 15px; }

hr { border-color: #444; margin: 20px 0; border-width: 2px;}
#leaderboard-list { font-size: 1.5rem; line-height: 1.5; list-style: none; padding: 0; text-align: left;}