@font-face {
    font-family: 'Vollkorn';
    src: url('/fonts/Vollkorn-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Vollkorn';
    src: url('/fonts/Vollkorn-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Vollkorn';
    src: url('/fonts/Vollkorn-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Vollkorn';
    src: url('/fonts/Vollkorn-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vollkorn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: white;
}

a {
    color: #333;
    text-decoration: none;
}

a:hover {
    opacity: 0.7;
}

em {
    font-style: italic;
}

strong {
    font-weight: bold;
}

.container {
    max-width: 42rem;
    margin: 0 auto;
    padding: 0 0.5rem;
}

.header {
    text-align: center;
    padding: 2rem 0;
}

.title {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.title-link {
    color: #333;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 2px;
    outline: none;
    font-family: inherit;
}

.search-input:focus {
    border-color: #333;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 2px 2px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.suggestions.active {
    display: block;
}

.suggestion-item {
    display: block;
    padding: 0.5rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
    color: #333;
}

.primary {
    padding: 2rem 0;
    text-align: left;
}

.results {
    min-height: 100px;
}

.entry {
    margin-bottom: 3rem;
}

.wordTitle {
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.pos {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    font-weight: 400;
    margin-left: 0.5rem;
}

.pronunciation {
    display: block;
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 1rem;
    font-family: "Courier New", monospace;
}

.etymology {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #f9f9f9;
    border-left: 2px solid #ddd;
}

.section {
    margin-bottom: 1.5rem;
}

.section-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.definitions {
    list-style: none;
    counter-reset: def-counter;
}

.definitions li {
    margin-bottom: 0.75rem;
    counter-increment: def-counter;
    padding-left: 1.5rem;
    position: relative;
}

.definitions li::before {
    content: counter(def-counter) ".";
    position: absolute;
    left: 0;
    color: #999;
    font-weight: 600;
}

.definitions a {
    color: #0066cc;
    text-decoration: underline;
}

.definitions a:hover {
    color: #0052a3;
    opacity: 1;
}

.synonyms {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.synonyms li {
    display: inline-block;
}

.synonyms a {
    color: #333;
}

.synonyms a:hover {
    text-decoration: underline;
}

.pronunciation {
    display: block;
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 1rem;
    font-family: "Courier New", monospace;
}

.examples {
    list-style: none;
    padding: 0;
    margin: 0;
}

.examples li {
    margin-bottom: 0.75rem;
    padding-left: 0;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

.sources {
    font-size: 0.85rem;
    color: #999;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.quotes {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    font-style: italic;
}

.quotes p {
    margin-bottom: 0.75rem;
}

.phrases {
    margin: 0;
    padding: 0;
}

.phrase-name {
    font-weight: 700;
    margin-top: 1rem;
}

.phrase-field {
    font-weight: 400;
    font-style: italic;
    color: #777;
}

.phrase-body {
    margin: 0.25rem 0 0 1.25rem;
}

.phrase-body p {
    margin: 0 0 0.4rem;
}

.phrase-body .quotes {
    margin: 0 0 0.6rem;
}

.quote-author {
    font-style: normal;
    color: #999;
    white-space: nowrap;
}

.quotes a {
    color: #0066cc;
    text-decoration: underline;
    font-style: normal;
}

.quotes a:hover {
    color: #0052a3;
}

.error {
    padding: 2rem;
    color: #d32f2f;
    text-align: center;
    font-size: 0.95rem;
}

.suggestions {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
}

.suggestions p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.suggestion-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.suggestion-list li {
    display: inline;
}

.suggestion-list a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #e3f2fd;
    color: #1976d2;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid #bbdefb;
    transition: all 0.2s ease;
}

.suggestion-list a:hover {
    background: #1976d2;
    color: white;
    border-color: #1976d2;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #999;
}

.footer-section {
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

.divider {
    height: 0.5px;
    border: none;
    background: #eee;
    margin-bottom: 1.5rem;
}

.footer {
    font-size: 0.85rem;
    color: #999;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: #f9f9f9;
}

@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    .header {
        padding: 1.5rem 0;
    }

    .title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .wordTitle {
        font-size: 1.5rem;
    }

    .primary {
        padding: 1.5rem 0;
    }
}
