@charset "utf-8";
/* CSS Document */
* { box-sizing: border-box; }
body { background: #f8fafc; margin: 0; padding: 16px; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
.card { max-width: 1200px; margin: 0 auto; background: transparent; padding: 0; }
.section-card { background: white; border-radius: 24px; padding: 20px; box-shadow: 0 8px 20px rgba(0,0,0,0.03), 0 2px 6px rgba(0,0,0,0.05); border: 1px solid #eef2f6; width: 100%; transition: all 0.2s; }
@media (max-width: 640px) { .section-card { padding: 16px 14px; border-radius: 20px; } }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; border-bottom: 2px solid #cbd5e1; padding-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.card-header h3 { margin: 0; font-weight: 600; color: #1e293b; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.badge-sub { background: #eef2ff; color: #4f46e5; padding: 4px 12px; border-radius: 30px; font-size: 0.75rem; white-space: nowrap; }
.badge-root { background: #ede9fe; color: #6d28d9; padding: 4px 14px; border-radius: 30px; font-size: 0.75rem; display: inline-flex; align-items: center; gap: 6px; }
.btn-group { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.btn { background: #1e293b; color: white; border: none; padding: 10px 20px; border-radius: 48px; font-size: 0.9rem; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #334155; transition: 0.2s; }
@media (max-width: 640px) { .btn { padding: 12px 24px; font-size: 1rem; } }
.btn-primary { background: linear-gradient(145deg, #8b5cf6, #6d28d9); border: none; box-shadow: 0 4px 10px rgba(139,92,246,0.3); }
.btn-outline { background: white; color: #1e293b; border: 1.5px solid #cbd5e1; }
.menu-tabs { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.menu-tabs a { background: white; padding: 8px 20px; border-radius: 40px; color: #1e293b; text-decoration: none; font-weight: 500; border: 1.5px solid #cbd5e1; font-size: 0.9rem; transition: 0.2s; }
.menu-tabs a.active { background: #8b5cf6; border-color: #8b5cf6; color: white; }
.single-card-container { display: block; }
.cards-wrapper { position: relative; min-height: 300px; }
.card-item { display: none; transition: opacity 0.2s; }
.card-item.active { display: block; }
.word-entry { background: #fafcff; border-radius: 18px; padding: 14px 18px; margin-bottom: 12px; border: 1px solid #eef2f6; }
.word-title { font-size: 1.1rem; font-weight: 700; color: #1e293b; margin-bottom: 8px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.word-left { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.word-tag { background: #eef2ff; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; display: inline-block; margin: 4px 6px 4px 0; white-space: nowrap; cursor: pointer; transition: 0.2s; }
.word-tag:hover { background: #e0e7ff; transform: translateY(-1px); }
.word-pron { font-size: 0.75rem; color: #64748b; font-family: monospace; background: #f1f5f9; padding: 2px 8px; border-radius: 20px; margin-left: 6px; }
@media (max-width: 480px) { .word-tag { font-size: 0.7rem; padding: 3px 10px; } .word-pron { font-size: 0.7rem; } }
.control-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.combo-row { display: flex; align-items: center; gap: 12px; margin: 16px 0 8px; padding: 12px 16px; background: #f8fafc; border-radius: 20px; flex-wrap: wrap; }
@media (max-width: 640px) { .combo-row { flex-direction: column; align-items: stretch; gap: 10px; } .combo-row select, .combo-row button { width: 100%; } }
.combo-row select { padding: 10px 16px; border-radius: 30px; border: 1.5px solid #e2e8f0; background: white; font-size: 0.9rem; cursor: pointer; min-width: 120px; }
.combo-row .root-display { font-size: 1.2rem; font-weight: 600; color: #1e293b; padding: 0 8px; text-align: center; }
.combo-row .btn-outline.btn-sm, .combo-row .btn-sm { padding: 6px 12px; border-radius: 6px; height: auto; line-height: normal; font-size: 0.9rem; white-space: nowrap; }
@media (max-width: 640px) { .combo-row .btn-outline.btn-sm, .combo-row .btn-sm { padding: 6px 12px; font-size: 1rem; } }
.detail-panel { background: white; border-radius: 24px; padding: 20px 24px; box-shadow: 0 20px 35px -8px rgba(0,0,0,0.1); border: 1px solid #eef2f6; margin-top: 20px; }
.detail-panel.hidden { display: none; }
.detail-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; border-bottom: 2px solid #cbd5e1; padding-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.loading-placeholder { text-align: center; padding: 40px; color: #64748b; }
.page-control { display: flex; justify-content: center; gap: 24px; margin: 24px 0 16px; align-items: center; flex-wrap: wrap; }
.page-control button { min-width: 100px; }
.nav-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.nav-btn { background: white; padding: 8px 18px; border-radius: 40px; color: #1e293b; text-decoration: none; font-weight: 500; border: 1px solid #cbd5e1; font-size: 0.9rem; }
.nav-btn.active { background: #8b5cf6; color: white; border-color: #8b5cf6; }
.footer-note { text-align: center; margin-top: 24px; font-size: 0.8rem; color: #94a3b8; }
input, select, button { touch-action: manipulation; }
.speak-btn, .inline-speak, .root-speak-btn { background: none; border: none; color: #8b5cf6; font-size: 1rem; cursor: pointer; padding: 4px 8px; border-radius: 30px; transition: 0.2s; }
.speak-btn:hover, .inline-speak:hover, .root-speak-btn:hover { background: #f3e8ff; }
@media (max-width: 640px) { .speak-btn, .inline-speak, .root-speak-btn { font-size: 1rem; padding: 6px 8px; } }
.affix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.affix-card { background: #fafcff; border: 1px solid #eef2f6; border-radius: 20px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: flex-start; transition: 0.2s; cursor: pointer; }
.affix-card:hover { background: #f1f5f9; transform: translateY(-2px); }
.affix-left { flex: 1; width: 100%; }
.affix-name-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 6px; }
.affix-name { font-weight: 700; font-size: 1.2rem; color: #1e293b; background: none; padding: 0; }
.affix-actions { display: flex; gap: 8px; }
.affix-pron { font-size: 0.8rem; color: #64748b; font-family: monospace; background: #f1f5f9; padding: 2px 8px; border-radius: 20px; display: inline-block; margin-top: 4px; }
.affix-summary { font-size: 0.9rem; color: #334155; margin: 8px 0 0 0; line-height: 1.5; }
.divider { height: 1px; background: #eef2f6; margin: 12px 0; }
.error-message { background: #fee2e2; border: 1px solid #fecaca; border-radius: 20px; padding: 16px; color: #b91c1c; margin-top: 16px; }
.meaning-row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
@media (max-width: 640px) { .affix-grid { grid-template-columns: 1fr; } }
.voice-input-wrapper { position: relative; flex: 1; display: flex; align-items: center; }
.voice-input-wrapper input { flex: 1; padding: 12px; border-radius: 40px; border: 1.5px solid #e2e8f0; font-size: 1rem; padding-right: 48px; }
.voice-mic-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #8b5cf6; font-size: 1.2rem; cursor: pointer; padding: 6px; border-radius: 30px; transition: 0.2s; }
.voice-mic-btn:active { background: #f3e8ff; }
.voice-mic-btn.recording-active, .recording-active { background: #f97316 !important; color: white !important; animation: pulse 0.8s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.7; } 100% { transform: scale(1); opacity: 1; } }
.basic-card { background: #fafcff; border: 1px solid #eef2f6; border-radius: 20px; padding: 16px; margin-bottom: 16px; transition: 0.2s; cursor: pointer; }
.basic-card:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0,0,0,0.05); background: #f8fafc; }
.basic-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.basic-word { font-size: 1.3rem; font-weight: 700; color: #1e293b; }
.basic-actions { display: flex; gap: 12px; }
.basic-pron { font-size: 0.85rem; color: #64748b; font-family: monospace; margin-bottom: 8px; }
.basic-mean { font-size: 0.95rem; color: #334155; line-height: 1.4; }
.basic-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s ease; backdrop-filter: blur(4px); }
.basic-modal-overlay:target { opacity: 1; visibility: visible; }
.basic-modal-container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; border-radius: 32px; width: 90%; max-width: 550px; max-height: 85vh; overflow-y: auto; padding: 24px 28px; box-shadow: 0 25px 45px -12px rgba(0,0,0,0.25); border: 1px solid rgba(139,92,246,0.2); }
.basic-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 12px; }
.basic-modal-word { font-size: 1.6rem; font-weight: 700; color: #1e293b; }
.basic-modal-buttons { display: flex; gap: 12px; align-items: center; }
.basic-modal-pron { font-size: 0.9rem; color: #64748b; margin-bottom: 16px; }
.basic-modal-divider { height: 2px; background: linear-gradient(90deg, #e2e8f0, #cbd5e1); margin: 16px 0; }
.basic-modal-mean { font-size: 1rem; color: #334155; margin-bottom: 20px; }
.basic-modal-example { background: #f8fafc; border-radius: 20px; padding: 16px; border-left: 4px solid #8b5cf6; }
.basic-modal-example p { margin: 0; color: #2d3a4b; line-height: 1.6; }
.close-modal { text-decoration: none; font-size: 28px; color: #64748b; transition: 0.2s; line-height: 1; margin-left: 8px; }
.close-modal:hover { color: #dc2626; transform: scale(1.1); }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s ease; backdrop-filter: blur(4px); }
.modal-overlay:target { opacity: 1; visibility: visible; }
.modal-container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; border-radius: 32px; width: 90%; max-width: 550px; max-height: 85vh; overflow-y: auto; padding: 24px 28px; box-shadow: 0 25px 45px -12px rgba(0,0,0,0.25); border: 1px solid rgba(139,92,246,0.2); }
.modal-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.modal-title { font-weight: 700; font-size: 1.5rem; color: #1e293b; }
.modal-pron { font-size: 0.9rem; color: #64748b; margin-top: 6px; margin-bottom: 16px; }
.modal-divider { height: 2px; background: linear-gradient(90deg, #e2e8f0, #cbd5e1); margin: 14px 0; }
.modal-summary { font-size: 1rem; color: #334155; line-height: 1.5; margin: 8px 0 16px; }
.modal-usage { background: #f8fafc; border-radius: 20px; padding: 16px 18px; margin-top: 10px; border-left: 3px solid #8b5cf6; }
.modal-usage h4 { margin: 0 0 8px; font-weight: 600; color: #1e293b; }
.modal-usage p { margin: 0; white-space: pre-wrap; line-height: 1.6; font-size: 0.92rem; color: #2d3a4b; }
@media (max-width: 640px) { .modal-container { width: 92%; padding: 20px; } }
.detail-icon { color: #f97316; margin-right: 6px; width: 1.2rem; display: inline-block; }
.detail-field { margin-bottom: 12px; display: flex; flex-wrap: wrap; align-items: baseline; }
.detail-field-label { font-weight: 600; min-width: 80px; color: #334155; }
.detail-field-content { flex: 1; color: #1e293b; }
.speak-btn { transition: none; }
.speak-btn:active { transform: scale(0.95); }
.rate-control-panel { background: white; border-radius: 60px; padding: 8px 20px; margin: 12px 0 20px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border: 1px solid #e2e8f0; box-shadow: 0 2px 6px rgba(0,0,0,0.02); }
.rate-label { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 500; color: #1e293b; }
.rate-slider { flex: 2; min-width: 160px; display: flex; align-items: center; gap: 12px; }
input[type="range"] { flex: 1; height: 4px; -webkit-appearance: none; background: #e2e8f0; border-radius: 5px; outline: none; }
input[type="range"]:focus { outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #8b5cf6; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.2); border: none; }
.rate-value { background: #f1f5f9; padding: 2px 10px; border-radius: 30px; font-family: monospace; font-size: 0.8rem; font-weight: 600; min-width: 48px; text-align: center; color: #0f172a; }
@media (max-width: 640px) { .rate-control-panel { padding: 10px 16px; } .rate-slider { min-width: 120px; } }

