* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #2c5aa0, #1e3a8a);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.nav-logo span {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-selector select {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background: white;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
}

.btn-primary {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #c53030;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-container {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

#searchInput {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.btn-search {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1rem;
}

/* Dictionary Section */
.dictionary-section {
    padding: 3rem 0;
}

.dictionary-header {
    margin-bottom: 2rem;
    text-align: center;
}

.dictionary-header h3 {
    font-size: 2rem;
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.letter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #2c5aa0;
    background: white;
    color: #2c5aa0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.letter-btn:hover,
.letter-btn.active {
    background: #2c5aa0;
    color: white;
}

/* Words List */
.words-list {
    display: grid;
    gap: 1.5rem;
}

.word-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #2c5aa0;
}

.word-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.word-title {
    font-size: 1.3rem;
    color: #2c5aa0;
    font-weight: bold;
}

.word-part-of-speech {
    background: #e53e3e;
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.word-translation {
    font-style: italic;
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.word-definition {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.word-example {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    border-left: 3px solid #667eea;
    font-style: italic;
    margin-bottom: 1rem;
}

/* Accuracy Voting */
.accuracy-voting {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.vote-accurate {
    background: #f0fff4;
    color: #38a169;
    border: 1px solid #38a169;
}

.vote-accurate:hover {
    background: #38a169;
    color: white;
}

.vote-accurate.voted {
    background: #38a169;
    color: white;
}

.vote-inaccurate {
    background: #fff5f5;
    color: #e53e3e;
    border: 1px solid #e53e3e;
}

.vote-inaccurate:hover {
    background: #e53e3e;
    color: white;
}

.vote-inaccurate.voted {
    background: #e53e3e;
    color: white;
}

.vote-count {
    font-weight: bold;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s;
}

@keyframes modalSlideIn {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

.modal-header {
    background: #2c5aa0;
    color: white;
    padding: 1.5rem;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    flex-shrink: 0;
}

.btn-secondary {
    background: #718096;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: #4a5568;
}

/* Footer */
footer {
    background: #2d3748;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer a {
    color: #667eea;
    text-decoration: none;
}

/* No Words State */
.no-words {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-words h3 {
    margin-bottom: 1rem;
    color: #2c5aa0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .alphabet-filter {
        gap: 0.3rem;
    }
    
    .letter-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 95vh;
    }
    
    .word-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .accuracy-voting {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .vote-btn {
        justify-content: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-secondary, .btn-primary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .dictionary-header h3 {
        font-size: 1.5rem;
    }
    
    .search-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #searchInput, .btn-search {
        border-radius: 5px;
        width: 100%;
    }
}