/* Extracted styles from Color Memory Master (index.html) */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c); background-size: 400% 400%; animation: gradientShift 15s ease infinite; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow-x: hidden; padding: 10px; position: relative; }
body::before { content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3), transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3), transparent 50%), radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3), transparent 50%); pointer-events: none; z-index: -1; }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.floating-particles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.particle { position: absolute; width: 4px; height: 4px; background: rgba(255, 255, 255, 0.6); border-radius: 50%; animation: float 6s infinite linear; }
@keyframes float { 0% { transform: translateY(100vh) rotate(0deg); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(-100px) rotate(360deg); opacity: 0; } }
.game-container { width: 100%; max-width: 420px; background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 25px; padding: 20px; box-shadow: 0 25px 50px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.3); position: relative; min-height: 650px; transition: all 0.3s ease; }
.game-container:hover { transform: translateY(-5px); box-shadow: 0 35px 70px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.3); }
@media (max-width: 480px) { body { padding: 5px; } .game-container { border-radius: 20px; padding: 15px; min-height: calc(100vh - 20px); max-height: calc(100vh - 20px); overflow-y: auto; } }
.header { text-align: center; margin-bottom: 30px; position: relative; }
.title { font-size: 28px; font-weight: 900; color: white; margin-bottom: 15px; text-shadow: 0 4px 8px rgba(0,0,0,0.3); letter-spacing: -0.5px; position: relative; animation: titleGlow 3s ease-in-out infinite alternate; }
@keyframes titleGlow { 0% { text-shadow: 0 4px 8px rgba(0,0,0,0.3), 0 0 20px rgba(255,255,255,0.1); } 100% { text-shadow: 0 4px 8px rgba(0,0,0,0.3), 0 0 30px rgba(255,255,255,0.3); } }
@media (max-width: 480px) { .title { font-size: 24px; margin-bottom: 12px; } }
.mode-indicator { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 0 15px; padding: 8px 16px; background: rgba(255, 255, 255, 0.12); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 20px; font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.95); text-shadow: 0 1px 2px rgba(0,0,0,0.3); transition: all 0.3s ease; animation: modeSlideIn 0.6s ease forwards; cursor: pointer; user-select: none; }
.mode-indicator i { opacity: 0.9; font-size: 16px; }
.mode-indicator.common { background: rgba(76, 175, 80, 0.15); border-color: rgba(76, 175, 80, 0.3); color: #4CAF50; }
.mode-indicator.common i { color: #4CAF50; }
.mode-indicator.modern { background: rgba(33, 150, 243, 0.15); border-color: rgba(33, 150, 243, 0.3); color: #2196F3; }
.mode-indicator.modern i { color: #2196F3; }
.mode-indicator.master { background: rgba(156, 39, 176, 0.15); border-color: rgba(156, 39, 176, 0.3); color: #9C27B0; }
.mode-indicator.master i { color: #9C27B0; }
.mode-indicator.all { background: rgba(255, 193, 7, 0.15); border-color: rgba(255, 193, 7, 0.3); color: #FFC107; }
.mode-indicator.all i { color: #FFC107; }
@keyframes modeSlideIn { from { opacity: 0; transform: translateY(-10px) scale(0.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 480px) { .mode-indicator { font-size: 12px; padding: 6px 12px; margin: 6px 0 12px; } .mode-indicator i { font-size: 14px; } }
.stats { display: flex; justify-content: space-between; margin-bottom: 20px; font-size: 14px; color: rgba(255, 255, 255, 0.9); }
@media (max-width: 480px) { .stats { margin-bottom: 15px; font-size: 12px; } }
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 5px; background: rgba(255, 255, 255, 0.1); padding: 12px 16px; border-radius: 15px; backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); transition: all 0.3s ease; cursor: pointer; }
.stat-item:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.stat-value { font-weight: 900; font-size: 20px; color: white; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
@media (max-width: 480px) { .stat-value { font-size: 18px; } }
.progress-bar { width: 100%; height: 12px; background: rgba(255, 255, 255, 0.2); border-radius: 25px; overflow: hidden; margin-bottom: 15px; border: 1px solid rgba(255, 255, 255, 0.3); position: relative; }
.progress-bar::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); animation: shimmer 2s infinite; }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.progress-fill { height: 100%; background: linear-gradient(90deg, #00f5ff, #00d4ff, #0099ff); width: 0%; transition: width 0.8s cubic-bezier(0.4, 0.0, 0.2, 1); position: relative; box-shadow: 0 0 20px rgba(0, 245, 255, 0.5); }
.progress-fill::after { content: ''; position: absolute; top: 0; right: 0; width: 10px; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8)); border-radius: 0 25px 25px 0; }
.level-progress { font-size: 13px; color: rgba(255, 255, 255, 0.8); margin-top: 8px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.game-area { text-align: center; min-height: 320px; display: flex; flex-direction: column; justify-content: center; position: relative; background: rgba(255, 255, 255, 0.05); border-radius: 20px; padding: 20px; border: 1px solid rgba(255, 255, 255, 0.1); }
.color-square { width: 140px; height: 140px; margin: 25px auto; border-radius: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.2); transform: scale(0.8); transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); cursor: pointer; position: relative; border: 3px solid rgba(255, 255, 255, 0.3); }
.color-square::before { content: ''; position: absolute; top: -3px; left: -3px; right: -3px; bottom: -3px; background: linear-gradient(45deg, transparent, rgba(255,255,255,0.4), transparent); border-radius: 20px; opacity: 0; transition: opacity 0.3s ease; }
.color-square:hover::before { opacity: 1; }
@media (max-width: 480px) { .color-square { width: 120px; height: 120px; margin: 20px auto; } }
@media (max-width: 360px) { .color-square { width: 100px; height: 100px; margin: 15px auto; } }
.color-square.active { transform: scale(1); }
.color-square.pulse { animation: colorPulse 2s infinite; }
@keyframes colorPulse { 0% { transform: scale(1); box-shadow: 0 15px 35px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.2); } 50% { transform: scale(1.05); box-shadow: 0 20px 45px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.3), 0 0 30px rgba(255,255,255,0.3); } 100% { transform: scale(1); box-shadow: 0 15px 35px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.2); } }
.question { font-size: 22px; font-weight: 800; color: white; margin: 25px 0; opacity: 0; animation: fadeInUp 0.8s ease forwards; text-shadow: 0 3px 6px rgba(0,0,0,0.4); letter-spacing: -0.3px; }
@media (max-width: 480px) { .question { font-size: 20px; margin: 20px 0; } }
@media (max-width: 360px) { .question { font-size: 18px; margin: 15px 0; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.color-mixing { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 25px 0; perspective: 1000px; }
.mix-color { width: 70px; height: 70px; border-radius: 15px; box-shadow: 0 8px 20px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.2); border: 2px solid rgba(255, 255, 255, 0.3); transition: all 0.4s ease; animation: mixingFloat 3s ease-in-out infinite; }
.mix-color:nth-child(1) { animation-delay: 0s; }
.mix-color:nth-child(3) { animation-delay: 0.5s; }
@keyframes mixingFloat { 0%, 100% { transform: translateY(0) rotateY(0deg); } 50% { transform: translateY(-8px) rotateY(5deg); } }
.plus-sign, .equals-sign { font-size: 28px; font-weight: 900; color: white; text-shadow: 0 3px 6px rgba(0,0,0,0.4); animation: symbolPulse 2s ease-in-out infinite; }
@keyframes symbolPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.question-mark { width: 70px; height: 70px; border-radius: 15px; background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.3)); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 900; color: white; border: 2px dashed rgba(255, 255, 255, 0.5); text-shadow: 0 2px 4px rgba(0,0,0,0.3); animation: questionPulse 1.5s ease-in-out infinite; }
@keyframes questionPulse { 0%, 100% { transform: scale(1) rotate(0deg); border-color: rgba(255, 255, 255, 0.5); } 50% { transform: scale(1.05) rotate(2deg); border-color: rgba(255, 255, 255, 0.8); } }
@media (max-width: 480px) { .question-mark { width: 60px; height: 60px; font-size: 24px; } }
@media (max-width: 360px) { .question-mark { width: 50px; height: 50px; font-size: 20px; } }
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin: 25px 0; }
@media (max-width: 480px) { .options { gap: 12px; margin: 20px 0; } }
@media (max-width: 360px) { .options { gap: 10px; margin: 15px 0; } }
.option { padding: 18px 16px; border: 2px solid rgba(0, 0, 0, 0.08); border-radius: 15px; background: #ffffff; cursor: pointer; transition: all 0.3s ease; font-weight: 800; color: #1a1a1a; position: relative; overflow: hidden; text-align: left; font-size: 18px; line-height: 1.2; min-height: 60px; display: flex; align-items: center; justify-content: space-between; text-shadow: none; }
.option .option-label{ flex: 1; }
.option .option-tier{ display:block; font-size:12px; opacity:.85; margin-top:4px; color:#fff }
.option .speak-btn{ margin-left: 10px; min-width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.08); background: #f5f5f5; color: #333; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.option::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: left 0.5s ease; }
.option:hover::before { left: 100%; }
@media (max-width: 480px) { .option { padding: 15px 10px; font-size: 14px; min-height: 55px; } }
@media (max-width: 360px) { .option { padding: 12px 8px; font-size: 13px; min-height: 50px; } }
.option:hover { border-color: rgba(0, 0, 0, 0.2); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.12); background: #ffffff; }
.option.correct { border-color: #00ff88; background: linear-gradient(145deg, rgba(0,255,136,0.3), rgba(0,255,136,0.1)); animation: correctSuccess 0.8s ease; box-shadow: 0 0 30px rgba(0,255,136,0.5); }
.option.wrong { border-color: #ff4757; background: linear-gradient(145deg, rgba(255,71,87,0.3), rgba(255,71,87,0.1)); animation: wrongShake 0.8s ease; box-shadow: 0 0 30px rgba(255,71,87,0.5); }
@keyframes correctSuccess { 0% { transform: scale(1); } 25% { transform: scale(1.05) rotateZ(1deg); } 50% { transform: scale(1.08) rotateZ(-1deg); } 75% { transform: scale(1.03) rotateZ(0.5deg); } 100% { transform: scale(1) rotateZ(0deg); } }
@keyframes wrongShake { 0%, 100% { transform: translateX(0) rotateZ(0deg); } 20% { transform: translateX(-8px) rotateZ(-2deg); } 40% { transform: translateX(8px) rotateZ(2deg); } 60% { transform: translateX(-6px) rotateZ(-1deg); } 80% { transform: translateX(6px) rotateZ(1deg); } }
.next-btn { width: 100%; padding: 18px; background: linear-gradient(45deg, #ff6b6b, #ff8e53, #ff6b9d); background-size: 200% 200%; animation: gradientMove 3s ease infinite; color: white; border: none; border-radius: 15px; font-size: 18px; font-weight: 800; cursor: pointer; margin-top: 25px; transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1); opacity: 0; transform: translateY(30px); touch-action: manipulation; text-shadow: 0 2px 4px rgba(0,0,0,0.3); box-shadow: 0 10px 25px rgba(0,0,0,0.2); border: 2px solid rgba(255, 255, 255, 0.2); position: relative; overflow: hidden; }
@keyframes gradientMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.next-btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); transition: left 0.6s ease; }
.next-btn:hover::before { left: 100%; }
@media (max-width: 480px) { .next-btn { padding: 15px; font-size: 16px; margin-top: 20px; } }
@media (max-width: 360px) { .next-btn { padding: 12px; font-size: 14px; margin-top: 15px; } }
.next-btn.show { opacity: 1; transform: translateY(0); }
.next-btn:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 25px rgba(255,255,255,0.2); }
.next-btn:active { transform: translateY(-2px) scale(0.98); }
.level-complete { text-align: center; padding: 40px 20px; background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05)); border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.2); }
.level-complete h2 { color: #00ff88; margin-bottom: 25px; font-size: 32px; font-weight: 900; text-shadow: 0 4px 8px rgba(0,0,0,0.3); animation: levelCompleteGlow 2s ease-in-out infinite alternate; }
@keyframes levelCompleteGlow { 0% { text-shadow: 0 4px 8px rgba(0,0,0,0.3), 0 0 20px rgba(0,255,136,0.3); } 100% { text-shadow: 0 4px 8px rgba(0,0,0,0.3), 0 0 40px rgba(0,255,136,0.6); } }
@media (max-width: 480px) { .level-complete h2 { font-size: 28px; margin-bottom: 20px; } }
@media (max-width: 360px) { .level-complete h2 { font-size: 24px; margin-bottom: 15px; } }
.stars { display: flex; justify-content: center; gap: 15px; margin: 25px 0; }
.star { font-size: 35px; color: rgba(255, 255, 255, 0.3); animation: starFill 0.6s ease forwards; transition: all 0.3s ease; }
.star:hover { transform: scale(1.2) rotate(10deg); }
.star.filled { color: #FFD700; text-shadow: 0 0 20px rgba(255, 215, 0, 0.8); animation: starFill 0.6s ease forwards, starTwinkle 2s ease-in-out infinite; }
@keyframes starFill { from { transform: scale(0) rotate(180deg); } to { transform: scale(1) rotate(0deg); } }
@keyframes starTwinkle { 0%, 100% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.8); } 50% { text-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 40px rgba(255, 215, 0, 0.5); } }
.lives { display: flex; justify-content: center; gap: 8px; }
.life { color: #ff4757; text-shadow: 0 0 10px rgba(255, 71, 87, 0.5); transition: opacity 0.3s ease; }
.life.lost { opacity: 0.3; filter: grayscale(0.8); }
.combo { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.3); padding: 10px 18px; border-radius: 999px; color: #fff; font-weight: 900; box-shadow: 0 6px 16px rgba(0,0,0,0.25); animation: comboPop 0.6s ease forwards; }
@keyframes comboPop { 0% { transform: translateX(-50%) scale(0.9); opacity: 0; } 100% { transform: translateX(-50%) scale(1); opacity: 1; } }
.success-particle { position: fixed; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.95), rgba(255,255,255,0.2)); box-shadow: 0 0 10px rgba(255,255,255,0.7); pointer-events: none; animation: flyOut 0.6s ease forwards; }
@keyframes flyOut { from { transform: translate(0,0) scale(1); opacity: 1; } to { transform: translate(var(--x, 0), var(--y, 0)) scale(0.6); opacity: 0; } }
.hint-btn{ position:absolute; right: 12px; bottom: 12px; display:inline-flex; align-items:center; gap: 6px; padding:8px 12px; border-radius:10px; border:1px solid rgba(0,0,0,0.08); background:#fff2cc; color:#7a4e00; font-weight:800; box-shadow:0 6px 14px rgba(0,0,0,0.15); }
.hint-btn i{ color: #7a4e00; }
.hint-btn.disabled{ opacity: .6; cursor: default; filter: grayscale(0.2); }
.option.eliminated{ opacity: .35; filter: grayscale(0.8) blur(0.2px); pointer-events: none; }
/* Fit behavior */
.fit-to-viewport{ position: fixed; z-index: 2; top: 50%; left: 50%; transform-origin: center center; transform: translate(-50%, -50%) var(--fit-scale, scale(1)) !important; will-change: transform; }