:root{--background-color: #111827;--card-background-color: #1f2937;--text-primary: #f9fafb;--text-secondary: #d1d5db;--text-tertiary: #9ca3af;--accent-color: #4f46e5;--accent-color-hover: #4338ca;--border-color: #374151;--error-color: #f87171;--favorite-color: #f59e0b}body{margin:0;font-family:Inter,sans-serif;background-color:var(--background-color);color:var(--text-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#root{min-height:100vh;display:flex;flex-direction:column}.app-container{display:flex;flex-direction:column;align-items:center;padding:2rem;width:100%;max-width:800px;margin:auto;box-sizing:border-box}.header{width:100%;text-align:center;margin-bottom:2rem;display:flex;flex-direction:column;align-items:center;gap:1.5rem}.title-container{display:flex;align-items:center;justify-content:center;gap:1rem}.logo{height:4rem;width:auto;object-fit:contain}.title{font-family:Playfair Display,serif;font-size:3rem;font-weight:700;background:linear-gradient(to right,#a5b4fc,#6366f1);background-clip:text;-webkit-background-clip:text;color:transparent;-webkit-text-fill-color:transparent;margin:0}.controls-container{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:1rem;width:100%}.user-info{display:flex;align-items:center;gap:.75rem;padding:.5rem 1rem;background-color:#ffffff0d;border-radius:.5rem;border:1px solid var(--border-color)}.user-name{color:var(--text-primary);font-size:.9rem;font-weight:500}.btn-sm{padding:.4rem .75rem;font-size:.85rem}.language-selector{flex-shrink:0}.language-select{height:44px;background-color:var(--card-background-color);color:var(--text-primary);border:1px solid var(--border-color);border-radius:.5rem;padding:.5rem 1rem;font-size:1rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%239CA3AF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-13%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2013l128%20128c3.6%203.6%207.8%205.4%2013%205.4s9.4-1.8%2013-5.4l128-128c3.6-3.6%205.4-7.8%205.4-13%200-5-1.8-9.4-5.4-13z%22%2F%3E%3C%2Fsvg%3E);background-repeat:no-repeat;background-position:right .7em top 50%;background-size:.65em auto;padding-right:2.5em;transition:border-color .2s}.language-select:hover{border-color:var(--text-tertiary)}.language-select:disabled{opacity:.5;cursor:not-allowed;background-color:#2a3344}.search-form{display:flex;flex-grow:1;max-width:400px}.search-input{width:100%;height:44px;background-color:var(--card-background-color);border:1px solid var(--border-color);border-right:none;color:var(--text-primary);padding:0 1rem;font-size:1rem;border-radius:.5rem 0 0 .5rem;transition:border-color .2s}.search-input:focus{outline:none;border-color:var(--accent-color)}.search-btn{border-radius:0 .5rem .5rem 0;background-color:var(--accent-color);padding:.5rem 1rem}.search-btn:hover:not(:disabled){background-color:var(--accent-color-hover)}.idiom-card{background-color:var(--card-background-color);border:1px solid var(--border-color);border-radius:1rem;padding:2rem;width:100%;min-height:350px;display:flex;flex-direction:column;gap:1.5rem;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;box-sizing:border-box}.idiom-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1rem}.idiom-text{font-family:Playfair Display,serif;font-size:clamp(1.75rem,5vw,2.25rem);margin:0;color:var(--text-primary);flex-grow:1}.idiom-actions{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.idiom-section h3{font-size:1.25rem;color:var(--text-secondary);border-bottom:1px solid var(--border-color);padding-bottom:.5rem;margin:0 0 1rem}.idiom-section p{color:var(--text-tertiary);line-height:1.6;margin:0}.footer{width:100%;margin-top:2rem;display:flex;flex-direction:column;align-items:center;gap:1.5rem}.controls{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap}.copyright{font-size:.875rem;color:var(--text-tertiary)}.btn{padding:.75rem 1.5rem;border:none;border-radius:.5rem;font-size:1rem;font-weight:600;cursor:pointer;transition:all .2s ease-in-out;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;white-space:nowrap}.btn-primary{background-color:var(--accent-color);color:#fff}.btn-primary:hover:not(:disabled){background-color:var(--accent-color-hover)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-secondary{background-color:transparent;color:var(--text-secondary);border:1px solid var(--border-color);min-width:120px}.btn-secondary:hover:not(:disabled){background-color:#2a3344;border-color:var(--text-tertiary)}.btn-favorite{background-color:transparent;border:2px solid var(--border-color);border-radius:50%;padding:.75rem;color:var(--text-tertiary);transition:all .3s ease;cursor:pointer;display:flex;align-items:center;justify-content:center;min-width:3.5rem;min-height:3.5rem}.btn-favorite:hover:not(:disabled){background-color:#ffffff1a;color:#fbbf24;border-color:#fbbf24;transform:scale(1.1)}.btn-favorite.is-favorite{color:var(--favorite-color)!important;background:linear-gradient(135deg,#f59e0b33,#fbbf241a);border-color:var(--favorite-color);border-width:2px;box-shadow:0 0 20px #f59e0b4d}.btn-favorite.is-favorite:hover{background:linear-gradient(135deg,#f59e0b4d,#fbbf2433);transform:scale(1.1);box-shadow:0 0 25px #f59e0b80}.favorite-icon{width:2rem;height:2rem;transition:transform .3s ease}.btn-favorite:active .favorite-icon{transform:scale(.85)}.btn-favorite.is-favorite .favorite-icon{animation:pulse .5s ease}@keyframes pulse{0%,to{transform:scale(1)}50%{transform:scale(1.2)}}.loading-container,.error-container,.placeholder-container{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;flex-grow:1;color:var(--text-tertiary)}.error-container{color:var(--error-color);gap:1rem}.error-message-main{font-size:1.1rem;line-height:1.6;max-width:500px}.error-idiom{font-size:.95rem;color:var(--text-secondary);font-style:italic}.error-actions{margin-top:1rem}.loading-spinner{width:48px;height:48px;border:4px solid var(--border-color);border-top-color:var(--accent-color);border-radius:50%;animation:spin 1s linear infinite;margin-bottom:1rem}.btn-spinner{width:1.25em;height:1.25em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .75s linear infinite}.search-results-container{display:flex;flex-direction:column;width:100%}.search-results-header{font-size:1.25rem;color:var(--text-secondary);margin:0 0 1rem}.search-results-list{list-style:none;padding:0;margin:0;max-height:250px;overflow-y:auto}.search-result-item{width:100%;text-align:left;background:none;border:none;padding:.75rem .5rem;border-radius:.5rem;cursor:pointer;display:flex;justify-content:space-between;align-items:center;color:var(--text-secondary);transition:background-color .2s}.search-result-item:hover{background-color:#ffffff0d}.search-result-idiom{font-size:1.1rem;font-weight:500}.search-result-lang{font-size:.8rem;background-color:var(--border-color);color:var(--text-primary);padding:.2rem .5rem;border-radius:.25rem}.error-message{color:var(--error-color);text-align:center;margin-top:1rem}.example-list{list-style-type:disc;padding-left:1.25rem;margin:0;color:var(--text-tertiary)}.example-list li{line-height:1.6;padding-left:.25rem}.example-list li+li{margin-top:.5rem}.related-container{display:flex;flex-direction:column;width:100%}.related-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;flex-wrap:wrap;gap:1rem}.related-header h3{font-size:1.25rem;color:var(--text-secondary);margin:0;flex-grow:1}.related-header h3 em{font-style:normal;font-weight:700;color:var(--text-primary)}.related-list{list-style:none;padding:0;margin:0;max-height:250px;overflow-y:auto}.related-item{width:100%;text-align:left;font-size:1.1rem;font-weight:500;background:none;border:none;padding:.75rem .5rem;border-radius:.5rem;cursor:pointer;color:var(--text-secondary);transition:background-color .2s,color .2s}.related-item:hover{background-color:#ffffff0d;color:var(--text-primary)}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#000000b3;display:flex;align-items:center;justify-content:center;z-index:50;padding:1rem}.modal-content{background-color:var(--card-background-color);border:1px solid var(--border-color);border-radius:1rem;padding:2rem;width:100%;max-width:400px;position:relative;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a}.modal-close-btn{position:absolute;top:1rem;right:1rem;background:none;border:none;color:var(--text-tertiary);cursor:pointer;padding:.25rem;border-radius:50%}.modal-close-btn:hover{color:var(--text-primary);background-color:#ffffff1a}.modal-title{font-size:1.5rem;font-weight:600;margin-top:0;margin-bottom:1.5rem;color:var(--text-primary)}.modal-instructions{color:var(--text-secondary);line-height:1.6}.modal-instructions p{margin:0 0 1rem}.modal-instructions ol{padding-left:1.5rem;margin:0}.modal-instructions li{margin-bottom:.75rem}.cross-lang-section{padding-top:1.5rem;margin-top:1.5rem;border-top:1px solid var(--border-color)}.mini-loading-container{display:flex;align-items:center;gap:.75rem;color:var(--text-tertiary);font-size:.9rem}.cross-lang-list{display:flex;flex-direction:column;gap:.75rem}.cross-lang-item{color:var(--text-tertiary)}.cross-lang-item strong{color:var(--text-secondary);margin-right:.5rem}.cross-lang-item button{background:none;border:none;color:var(--accent-color);text-decoration:underline;cursor:pointer;padding:0;font-size:1rem;font-family:inherit;text-align:left}.cross-lang-item button:hover{color:var(--accent-color-hover)}.favorites-list-container{display:flex;flex-direction:column;width:100%;gap:1rem}.favorites-list-header{font-size:1.5rem;color:var(--text-primary);margin:0;padding-bottom:.75rem;border-bottom:2px solid var(--border-color)}.favorites-list{list-style:none;padding:0;margin:0;max-height:400px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}.favorite-list-item{width:100%;text-align:left;background-color:#ffffff08;border:1px solid var(--border-color);border-radius:.75rem;padding:1rem;cursor:pointer;transition:all .2s ease;display:flex;justify-content:space-between;align-items:center;gap:1rem}.favorite-list-item:hover{background-color:#ffffff14;border-color:var(--accent-color);transform:translate(4px)}.favorite-item-content{display:flex;flex-direction:column;gap:.25rem;flex-grow:1}.favorite-item-idiom{font-size:1.1rem;font-weight:600;color:var(--text-primary)}.favorite-item-lang{font-size:.85rem;color:var(--text-tertiary);background-color:var(--border-color);padding:.2rem .5rem;border-radius:.25rem;width:fit-content}.favorite-item-meta{display:flex;align-items:center;gap:.5rem;flex-shrink:0}.favorite-has-audio{font-size:1.2rem}.favorite-item-date{font-size:.75rem;color:var(--text-tertiary);white-space:nowrap}.favorites-btn{position:relative}.favorites-badge{position:absolute;top:-.5rem;right:-.5rem;background-color:var(--favorite-color);color:var(--background-color);font-size:.75rem;font-weight:700;padding:.15rem .4rem;border-radius:9999px;min-width:1.25rem;text-align:center;line-height:1}.toast-notification{position:fixed;bottom:2rem;left:50%;transform:translate(-50%);background-color:var(--accent-color);color:#fff;padding:1rem 1.5rem;border-radius:.5rem;box-shadow:0 10px 15px -3px #0000004d,0 4px 6px -2px #0003;z-index:1000;animation:slideUp .3s ease-out;font-weight:500;max-width:90%;text-align:center}@keyframes slideUp{0%{opacity:0;transform:translate(-50%) translateY(20px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.login-modal{max-width:400px;width:90%}.login-header{text-align:center;margin-bottom:2rem}.login-icon{width:3rem;height:3rem;color:var(--accent-color);margin:0 auto 1rem}.login-subtitle{color:var(--text-tertiary);font-size:.9rem;margin-top:.5rem}.login-form{display:flex;flex-direction:column;gap:1.5rem}.form-group{display:flex;flex-direction:column;gap:.5rem}.form-group label{color:var(--text-secondary);font-weight:500;font-size:.9rem}.form-input{background-color:var(--card-background-color);border:1px solid var(--border-color);border-radius:.5rem;padding:.75rem 1rem;color:var(--text-primary);font-size:1rem;transition:border-color .2s}.form-input:focus{outline:none;border-color:var(--accent-color)}.login-error{background-color:#f871711a;border:1px solid var(--error-color);border-radius:.5rem;padding:.75rem;color:var(--error-color);font-size:.9rem;text-align:center}.login-btn{width:100%;padding:.875rem;font-size:1rem}.login-demo{margin-top:1.5rem;padding-top:1.5rem;border-top:1px solid var(--border-color);text-align:center;font-size:.85rem;color:var(--text-tertiary)}.login-demo p{margin:.25rem 0}.login-demo code{background-color:var(--border-color);padding:.2rem .4rem;border-radius:.25rem;color:var(--text-primary);font-family:Courier New,monospace}.bg-slate-800{background-color:var(--card-background-color)}.bg-slate-800\/50{background-color:#1f293780}.bg-slate-900{background-color:var(--background-color)}.bg-slate-900\/50{background-color:#11182780}.bg-slate-900\/70{background-color:#111827b3}.bg-slate-700{background-color:#374151}.bg-slate-700\/50{background-color:#37415180}.bg-slate-600{background-color:var(--border-color)}.border-slate-700{border-color:var(--border-color)}.border-slate-600{border-color:#4b5563}.border-slate-500{border-color:#6b7280}.text-white{color:var(--text-primary)}.text-slate-100{color:#f3f4f6}.text-slate-200{color:#e5e7eb}.text-slate-300{color:var(--text-secondary)}.text-slate-400{color:var(--text-tertiary)}.text-slate-500{color:#6b7280}.text-indigo-300{color:#a5b4fc}.text-indigo-400{color:#818cf8}.text-green-400{color:#4ade80}.text-red-300{color:#fca5a5}.text-red-400{color:var(--error-color)}.bg-indigo-500,.bg-indigo-600{background-color:var(--accent-color)}.bg-indigo-700{background-color:var(--accent-color-hover)}.bg-red-900\/50{background-color:#7f1d1d80}.border-red-700{border-color:#b91c1c}.border-indigo-500,.hover\:border-indigo-500:hover{border-color:var(--accent-color)}.hover\:bg-indigo-700:hover{background-color:var(--accent-color-hover)}.hover\:bg-slate-700:hover{background-color:#374151}.hover\:shadow-lg:hover{box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mr-2{margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-full{border-radius:9999px}.rounded-2xl{border-radius:1rem}.shadow-lg{box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}.shadow-2xl{box-shadow:0 25px 50px -12px #00000040}.shadow-md{box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.border{border-width:1px}.border-2{border-width:2px}.border-l-2{border-left-width:2px}.border-b-2{border-bottom-width:2px}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-mono{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.italic{font-style:italic}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.space-x-3>*+*{margin-left:.75rem}.space-x-4>*+*{margin-left:1rem}.space-y-4>*+*{margin-top:1rem}.space-y-6>*+*{margin-top:1.5rem}.gap-8{gap:2rem}.w-full{width:100%}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-12{width:3rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-12{height:3rem}.h-20{height:5rem}.h-24{height:6rem}.h-28{height:7rem}.max-w-2xl{max-width:42rem}.max-h-80{max-height:20rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.whitespace-pre-wrap{white-space:pre-wrap}.leading-relaxed{line-height:1.625}.text-center{text-align:center}.animate-spin{animation:spin 1s linear infinite}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.backdrop-blur-sm{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pl-3{padding-left:.75rem}.opacity-50{opacity:.5}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{box-shadow:0 0 0 2px var(--accent-color)}.focus\:ring-indigo-500:focus{box-shadow:0 0 0 2px var(--accent-color)}.focus\:ring-green-500:focus{box-shadow:0 0 0 2px #10b981}.focus\:ring-offset-2:focus{box-shadow:0 0 0 2px transparent,0 0 0 4px var(--accent-color)}.focus\:ring-offset-slate-900:focus{box-shadow:0 0 0 2px transparent,0 0 0 4px var(--background-color)}.cursor-pointer{cursor:pointer}
