/* ==================== LEXIKON INDEX ==================== */

.lexikon-index .page-header {
    margin-bottom: 1rem;
}

.lexikon-index .play-header-image {
    margin-top: 0;
}

.lexikon-index .letter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.lexikon-index .letter-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.lexikon-index .letter-nav a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.letter-section {
    margin-bottom: 2.5rem;
}

.letter-section h2 {
    font-size: 1.5rem;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.lexikon-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.lexikon-list li a {
    display: block;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.lexikon-list li a:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.lexikon-list strong {
    display: block;
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.lexikon-list .entry-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==================== LEXIKON SUCHE ==================== */

.lexikon-search {
    margin-bottom: 2rem;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.lexikon-search input {
    width: 100%;
    padding: 1rem 3rem 1rem 3rem;
    font-size: 1.1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lexikon-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.lexikon-search input::placeholder {
    color: var(--text-light);
}

.lexikon-search .search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-light);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.lexikon-search .search-clear {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.lexikon-search .search-clear:hover {
    background: var(--border);
    color: var(--text);
}

/* Suggestions Dropdown */
.search-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 100;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    display: block;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: var(--text);
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: var(--bg);
    color: var(--text);
}

.suggestion-item mark {
    background: #fef08a;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

/* Suchergebnisse */
.search-results {
    margin-bottom: 2rem;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.search-results-header span {
    font-weight: 600;
    color: var(--text);
}

.search-results-header .btn-link {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

.search-results-header .btn-link:hover {
    color: var(--primary-dark);
}

/* Lexikon Entry Navigation */
.lexikon-nav {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .lexikon-index .letter-nav {
        padding: 0.75rem;
    }

    .lexikon-index .letter-nav a {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .lexikon-search input {
        padding: 0.875rem 2.75rem;
        font-size: 1rem;
    }

    .search-results-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}
