* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #2c3e50;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 28px;
    font-weight: bold;
}

.search-form {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 600px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}

.search-btn {
    padding: 12px 30px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #2980b9;
}

/* Main Content */
.main-content {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.main-column {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    padding: 60px 20px;
}

.welcome-section h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.welcome-section p {
    font-size: 18px;
    color: #7f8c8d;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results h2 {
    color: #e74c3c;
    margin-bottom: 15px;
}

/* Search Results */
.search-results {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.results-sidebar h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.word-list {
    list-style: none;
}

.word-list li {
    margin-bottom: 5px;
}

.word-list a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.2s;
}

.word-list a:hover {
    background: #ecf0f1;
}

.word-list a.active {
    background: #3498db;
    color: white;
}

/* Word Entry */
.word-entry {
    max-width: 800px;
}

.word-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.word-title {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.phonetic {
    font-size: 18px;
    color: #7f8c8d;
    font-style: italic;
}

/* Phonetics */
.phonetics-section {
    margin-bottom: 25px;
}

.audio-player {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.audio-player audio {
    height: 35px;
}

.phonetic-text {
    color: #7f8c8d;
    font-style: italic;
}

/* Meanings */
.meanings-section {
    margin-top: 30px;
}

.meaning {
    margin-bottom: 35px;
}

.part-of-speech {
    font-size: 20px;
    color: #3498db;
    margin-bottom: 15px;
    font-style: italic;
}

.definitions-list {
    margin-left: 20px;
    margin-bottom: 15px;
}

.definition-item {
    margin-bottom: 15px;
}

.definition {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.example {
    color: #7f8c8d;
    margin-left: 20px;
    font-size: 15px;
}

.synonyms, .antonyms {
    margin-top: 10px;
    padding: 10px;
    background: #ecf0f1;
    border-radius: 5px;
    font-size: 14px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* Advertisements */
.ad-zone {
    margin: 20px 0;
}

.ad-header {
    background: #ecf0f1;
    padding: 15px 0;
}

.ad-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

.footer p {
    margin: 5px 0;
}

.footer a {
    color: #3498db;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
    }
    
    .search-form {
        width: 100%;
        max-width: none;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .search-results {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
}


/* Similar Words Section */
.similar-words-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.similar-words-section h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 25px;
    font-weight: 700;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.similar-words-section h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
}

.similar-words-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.similar-word-item {
    display: flex;
    flex-direction: column;
    padding: 18px 15px;
    background: white;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.similar-word-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.similar-word-item:hover:before {
    transform: scaleX(1);
}

.similar-word-item:hover {
    background: white;
    border-color: #3498db;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(52, 152, 219, 0.2);
}

.similar-word-item .word {
    font-size: 17px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    transition: color 0.3s;
}

.similar-word-item:hover .word {
    color: #3498db;
}

.similar-word-item .phonetic {
    font-size: 13px;
    color: #7f8c8d;
    font-style: italic;
}

/* SEO Meta */
.word-meta {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    color: #7f8c8d;
}

/* Empty state */
.no-similar-words {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-style: italic;
}

@media (max-width: 768px) {
    .similar-words-section {
        padding: 20px;
        margin-top: 30px;
    }
    
    .similar-words-section h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .similar-words-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .similar-word-item {
        padding: 14px 12px;
    }
    
    .similar-word-item .word {
        font-size: 15px;
    }
    
    .similar-word-item .phonetic {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .similar-words-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
