:root { --bg: #faf8f5; --card: #ffffff; --text: #1a1a1a; --muted: #6b6b6b; --accent: #2563eb; --accent-light: #dbeafe; --border: #e5e5e5; --shadow: 0 1px 3px rgba(0,0,0,0.08); --radius: 12px; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; } .container { max-width: 720px; margin: 0 auto; padding: 2rem 1.5rem; } header { text-align: center; margin-bottom: 2rem; } header h1 { font-family: 'Crimson Text', Georgia, serif; font-size: 2.5rem; font-weight: 700; color: var(--text); } .subtitle { color: var(--muted); font-size: 0.95rem; margin-top: 0.25rem; } /* Search */ .search-area { margin-bottom: 2rem; } /* Language selector */ .language-selector { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 0.75rem; flex-wrap: wrap; } .lang-btn { background: var(--card); border: 2px solid var(--border); border-radius: 20px; padding: 0.4rem 1rem; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.2s; color: var(--muted); } .lang-btn:hover { border-color: var(--accent); color: var(--accent); } .lang-btn.active { background: var(--accent); border-color: var(--accent); color: white; } .search-box { display: flex; gap: 0.5rem; background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); padding: 0.5rem; box-shadow: var(--shadow); transition: border-color 0.2s; } .search-box:focus-within { border-color: var(--accent); } .search-box input { flex: 1; border: none; outline: none; font-size: 1.1rem; padding: 0.5rem 0.75rem; background: transparent; font-family: inherit; } .search-box button:not(.mic-btn) { display: flex; align-items: center; gap: 0.4rem; background: var(--accent); color: white; border: none; border-radius: 8px; padding: 0.6rem 1.2rem; font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: background 0.2s; } .search-box button:not(.mic-btn):hover { background: #1d4ed8; } /* Mic / Voice button */ .mic-btn { display: flex; align-items: center; justify-content: center; background: none; border: 2px solid var(--border); border-radius: 50%; width: 42px; height: 42px; min-width: 42px; padding: 0; cursor: pointer; color: var(--muted); transition: all 0.2s; } .mic-btn:hover { border-color: var(--accent); color: var(--accent); } .mic-btn.listening { border-color: #ef4444; color: #ef4444; background: #fef2f2; animation: mic-pulse 1.2s ease-in-out infinite; } @keyframes mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); } 50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } } /* Settings */ .settings-toggle { text-align: center; margin-top: 0.75rem; } .settings-toggle button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 0.85rem; padding: 0.25rem 0.5rem; } .settings-toggle button:hover { color: var(--accent); } .settings-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-top: 0.75rem; } .settings-panel label { font-size: 0.85rem; font-weight: 500; display: block; margin-bottom: 0.4rem; } .settings-panel label a { color: var(--accent); } .settings-panel input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; font-family: monospace; margin-bottom: 0.5rem; } .settings-panel button { background: var(--accent); color: white; border: none; border-radius: 8px; padding: 0.4rem 1rem; font-size: 0.85rem; cursor: pointer; } .hint { font-size: 0.75rem; color: var(--muted); margin-top: 0.4rem; } /* Loading */ .loading { text-align: center; padding: 2rem; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 0.75rem; } .spinner { width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* Error */ .error { background: #fef2f2; color: #991b1b; padding: 1rem 1.25rem; border-radius: var(--radius); border: 1px solid #fecaca; margin-bottom: 1rem; } /* Result Card */ .result { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); animation: fadeIn 0.3s ease; } @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } } .word-header { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 0.5rem; flex-wrap: wrap; } .word-header h2 { font-family: 'Crimson Text', Georgia, serif; font-size: 2rem; font-weight: 700; } .phonetic { color: var(--muted); font-size: 1.1rem; font-style: italic; } .pos-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.5rem; } /* Transliteration & language badge */ .transliteration { font-size: 1rem; color: var(--muted); font-style: italic; margin-bottom: 0.4rem; } .language-badge { display: inline-block; background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 20px; text-transform: capitalize; margin-bottom: 1rem; } .def-example-translation { font-size: 0.85rem; color: var(--accent); font-style: italic; margin-top: 0.1rem; } .pos-tag { background: var(--accent-light); color: var(--accent); font-size: 0.8rem; font-weight: 500; padding: 0.2rem 0.65rem; border-radius: 20px; } .section { margin-bottom: 1.5rem; } .section h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.5rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--border); } /* Definitions */ .definition-item { margin-bottom: 1rem; padding-left: 1rem; border-left: 3px solid var(--accent-light); } .def-pos { font-size: 0.8rem; font-weight: 600; color: var(--accent); text-transform: italic; } .def-meaning { font-size: 1rem; margin: 0.15rem 0; } .def-example { font-style: italic; color: var(--muted); font-size: 0.9rem; } .def-example::before { content: '"'; } .def-example::after { content: '"'; } /* Tags */ .tag-list { display: flex; gap: 0.4rem; flex-wrap: wrap; } .tag { background: #f5f5f5; border: 1px solid var(--border); padding: 0.2rem 0.6rem; border-radius: 6px; font-size: 0.85rem; cursor: pointer; transition: all 0.15s; } .tag:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent); } /* Etymology & Usage */ .section p { font-family: 'Crimson Text', Georgia, serif; font-size: 1.05rem; color: var(--text); } /* Two columns */ .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } /* Error result */ .error-result { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 1.5rem; text-align: center; color: #92400e; } /* Footer */ footer { text-align: center; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); } /* Community: Like & Comments */ .community-section { margin-top: 2rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); } .like-row { display: flex; align-items: center; gap: 1rem; } .like-btn { display: flex; align-items: center; gap: 0.4rem; background: none; border: 2px solid var(--border); border-radius: 24px; padding: 0.5rem 1.1rem; font-size: 1rem; cursor: pointer; transition: all 0.2s; color: var(--muted); } .like-btn:hover { border-color: #ef4444; color: #ef4444; } .like-btn.liked { border-color: #ef4444; background: #fef2f2; color: #ef4444; } .comment-toggle-btn { background: none; border: none; font-size: 0.9rem; color: var(--muted); cursor: pointer; padding: 0.4rem 0; } .comment-toggle-btn:hover { color: var(--accent); } .comments-panel { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; } .comment-form { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; } .comment-form input, .comment-form textarea { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; font-size: 0.9rem; font-family: inherit; resize: vertical; } .comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--accent); } .comment-form button { align-self: flex-end; background: var(--accent); color: white; border: none; border-radius: 8px; padding: 0.45rem 1.1rem; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: background 0.2s; } .comment-form button:hover { background: #1d4ed8; } .comments-list { display: flex; flex-direction: column; gap: 0.75rem; } .comment-item { padding: 0.75rem; background: var(--bg); border-radius: 10px; border: 1px solid var(--border); } .comment-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; } .comment-name { font-weight: 600; font-size: 0.85rem; color: var(--accent); } .comment-time { font-size: 0.75rem; color: var(--muted); } .comment-text { font-size: 0.9rem; line-height: 1.5; color: var(--text); } .no-comments { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 1rem; } footer p { font-size: 0.8rem; color: var(--muted); } /* Responsive: tablets */ @media (max-width: 768px) { .container { max-width: 100%; padding: 1.25rem 1rem; } header h1 { font-size: 2rem; } .result { padding: 1.5rem; } .word-header h2 { font-size: 1.6rem; } } /* Responsive: phones */ @media (max-width: 480px) { .container { padding: 0.75rem; } header h1 { font-size: 1.5rem; } .subtitle { font-size: 0.8rem; } .two-col { grid-template-columns: 1fr; } .result { padding: 1rem; } .word-header { gap: 0.5rem; } .word-header h2 { font-size: 1.35rem; } .phonetic { font-size: 0.95rem; } .search-box { flex-direction: column; } .search-box button { width: 100%; justify-content: center; } .search-box .mic-btn { width: 42px; min-width: 42px; align-self: center; } .language-selector { gap: 0.35rem; } .lang-btn { padding: 0.35rem 0.7rem; font-size: 0.8rem; } .like-row { flex-wrap: wrap; } .community-section { padding: 1rem; } .comment-form textarea { min-height: 60px; } .section h3 { font-size: 0.8rem; } .definition-item { padding-left: 0.75rem; } footer p { font-size: 0.7rem; } }