/* ============================================
   CSS Variables for Easy Theming
   ============================================ */
:root {
    --primary-color: #1e3c72;
    --primary-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --secondary-color: #2a5298;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #666666;
    --border-color: #e1e8ed;
    --hover-color: #f8f9fa;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #4a6fa5;
    --secondary-color: #5a7fb8;
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --text-color: #e4e4e4;
    --text-muted: #a0a0a0;
    --border-color: #2a2a3e;
    --hover-color: #1e2947;
}

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Icon Utilities */
.bi {
    vertical-align: middle;
}

.text-danger {
    color: #dc3545;
}

/* ============================================
   Theme Toggle Button
   ============================================ */
.theme-toggle {
    position: fixed;
    top: 90px;
    right: 30px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(20deg);
    box-shadow: var(--shadow-lg);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 999;
    backdrop-filter: blur(10px);
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-icon {
    width: 300px;
    height: 80px;
    object-fit: contain;
}

.navbar-title h1 {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 3px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-subtitle {
    font-size: 0.85em;
    opacity: 0.95;
    font-weight: 300;
}

.navbar-stats {
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95em;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    font-weight: 600;
    transition: var(--transition);
}

.navbar-stats:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}


/* ============================================
   Container & Cards
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* ============================================
   Grid Layout
   ============================================ */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
    margin-bottom: 30px;
}

/* ============================================
   Word of the Day Card - Enhanced
   ============================================ */
.wotd-card {
    border-top: 5px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
}

.wotd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(42,82,152,0.03) 0%, transparent 100%);
    pointer-events: none;
}

.wotd-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.wotd-icon {
    font-size: 1.6em;
    color: #ffc107;
}

.wotd-title {
    font-size: 1.2em;
    font-weight: 700;
}

.wotd-date {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.wotd-word {
    font-size: 2em;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.wotd-ejaan {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.wotd-arti {
    margin-bottom: 15px;
}

.arti-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.arti-text {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1.05em;
}

.wotd-contoh {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(76, 175, 80, 0.03) 100%);
    padding: 18px;
    border-radius: var(--radius-md);
    margin-top: 20px;
    border-left: 4px solid #4CAF50;
}

.wotd-contoh-header {
    font-weight: 600;
    color: #388E3C;
    margin-bottom: 15px;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wotd-contoh-item {
    margin-bottom: 12px;
}

.wotd-contoh-item:last-child {
    margin-bottom: 0;
}

.contoh-lang-small {
    font-size: 0.8em;
    color: #388E3C;
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wotd-contoh-text {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95em;
    font-style: italic;
    padding-left: 20px;
}

.wotd-no-example {
    background: var(--hover-color);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9em;
}


.skeleton-line {
    height: 20px;
    background: var(--hover-color);
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-line.short {
    width: 60%;
}

/* ============================================
   Search Card
   ============================================ */
.search-card {
    position: relative;
}

.search-title {
    font-size: 1.3em;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

/* Search History */
.search-history {
    margin-bottom: 15px;
    padding: 12px;
    background: var(--hover-color);
    border-radius: var(--radius-md);
    animation: slideDown 0.3s ease;
}

.history-label {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85em;
    cursor: pointer;
    transition: var(--transition);
}

.history-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.history-tag .close-btn {
    font-size: 1.2em;
    line-height: 1;
    opacity: 0.6;
    cursor: pointer;
    transition: var(--transition);
}

.history-tag:hover .close-btn {
    opacity: 1;
    color: white;
}

/* Typo Suggestion */
.typo-suggestion {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: var(--radius-md);
    padding: 15px 20px;
    margin-bottom: 20px;
    display: none;
    animation: slideDown 0.3s ease;
}

[data-theme="dark"] .typo-suggestion {
    background: #3d3516;
    border-color: #ffc107;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typo-suggestion-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.typo-icon {
    font-size: 1.3em;
    color: #ffc107;
}

.typo-text {
    flex: 1;
    color: #856404;
}

[data-theme="dark"] .typo-text {
    color: #ffc107;
}

.typo-suggestion-word {
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    transition: var(--transition);
}

.typo-suggestion-word:hover {
    color: var(--secondary-color);
}

/* Search Input */
.search-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.input-with-icon {
    flex: 1;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1em;
    pointer-events: none;
}

#searchInput {
    width: 100%;
    padding: 16px 20px 16px 50px;
    font-size: 1.05em;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
    background: var(--card-bg);
    color: var(--text-color);
}

#searchInput:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(42, 82, 152, 0.1);
}

#searchInput:focus ~ .input-icon {
    color: var(--secondary-color);
}

.search-hint {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding: 10px;
    background: var(--hover-color);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--secondary-color);
}

.search-hint kbd {
    padding: 2px 6px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

/* Buttons */
.btn {
    padding: 16px 32px;
    font-size: 1.05em;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(42, 82, 152, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: var(--hover-color);
    border-color: var(--primary-color);
}

.btn-icon {
    font-size: 1.1em;
}

/* Alphabet Navigation */
.alphabet-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.alphabet-label {
    font-size: 0.95em;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 500;
}

.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.alphabet-btn {
    padding: 10px 14px;
    background: var(--hover-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-color);
    min-width: 45px;
    text-align: center;
}

.alphabet-btn:hover,
.alphabet-btn.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* ============================================
   Results Container
   ============================================ */
.results-container {
    background: var(--card-bg);
    padding: 35px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: none;
    animation: slideUp 0.4s ease;
    border: 1px solid var(--border-color);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.results-header h2 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.5em;
}

.results-count {
    color: var(--text-muted);
    font-size: 0.95em;
}

/* ============================================
   Result Item - Enhanced with Example Sentences
   ============================================ */
.result-item {
    padding: 25px;
    margin-bottom: 18px;
    background: var(--hover-color);
    border-radius: var(--radius-md);
    border-left: 5px solid var(--secondary-color);
    transition: var(--transition);
    position: relative;
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-item:nth-child(1) { animation-delay: 0.05s; }
.result-item:nth-child(2) { animation-delay: 0.1s; }
.result-item:nth-child(3) { animation-delay: 0.15s; }
.result-item:nth-child(4) { animation-delay: 0.2s; }
.result-item:nth-child(5) { animation-delay: 0.25s; }

.result-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    background: var(--card-bg);
}

.result-header-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 15px;
}

.result-kata {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--primary-color);
}

.result-actions {
    display: flex;
    gap: 8px;
}

.copy-btn {
    padding: 8px 12px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9em;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.similarity-badge {
    background: var(--primary-gradient);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.result-ejaan {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 12px;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-arti {
    margin-bottom: 15px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
}

.result-arti .arti-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-arti .arti-text {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1.05em;
}

/* Enhanced Example Sentences Styling */
.result-contoh {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08) 0%, rgba(76, 175, 80, 0.03) 100%);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-top: 15px;
    border-left: 4px solid #4CAF50;
}

.result-contoh-header {
    font-weight: 600;
    color: #388E3C;
    margin-bottom: 15px;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.example-number {
    font-weight: 600;
    color: #388E3C;
    margin-bottom: 10px;
    font-size: 0.9em;
    padding: 8px 12px;
    background: rgba(76, 175, 80, 0.15);
    border-radius: var(--radius-sm);
    display: inline-block;
}

.wotd-example-num {
    font-weight: 600;
    color: #388E3C;
    margin-bottom: 8px;
    font-size: 0.85em;
    padding: 6px 10px;
    background: rgba(76, 175, 80, 0.15);
    border-radius: var(--radius-sm);
    display: inline-block;
}

.contoh-item {
    margin-bottom: 15px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.contoh-item:last-child {
    margin-bottom: 0;
}

.contoh-manado {
    border-left: 3px solid #2196F3;
}

.contoh-indonesia {
    border-left: 3px solid #FF5722;
}

.contoh-lang {
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contoh-manado .contoh-lang {
    color: #2196F3;
}

.contoh-indonesia .contoh-lang {
    color: #FF5722;
}

.contoh-sentence {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1em;
    font-style: italic;
}

.no-example {
    background: var(--hover-color);
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.9em;
    border: 2px dashed var(--border-color);
}

.no-example i {
    font-size: 1.2em;
}

/* Related Words */
.related-words {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 2px solid var(--border-color);
}

.related-words-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 0.95em;
}

.related-tag {
    display: inline-block;
    padding: 8px 16px;
    background: #e8f0fe;
    color: var(--primary-color);
    border-radius: 20px;
    margin: 5px 8px 5px 0;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9em;
    border: 2px solid transparent;
}

[data-theme="dark"] .related-tag {
    background: rgba(42, 82, 152, 0.2);
}

.related-tag:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
}

/* Loading */
.loading {
    text-align: center;
    padding: 50px;
    color: var(--text-muted);
    font-size: 1.1em;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 1.4em;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    margin-top: 60px;
    padding: 30px 20px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 0.9em;
}

.footer-tech {
    margin-top: 8px;
    font-size: 0.85em;
    opacity: 0.8;
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-gradient);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 2000;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.show {
    display: flex;
}

.toast-icon {
    font-size: 1.3em;
}

.toast-message {
    flex: 1;
}

/* ============================================
   Score Details
   ============================================ */
.score-details {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    padding: 8px 0;
}

.score-detail {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(42, 82, 152, 0.1);
    border-radius: 15px;
    font-size: 0.85em;
    color: var(--primary-color);
    font-weight: 500;
}

[data-theme="dark"] .score-detail {
    background: rgba(74, 111, 165, 0.2);
    color: var(--secondary-color);
}

.score-detail i {
    font-size: 0.9em;
}

/* Multiple suggestions styling */
.typo-suggestion-word {
    display: inline-block;
    margin: 0 3px;
}

.typo-suggestion-word:not(:last-child)::after {
    content: '';
}

/* Enhanced loading indicator */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   SEMANTIC SEARCH STYLES
   ============================================ */

/* Semantic Badge */
.semantic-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Semantic Score Badge */
.semantic-score {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Matched Concepts Display */
.matched-concepts {
    margin: 12px 0;
    padding: 12px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--radius-sm);
    border-left: 3px solid #667eea;
}

.concepts-label {
    display: inline-block;
    font-size: 0.85em;
    color: var(--text-muted);
    margin-right: 8px;
    font-weight: 600;
}

.concept-tag {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px 4px;
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

[data-theme="dark"] .concept-tag {
    background: rgba(102, 126, 234, 0.2);
    color: #9ca3ea;
}

.concept-more {
    display: inline-block;
    padding: 3px 8px;
    margin: 2px 4px;
    color: var(--text-muted);
    font-size: 0.8em;
    font-style: italic;
}

/* Semantic Related Tags */
.semantic-tag {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.semantic-tag:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.similarity-percent,
.similarity-mini {
    display: inline-block;
    padding: 1px 5px;
    margin-left: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 600;
}

.semantic-tag:hover .similarity-percent,
.semantic-tag:hover .similarity-mini {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Search Type Indicator */
.search-type-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding: 3px 10px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
}

[data-theme="dark"] .search-type-indicator {
    background: rgba(102, 126, 234, 0.2);
    color: #9ca3ea;
}

/* Search Tips */
.search-tips {
    margin-top: 20px;
    padding: 15px;
    background: var(--hover-color);
    border-radius: var(--radius-md);
    text-align: left;
    font-size: 0.9em;
    color: var(--text-muted);
}

/* Enhanced Loading for Semantic */
.loading i.bi-brain {
    animation: brain-pulse 1.5s infinite;
}

@keyframes brain-pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Hint Text Update */
.search-hint {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-left: 3px solid #667eea;
}

/* Update search input focus */
#searchInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* ============================================
   HYBRID SEARCH STYLES - Exact + Semantic
   ============================================ */

/* Results Sections */
.results-section {
    margin-bottom: 35px;
    animation: fadeIn 0.5s ease;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin-bottom: 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.section-count {
    padding: 5px 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

/* Semantic Section Special Styling */
.semantic-section .section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Section Results Container */
.section-results {
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 20px;
    background: var(--card-bg);
}

.semantic-results {
    border-color: rgba(102, 126, 234, 0.2);
    background: linear-gradient(to bottom, rgba(102, 126, 234, 0.02), transparent);
}

/* Match Type Indicators */
.match-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
    margin: 8px 0;
}

.exact-match {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.partial-match {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.fuzzy-match {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

/* Result Item Variations */
.exact-item {
    border-left-color: var(--secondary-color);
}

.semantic-item {
    border-left-color: #667eea;
    background: rgba(102, 126, 234, 0.02);
}

/* Badge Variations */
.exact-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

/* Empty Section Message */
.empty-section {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* Different animation delays for sections */
.exact-section {
    animation-delay: 0.1s;
}

.semantic-section {
    animation-delay: 0.3s;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 968px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }

    .theme-toggle {
        top: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .navbar-title h1 {
        font-size: 1.4em;
    }

    .navbar-subtitle {
        font-size: 0.8em;
    }

    .search-input-wrapper {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .result-header-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .result-kata {
        font-size: 1.3em;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .typo-suggestion-content {
        flex-direction: column;
        text-align: center;
    }

    .theme-toggle {
        top: 70px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }

    .alphabet-nav {
        gap: 6px;
    }

    .alphabet-btn {
        min-width: 38px;
        padding: 8px 10px;
        font-size: 0.9em;
    }

    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }

    /* Hybrid Search Responsive */
    .section-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .section-title {
        flex-direction: column;
        gap: 8px;
    }
    
    .semantic-badge {
        margin-left: 0;
    }
    
    .match-type {
        font-size: 0.8em;
        padding: 3px 8px;
    }
    
    .matched-concepts {
        padding: 8px;
    }
    
    .concept-tag {
        font-size: 0.75em;
        padding: 2px 6px;
    }

    .semantic-badge {
        font-size: 0.7em;
        padding: 3px 8px;
        margin-left: 5px;
    }
}