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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    padding: 40px 0 30px;
    color: #fff;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

header .subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
}

/* Search Section */
.search-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.search-box input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.search-box input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.search-box button {
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.search-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.search-box button:active {
    transform: translateY(0);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 20px;
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
}

.filter-bar label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    color: #666;
    cursor: pointer;
}

.filter-bar input[type="radio"] {
    accent-color: #667eea;
    width: 16px;
    height: 16px;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 0.9rem;
    color: #888;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

/* Alphabet Nav */
.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.alphabet-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.alphabet-nav a:hover {
    background: #667eea;
    color: #fff;
}

.alphabet-nav a.active {
    background: #667eea;
    color: #fff;
}

/* Word List */
.word-list {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 200px;
}

.word-list .loading,
.word-list .empty {
    padding: 60px 20px;
    text-align: center;
    color: #999;
    font-size: 1.1rem;
}

/* Word Card */
.word-card {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    cursor: pointer;
}

.word-card:last-child {
    border-bottom: none;
}

.word-card:hover {
    background: #f8f9ff;
}

.word-card .word-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.word-card .word {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.word-card .phonetic {
    font-size: 0.95rem;
    color: #888;
    font-style: italic;
}

.word-card .pos {
    font-size: 0.8rem;
    color: #667eea;
    background: #eef0ff;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.word-card .meaning {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}

.word-card .meaning .highlight {
    background: #fff3cd;
    padding: 1px 3px;
    border-radius: 2px;
}

.word-card .example {
    margin-top: 8px;
    padding: 10px 14px;
    background: #fafafa;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    font-size: 0.9rem;
    color: #777;
    font-style: italic;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        width: 100%;
    }

    .filter-bar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .word-card {
        padding: 16px;
    }

    .alphabet-nav a {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}
