.auth-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.7);display:flex;justify-content:center;align-items:center;z-index:1000}.auth-modal{background-color:white;border-radius:8px;padding:2rem;width:90%;max-width:400px;box-shadow:0 4px 6px rgba(0,0,0,.1);position:relative}.auth-close-button{position:absolute;top:10px;right:10px;background:none;border:none;font-size:1.5rem;cursor:pointer;color:#666}.auth-form h2{margin-top:0;margin-bottom:1.5rem;color:#333;text-align:center}.auth-error{background-color:#ffebee;color:#d32f2f;padding:.75rem;border-radius:4px}.auth-error,.auth-input-group{margin-bottom:1rem}.auth-input-group label{display:block;margin-bottom:.5rem;font-weight:500}.auth-input-group input{width:100%;padding:.75rem;border:1px solid #ddd;border-radius:4px;font-size:1rem}.auth-actions{margin-top:1.5rem}.auth-button{width:100%;padding:.75rem;background-color:#0078d7;color:white;border:none;border-radius:4px;font-size:1rem;font-weight:500;cursor:pointer;transition:background-color .2s}.auth-button:hover{background-color:#0062a9}.auth-button:disabled{background-color:#ccc;cursor:not-allowed}.auth-switch{margin-top:1.5rem;text-align:center}.auth-text-button{background:none;border:none;color:#0078d7;font-size:1rem;cursor:pointer;padding:0;text-decoration:underline}.user-profile{margin-left:auto}.user-info,.user-profile{margin-right:1rem}.login-button,.logout-button{padding:.5rem 1rem;font-size:.875rem;font-weight:500}.login-button{background-color:#0078d7;color:white}.logout-button{background-color:#f5f5f5;color:#333}.app-header{flex-wrap:wrap;justify-content:space-between;padding:1rem}.app-title{flex-grow:1}@media (max-width:600px){.app-header{flex-direction:column;align-items:stretch}.app-title,.category-selector,.user-profile{margin-bottom:.5rem}.user-profile{order:3;margin-left:0;margin-right:0;justify-content:center}}.feedback-message{width:100%;padding:10px 15px;margin-bottom:15px;border-radius:4px;font-weight:500;text-align:center;animation:fadeIn .3s ease-in-out}.feedback-message.success{background-color:rgba(76,175,80,.2);color:#2e7d32;border:1px solid #2e7d32}.feedback-message.error{background-color:rgba(244,67,54,.2);color:#d32f2f;border:1px solid #d32f2f}@keyframes fadeIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.auth-top-bar{width:100%;padding:.4rem 0;background-color:transparent;color:var(--text-color);margin-bottom:.25rem}.auth-container{max-width:800px;margin:0 auto;display:flex;justify-content:space-between}.auth-links-left,.auth-links-right{display:flex;align-items:center;gap:1rem}.auth-links-left{justify-content:flex-start}.auth-links-right{justify-content:flex-end}.auth-links-right .total-words-count{font-size:.9rem;color:var(--secondary-color);font-weight:500;margin-right:1rem;padding:.4rem .8rem;background-color:rgba(79,195,247,.15);border-radius:4px;white-space:nowrap}.admin-text-link{color:var(--primary-color);text-decoration:none;font-size:.9rem;transition:opacity .2s}.admin-text-link:hover{opacity:.8;text-decoration:underline}.app-header{width:100%;border-radius:8px;box-shadow:0 2px 10px rgba(0,0,0,.1);margin-bottom:.5rem;padding:.75rem 1rem;box-sizing:border-box;max-width:800px;margin-left:auto;margin-right:auto}.app-header>div{max-width:800px;margin:0 auto;width:100%}.centered-header-container{display:flex;justify-content:center;align-items:center}.user-auth-container{display:flex;justify-content:flex-end;align-items:center}.title-dropdowns{display:flex;align-items:center;justify-content:center;gap:.5rem}.dropdown-title{cursor:pointer;display:inline-flex;align-items:center;margin:0;font-size:1.25rem;position:relative;transition:color .2s;font-weight:700}.dropdown-title:hover{color:var(--accent-color)}.dropdown-arrow{font-size:.6rem;margin-left:3px;position:relative;top:-2px}.title-separator{margin:0 5px;font-size:1.25rem;opacity:.7}.game-dropdown-container,.language-dropdown-container{position:relative}.dropdown-menu{position:absolute;top:100%;left:0;background-color:white;border-radius:6px;box-shadow:0 2px 15px rgba(0,0,0,.2);z-index:100;min-width:180px;margin-top:5px;padding:.75rem 0;border:1px solid #e0e0e0}.dropdown-item{padding:.75rem 1.25rem;color:#333;cursor:pointer;transition:background-color .2s,color .2s}.dropdown-item:hover{background-color:var(--accent-color-light);color:var(--primary-color)}.dropdown-item.active{background-color:var(--accent-color);color:white;font-weight:500}.category-selector{align-items:center;justify-content:center;gap:.5rem;white-space:nowrap}.category-selector label{font-weight:500}.category-selector select{padding:.5rem;border:1px solid #ddd;min-width:160px;cursor:pointer;font-size:1rem}.user-profile{display:flex;align-items:center;justify-content:flex-end}.authenticated-user{display:flex;align-items:center;gap:.75rem}.user-info{display:flex;flex-direction:column;align-items:flex-end}.username{font-weight:500;white-space:nowrap}.login-button,.logout-button{padding:.4rem .75rem;border:none;border-radius:4px;background-color:var(--secondary-color);color:white;cursor:pointer;font-size:.9rem;transition:background-color .2s}.admin-button{padding:.4rem .6rem;transition:background-color .2s;font-size:.85rem}.login-button:hover,.logout-button:hover{background-color:var(--accent-color)}@media (max-width:768px){.auth-top-bar{padding:.3rem .5rem}.auth-container{justify-content:space-between;padding:0 .5rem}.auth-links-right{margin-left:auto}.app-header{padding:.5rem}.dropdown-title{font-size:1.1rem;white-space:nowrap}.title-separator{margin:0 3px;font-size:1.1rem}.dropdown-menu{position:absolute;top:100%;left:0;width:150px;z-index:1000}.category-selector-bar{padding:.4rem .5rem;justify-content:center}.category-selector{width:100%;justify-content:center;flex-wrap:wrap}.category-selector label{font-size:.9rem;margin-right:.3rem}.category-selector select{flex-grow:1;max-width:200px;font-size:.9rem;padding:.3rem}.login-button,.logout-button{font-size:.8rem;padding:.3rem .5rem}.admin-text-link{font-size:.8rem}}.word-matching-game{width:100%;max-width:900px;margin:0 auto;padding:1.5rem;background-color:white;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,.1)}.game-header{display:flex;justify-content:space-between;margin-bottom:1.5rem;padding-bottom:.75rem;border-bottom:1px solid #eee}.game-score{font-size:1.2rem;font-weight:600;color:var(--primary-color)}.game-round{font-size:1.2rem;color:var(--secondary-color)}.match-container{display:flex;justify-content:space-between;gap:2rem;margin-bottom:2rem}.match-column{width:48%}.match-column,.match-options{display:flex;flex-direction:column;gap:.75rem}.match-options{width:100%}.match-button{padding:.2rem;border:1px solid #ddd;border-radius:6px;background-color:white;cursor:pointer;transition:all .2s ease;text-align:center;min-height:52px;height:52px;display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;box-sizing:border-box;overflow:hidden;word-break:break-word}.chinese-button,.polish-button{border-left:4px solid var(--primary-color)}.english-button{font-size:1.15rem;border-left:4px solid var(--secondary-color)}.match-button:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 4px 8px rgba(0,0,0,.1)}.match-button:disabled{opacity:.7;cursor:not-allowed}.match-button.selected{border-color:var(--accent-color);background-color:rgba(79,195,247,.1);box-shadow:0 0 0 2px var(--accent-color)}.match-button.completed{border-color:#4CAF50;background-color:rgba(76,175,80,.1);color:#2E7D32}.match-button.error{border-color:#F44336;background-color:rgba(244,67,54,.1);animation:shake .5s}.word{font-weight:600;font-size:.86rem;max-width:100%;line-height:.9;margin-bottom:-.25rem;padding:0}.pinyin,.pronunciation{font-size:.2rem;opacity:.5;font-weight:400;color:#666;margin-top:-.3rem;padding:0;line-height:.7}.game-instructions{margin:1rem 0;padding:1rem;background-color:#f9f9f9;border-radius:6px;font-size:.95rem;color:#555}.reset-game-btn{display:block;margin:1rem auto;padding:.75rem 1.5rem;background-color:var(--secondary-color);color:white;border:none;border-radius:4px;font-size:1rem;cursor:pointer;transition:background-color .2s}.reset-game-btn:hover{background-color:var(--primary-color)}.word-matching-completed,.word-matching-empty,.word-matching-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:300px;text-align:center;padding:2rem}.word-matching-completed h2{color:var(--primary-color);margin-bottom:1rem}.play-again-btn{margin-top:1.5rem;padding:.75rem 1.5rem;background-color:var(--primary-color);color:white;border:none;border-radius:4px;font-size:1rem;cursor:pointer;transition:background-color .2s}.play-again-btn:hover{background-color:var(--secondary-color)}.confetti-btn{margin-top:1rem;padding:.5rem 1rem;background-color:rgba(79,195,247,.2);border:none;border-radius:50%;font-size:1.5rem;cursor:pointer;transition:transform .3s ease,background-color .2s ease}.confetti-btn:hover{transform:scale(1.2);background-color:rgba(79,195,247,.4)}@keyframes shake{0%,to{transform:translateX(0)}10%,30%,50%,70%,90%{transform:translateX(-5px)}20%,40%,60%,80%{transform:translateX(5px)}}@media (max-width:768px){.word-matching-game{padding:1rem}.match-container{flex-direction:row;gap:.75rem;margin-bottom:1rem}.match-button{padding:.5rem .25rem;font-size:.8rem;min-height:55px;height:55px}.word{font-size:.8rem;margin-bottom:-.25rem}.pinyin{font-size:.16rem;margin-top:-.3rem}.game-header{margin-bottom:1rem}.game-round,.game-score{font-size:1rem}}.header-controls{display:flex;align-items:center;justify-content:space-between;width:100%}.admin-dropdown-container{position:relative;margin-left:15px}.admin-button{background-color:var(--secondary-color);color:white;border:none;border-radius:4px;padding:8px 16px;cursor:pointer;font-weight:700;display:flex;align-items:center;gap:5px}.admin-button:hover{background-color:var(--primary-color)}.admin-menu{position:absolute;top:100%;right:0;background-color:white;border-radius:4px;box-shadow:0 2px 10px rgba(0,0,0,.1);z-index:1000;min-width:180px}.admin-menu .dropdown-item{padding:10px 15px;display:block;color:var(--text-color);text-decoration:none;border-bottom:1px solid #eee}.admin-menu .dropdown-item:hover{background-color:#f5f5f5}.category-manager{padding:20px;max-width:800px;margin:0 auto}.page-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.back-button{padding:8px 16px;background-color:#f0f0f0;border:1px solid #ddd;border-radius:4px;cursor:pointer}.message{padding:10px;margin-bottom:20px;border-radius:4px}.message.success{background-color:#d4edda;color:#155724;border:1px solid #c3e6cb}.message.error{background-color:#f8d7da;color:#721c24;border:1px solid #f5c6cb}.categories-form{background-color:white;padding:20px;border-radius:8px;box-shadow:0 2px 10px rgba(0,0,0,.1)}.categories-list,.form-description{margin-bottom:20px}.category-item{display:flex;margin-bottom:10px}.category-input{flex:1 1;padding:10px;border:1px solid #ddd;border-radius:4px;margin-right:10px;font-size:16px}.delete-button{background-color:#f44336;color:white;border:none;border-radius:4px;width:36px;font-size:18px;cursor:pointer}.form-actions{display:flex;justify-content:flex-end}.save-button{padding:10px 20px;background-color:#4caf50;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer}.save-button:hover{background-color:#45a049}:root{--version:"v1.0.2513";--primary-color:#4a6fa5;--secondary-color:#166088;--accent-color:#4fc3f7;--background-color:#f8f9fa;--text-color:#333;--card-shadow:0 4px 8px rgba(0,0,0,0.1);--card-hover-shadow:0 8px 16px rgba(0,0,0,0.2);--card-border-radius:8px}*{box-sizing:border-box;margin:0;padding:0}body,html{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;background-color:var(--background-color);color:var(--text-color)}.container{min-height:100vh;max-width:800px;margin:0 auto;padding:0}.app-header,.container{display:flex;flex-direction:column}.app-header{background-color:var(--primary-color);color:white;padding:1rem 2rem;justify-content:center;align-items:center}@media (min-width:768px){.app-header{flex-direction:row;justify-content:space-between}}.app-title{display:flex;align-items:baseline;margin-bottom:1rem}.app-title h1{font-size:2rem;margin:0;text-align:center}@media (min-width:768px){.app-title{margin-bottom:0}}.version{font-size:.9rem;margin-left:.5rem;opacity:.7}.counter-category-bar{flex-wrap:wrap;gap:10px}.flashcard-counter{font-size:1rem;white-space:nowrap}.game-stats{display:flex;gap:1rem;align-items:center}.game-round,.game-score{font-size:1rem;font-weight:700;color:var(--primary-color);white-space:nowrap}.category-selector{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end;margin-left:auto}.category-selector-inline{display:flex;flex-direction:row;align-items:center;gap:.5rem}.total-words-count{font-size:.8rem;color:#666;margin-top:4px;font-style:italic}.category-selector label{font-size:.9rem;font-weight:700;white-space:nowrap}.category-selector select{padding:.4rem;border-radius:4px;border:1px solid #ccc;background-color:white;font-size:.9rem;max-width:150px;min-width:120px}.display-toggle{display:flex;align-items:center}.toggle-btn{background-color:var(--primary-color);color:white;border:none;border-radius:var(--card-border-radius);padding:.5rem 1rem;font-size:.9rem;cursor:pointer;transition:all .3s ease}.toggle-btn:hover{background-color:var(--secondary-color);transform:translateY(-2px)}.toggle-btn.active{background-color:var(--accent-color);color:var(--text-color);font-weight:700}.counter-category-bar{display:flex;justify-content:space-between;align-items:center;flex-wrap:nowrap;margin-bottom:1rem;width:100%;min-height:32px}@media (max-width:600px){.counter-category-bar{display:flex;justify-content:space-between;align-items:center;padding:.3rem .5rem;gap:4px}.top-counter{align-self:center;margin:0 0 .5rem}.category-selector{justify-content:flex-end;margin-left:auto;display:flex;align-items:center}.category-selector label{font-size:.7rem;margin-right:2px;white-space:nowrap}.category-selector select{max-width:85px;font-size:.7rem;padding:.2rem}.under-card{margin:.8rem 0}.under-card .toggle-btn{width:100%;max-width:250px;font-size:.8rem}.toggle-btn{width:100%;padding:.5rem;font-size:.8rem;text-align:center}}.main-content{flex:1 1;padding:1rem}.app-layout{display:flex;flex-direction:column;max-width:800px;margin:0 auto;gap:2rem}@media (max-width:768px){.app-layout{grid-template-columns:1fr}}.sidebar{background-color:white;border-radius:var(--card-border-radius);padding:1.5rem;box-shadow:var(--card-shadow)}.add-word-form h3{margin-bottom:1.5rem;color:var(--primary-color);font-size:1.7rem;text-align:center}.input-group{margin-bottom:1rem}.input-group label{display:block;margin-bottom:.5rem;font-weight:700;font-size:1.2rem}.input-group input,.translation-input-wrapper input,.voice-input-wrapper input{width:100%;padding:.75rem;border:1px solid #ddd;border-radius:4px;font-size:1.1rem;box-sizing:border-box}.translation-input-wrapper,.voice-input-wrapper{display:flex;gap:.5rem;width:100%}.translate-btn,.voice-btn{background-color:var(--secondary-color);color:white;border:none;border-radius:4px;padding:.75rem;font-size:1.1rem;cursor:pointer;min-width:100px}.voice-btn.active{background-color:var(--accent-color);animation:pulse 1.5s infinite}.add-btn{background-color:var(--primary-color);color:white;border:none;border-radius:4px;padding:1rem;width:100%;font-size:1.2rem;font-weight:700;cursor:pointer;margin-top:1.5rem;transition:background-color .2s}.add-btn:hover{background-color:var(--secondary-color)}.flashcard-container{display:flex;flex-direction:column;align-items:center;gap:1.5rem;width:100%;max-width:500px;margin:0 auto;padding-bottom:1rem}.flashcard-counter{text-align:center;font-size:1.2rem;font-weight:700;color:var(--primary-color)}.under-card{width:100%;display:flex;justify-content:center;margin:1rem 0}.under-card .toggle-btn{min-width:180px}.flashcard-navigation{display:flex;justify-content:space-between;align-items:center;width:100%;margin-top:1.5rem;padding:.5rem 0}.nav-btn{background-color:var(--primary-color);color:white;border:none;border-radius:4px;padding:.75rem 1rem;width:48%;font-size:1.1rem;font-weight:700;cursor:pointer;transition:background-color .2s,opacity .2s}.nav-btn:hover:not(:disabled){background-color:var(--secondary-color)}.nav-btn:disabled{opacity:.5;cursor:not-allowed}.form-container{width:100%;background-color:white;border-radius:var(--card-border-radius);padding:1.5rem;box-shadow:var(--card-shadow);margin-top:2rem}.total-wordcount{font-size:1.1rem;font-weight:500;color:var(--primary-color);padding:.5rem 0;margin-bottom:.5rem;text-align:center;border-bottom:1px solid rgba(0,0,0,.05)}.single-card-container{display:flex;justify-content:center;width:100%;height:100%}.single-card-container .flashcard{width:100%;max-width:500px;height:300px;margin:0 auto}.flashcard-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));grid-gap:1.5rem;gap:1.5rem}.flashcard{height:260px;perspective:1000px;cursor:pointer;margin-bottom:1rem}.card-inner{position:relative;width:100%;height:100%;transition:transform .6s;transform-style:preserve-3d;box-shadow:var(--card-shadow);border-radius:var(--card-border-radius)}.flashcard:hover .card-inner{box-shadow:var(--card-hover-shadow)}.flashcard.flipped .card-inner{transform:rotateY(180deg)}.card-back h3,.card-front h3{font-size:2.2rem;margin-bottom:.8rem}.card-back h3,.card-front h3,.pinyin{max-width:100%;overflow-wrap:break-word;word-wrap:break-word}.pinyin{font-size:1.5rem;margin-top:.5rem;color:inherit;font-style:italic;font-weight:400}.card-back,.card-front{position:absolute;width:100%;height:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:1.5rem;border-radius:var(--card-border-radius);overflow:hidden;text-align:center}.card-front{background-color:white;color:black}.card-back{background-color:var(--secondary-color);color:white;transform:rotateY(180deg)}.card-actions{position:absolute;bottom:.5rem;right:.5rem;display:flex;gap:.5rem;z-index:10}.delete-btn,.speak-btn{background:rgba(255,255,255,.2);border:none;border-radius:50%;cursor:pointer;font-size:1.8rem;opacity:.9;transition:opacity .2s,background .2s;padding:.3rem;width:2.5rem;height:2.5rem;display:flex;align-items:center;justify-content:center}.delete-btn:hover,.speak-btn:hover{opacity:1}.empty-state{color:#888}.empty-state,.error,.loading{text-align:center;padding:3rem}.error{color:#d32f2f}.footer{background-color:var(--primary-color);color:white;text-align:center;padding:1rem;font-size:.8rem;opacity:.8;display:flex;flex-direction:column;gap:.25rem}.footer .version-text{font-size:.75rem;opacity:.9}@keyframes pulse{0%{opacity:1}50%{opacity:.6}to{opacity:1}}