/* =============================================================================
   MODERN MINIMAL FLAT DESIGN - AI DICTIONARY
   =============================================================================
   A clean, modern, minimal, and flat design system for the AI Dictionary app.
   Features: Clean typography, subtle shadows, flat colors, and excellent UX.
   ============================================================================= */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: #f7fafc;
    min-height: 100vh;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    position: relative;
}

/* Landing page - Google-like centered layout */
.container:not(.has-results) {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    min-height: 100vh;
}

/* Main content wrapper for landing page */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
}

/* Results page - normal layout */
.container.has-results {
    display: block;
}

/* =============================================================================
   HEADER SECTION - Clean and Minimal
   ============================================================================= */
.header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
    width: 100%;
}

/* Landing page header - Google-like spacing */
.container:not(.has-results) .header {
    margin-bottom: 2rem;
    padding: 0;
}

.title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: #1a202c;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #14B8A6 0%, #06B6D4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Logo link styling */
.logo-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: inline-block;
    background: linear-gradient(135deg, #14B8A6 0%, #06B6D4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-link:hover {
    background: linear-gradient(135deg, #0F766E 0%, #0891B2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(6, 182, 212, 0.2));
    transition: all 0.3s ease;
}

.subtitle {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.125rem;
    color: #718096;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* =============================================================================
   LANGUAGE SELECTOR - Clean and Modern
   ============================================================================= */
.language-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.language-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
}

.language-dropdown {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.language-dropdown:focus {
    outline: none;
    border-color: #14B8A6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.language-dropdown:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Hide language selector completely */
.language-selector {
    display: none !important;
}

/* =============================================================================
   SEARCH SECTION - Modern Input Design
   ============================================================================= */
.search-container {
    margin-bottom: 3rem;
    position: relative;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Mode Toggle Styles */
.mode-toggle {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0.8rem;
    gap: 2rem;
    padding-left: 1rem;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.mode-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    pointer-events: auto;
    z-index: 10;
}

.mode-btn:hover {
    color: #14B8A6;
}

.mode-btn.active {
    color: #14B8A6;
    text-decoration: underline;
    text-decoration-color: #14B8A6;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* =============================================================================
   THESAURUS STYLES - Merriam-Webster Style
   ============================================================================= */

.thesaurus-definition {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.thesaurus-definition-text {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #1e293b;
    margin-bottom: 0.75rem;
    font-weight: 400;
}

.thesaurus-example {
    font-size: 1rem;
    line-height: 1.5;
    color: #64748b;
    font-style: italic;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 3px solid #e2e8f0;
}

.thesaurus-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    margin-top: 0;
}

.thesaurus-synonyms,
.thesaurus-antonyms,
.thesaurus-related {
    margin-bottom: 2rem;
}

.synonym-tags-container,
.antonym-tags-container,
.related-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Color-coded synonym tags (Merriam-Webster style) */
.synonym-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
}

.synonym-tag-strong {
    background: #fef3c7;
    color: #92400e;
    border-color: #fbbf24;
}

.synonym-tag-strong:hover {
    background: #fde68a;
    border-color: #f59e0b;
    transform: translateY(-1px);
}

.synonym-tag-medium {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.synonym-tag-medium:hover {
    background: #dcfce7;
    border-color: #86efac;
    transform: translateY(-1px);
}

.synonym-tag-subtle {
    background: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
}

.synonym-tag-subtle:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.antonym-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.antonym-tag:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    transform: translateY(-1px);
}

.related-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f0f9ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.related-tag:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    transform: translateY(-1px);
}

/* Thesaurus Display Styles */
.thesaurus-meanings {
    margin-bottom: 2rem;
}

.meaning-group {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.meaning-context {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.synonyms-group {
    margin-bottom: 1rem;
}

.synonym-level {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.level-label {
    font-weight: 600;
    color: #4a5568;
    min-width: 80px;
    font-size: 0.9rem;
}

.synonym-level.strong .level-label {
    color: #e53e3e;
}

.synonym-level.medium .level-label {
    color: #dd6b20;
}

.synonym-level.subtle .level-label {
    color: #38a169;
}

.synonyms, .antonyms, .related {
    color: #2d3748;
    line-height: 1.6;
}

.antonyms-group, .related-group {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.part-of-speech-group {
    margin-top: 2rem;
}

.pos-group {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #14B8A6;
}

.pos-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.pos-synonyms {
    color: #4a5568;
    line-height: 1.6;
}

/* Landing page search - Google-like positioning */
.container:not(.has-results) .search-container {
    margin-bottom: 0;
    max-width: 900px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.search-box {
    display: flex;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.search-box:focus-within {
    border-color: #14B8A6;
    box-shadow: 0 4px 20px rgba(20, 184, 166, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

#wordInput {
    flex: 1;
    padding: 1.25rem 1.5rem;
    border: none;
    font-size: 1.125rem;
    outline: none;
    background: transparent;
    color: #2d3748;
    font-weight: 400;
}

#wordInput::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.search-button {
    padding: 1.25rem 1.75rem;
    background: linear-gradient(135deg, #14B8A6 0%, #06B6D4 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.search-button::before {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.search-button:hover::before {
    left: 100%;
}

.search-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(20, 184, 166, 0.4);
}

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

/* =============================================================================
   LOADING STATE - Elegant Spinner
   ============================================================================= */
.loading {
    text-align: center;
    padding: 3rem 2rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin: 2rem auto;
    max-width: 600px;
    width: 100%;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #14B8A6;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #718096;
    font-size: 1.125rem;
    font-weight: 500;
}

/* =============================================================================
   ERROR STATE - Simple Clean Error Display
   ============================================================================= */
.error {
    background: transparent;
    color: #e53e3e;
    padding: 1rem 0;
    text-align: center;
    margin-bottom: 2rem;
    border: none;
    box-shadow: none;
    border-left: 3px solid #e53e3e;
    padding-left: 1rem;
}

.error-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    opacity: 0.8;
    display: inline;
}

.error p {
    font-weight: 500;
    font-size: 1rem;
    display: inline;
    margin: 0;
}

/* =============================================================================
   RESULTS SECTION - Ultra-Minimal Modern Design
   ============================================================================= */
.results {
    background: #ffffff;
    border-radius: 24px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 2rem auto 2rem auto;
    border: 1px solid #f1f5f9;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.word-header {
    background: linear-gradient(135deg, #14B8A6 0%, #06B6D4 100%);
    padding: 3rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.word-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.word-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pronunciation-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pronunciation-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.phonetics {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    display: inline-block;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.pronunciation-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    min-width: 60px;
    height: 40px;
    font-size: 0.75rem;
    font-weight: 600;
}

.accent-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pronunciation-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.pronunciation-btn:active {
    transform: scale(0.95);
}

.pronunciation-btn.playing {
    background: rgba(255, 255, 255, 0.4);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* =============================================================================
   CONTENT SECTIONS - Ultra-Minimal Layout
   ============================================================================= */
.definitions-section,
.synonyms-section,
.antonyms-section,
.etymology-section,
.examples-section,
.usage-section,
.word-forms-section {
    padding: 2rem 2.5rem;
    border-bottom: 1px solid #f8fafc;
}

.definitions-section:last-child,
.synonyms-section:last-child,
.antonyms-section:last-child,
.etymology-section:last-child,
.examples-section:last-child,
.usage-section:last-child,
.word-forms-section:last-child {
    border-bottom: none;
}

/* Remove border-top and adjust spacing for first definitions-section in compare results */
.compare-results > .definitions-section:first-child {
    border-top: none !important;
    border-bottom: none !important;
    padding-top: 0 !important;
    padding-bottom: 2rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    margin-top: 0 !important;
    margin-bottom: 0;
    box-shadow: none !important;
    outline: none !important;
}

/* Remove all borders from h3 in compare results sections */
.compare-results > .definitions-section h3 {
    border-top: none !important;
    border-bottom: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove border-top from comparison table section */
.compare-results > .definitions-section:nth-child(2) {
    border-top: none !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Ensure padding is consistent with Dictionary/Thesaurus */
.compare-results > .definitions-section {
    padding: 2rem 2.5rem;
    border-top: none !important;
    border-bottom: none !important;
}

/* Remove any border from word-header and definitions-section in compare mode */
.results:has(.compare-results) .word-header {
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
}

/* Remove any border-top and border-bottom from definitions-section in compare results */
.results:has(.compare-results) .definitions-section {
    border-top: none !important;
    border-bottom: none !important;
}

/* Ensure no visual line between word-header and first definitions-section */
.results:has(.compare-results) .word-header + .compare-results,
.results:has(.compare-results) .word-header ~ .compare-results {
    margin-top: 0;
    padding-top: 0;
}

/* Remove any border or visual line from compare-results container */
.compare-results {
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure first definitions-section has no top border or margin */
.results:has(.compare-results) .compare-results > .definitions-section:first-child {
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove any border from h3 in all definitions-sections in compare results */
.results:has(.compare-results) .compare-results > .definitions-section h3 {
    border-top: none !important;
    border-bottom: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.definitions-section h3,
.synonyms-section h3,
.antonyms-section h3,
.etymology-section h3,
.examples-section h3,
.usage-section h3,
.word-forms-section h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 1.5rem;
    text-transform: capitalize;
    letter-spacing: 0.02em;
    position: relative;
    padding-left: 0;
}

/* =============================================================================
   TECHNICAL TERM SPECIFIC STYLES
   ============================================================================= */
.technical-field,
.technical-complexity {
    background: rgba(32, 178, 170, 0.05);
    border-left: 3px solid #20b2aa;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
}

.technical-field .part-of-speech,
.technical-complexity .part-of-speech {
    background: #20b2aa;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.technical-field .definition-meaning,
.technical-complexity .definition-meaning {
    color: #2c3e50;
    font-weight: 500;
    margin-top: 0.5rem;
}
.definition-item {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
    border: none;
    position: relative;
    margin-left: 0;
}

.definition-item:last-child {
    margin-bottom: 0;
}

.definition-item.secondary-definition {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    opacity: 1;
}


.definition-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.part-of-speech {
    background: #ffffff;
    color: #475569;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid #e2e8f0;
}

/* =============================================================================
   ENHANCED DEFINITION BADGES - Context and Formality Indicators
   ============================================================================= */
.formality-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 400;
    text-transform: lowercase;
    letter-spacing: 0.01em;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    border: 1px solid;
    display: inline-block;
}

.formality-badge.formal {
    background: #e0f2fe;
    color: #0277bd;
    border-color: #bae6fd;
}

.formality-badge.informal {
    background: #fff3e0;
    color: #f57c00;
    border-color: #fde047;
}

.formality-badge.slang {
    background: #ffebee;
    color: #c62828;
    border-color: #fecaca;
}

.formality-badge.academic {
    background: #f3e5f5;
    color: #7b1fa2;
    border-color: #c4b5fd;
}

.context-badge {
    background: #f5f5f5;
    color: #616161;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 400;
    text-transform: lowercase;
    letter-spacing: 0.01em;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    border: 1px solid #e0e0e0;
    display: inline-block;
}

/* =============================================================================
   GROUPED DEFINITIONS BY PART OF SPEECH
   ============================================================================= */
.pos-section-header {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: none;
}

.pos-section-header:first-child {
    margin-top: 0;
}

.pos-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f8fafc;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    border: 1px solid #e2e8f0;
}

.definition-content {
    padding: 0;
    margin-left: 0;
}

.definition-badges {
    margin-top: 0.5rem;
    margin-left: 1rem;
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    align-items: center;
}

/* =============================================================================
   PROGRESSIVE DISCLOSURE - Show More Definitions
   ============================================================================= */
.more-definitions-container {
    text-align: left;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-top: 0;
    border-top: none;
}

.more-definitions-link {
    color: #20b2aa;
    text-decoration: underline;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.more-definitions-link:hover {
    color: #1a9b94;
    border-bottom-color: #20b2aa;
    text-decoration: none;
}

.more-definitions-link:active {
    color: #158a83;
}

.definition-number {
    background: #f8fafc;
    color: #94a3b8;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #f1f5f9;
}

.definition-meaning {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    color: #1e293b;
    font-weight: 400;
    padding-left: 0.5rem;
    position: relative;
}

/* Removed green dot from definition meanings */

.definition-example {
    font-style: italic;
    color: #64748b;
    background: #f8fafc;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    border-left: 2px solid #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-left: 0.5rem;
    position: relative;
}

.definition-example::before {
    content: '"';
    position: absolute;
    top: -0.125rem;
    left: 0.5rem;
    font-size: 1.25rem;
    color: #94a3b8;
    font-weight: bold;
}

/* =============================================================================
   TAGS - Ultra-Minimal Pill Design
   ============================================================================= */
.synonym-tag,
.antonym-tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    margin: 0.125rem 0.375rem 0.125rem 0;
    border-radius: 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid;
}

.synonym-tag {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.synonym-tag:hover {
    background: #dcfce7;
    border-color: #86efac;
}

/* Intensity-based synonym styling for thesaurus */
.synonym-tag.synonym-strong {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
    font-weight: 600;
}

.synonym-tag.synonym-strong:hover {
    background: #fde68a;
    border-color: #f59e0b;
}

.synonym-tag.synonym-medium {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
    font-weight: 500;
}

.synonym-tag.synonym-medium:hover {
    background: #dcfce7;
    border-color: #86efac;
}

.synonym-tag.synonym-subtle {
    background: #f8fafc;
    color: #64748b;
    border-color: #e2e8f0;
    font-weight: 400;
}

.synonym-tag.synonym-subtle:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Dictionary Title Styles */
.dictionary-title {
    font-size: 28px;
    font-weight: 700;
    color: #475569;
    margin: 0 0 24px 0;
    text-transform: capitalize;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 12px;
}

/* Thesaurus Header Styles */
.thesaurus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.thesaurus-title {
    font-size: 28px;
    font-weight: 700;
    color: #475569;
    margin: 0;
    text-transform: capitalize;
}

/* Relevance Bar Styles */
.relevance-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.relevance-label {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-color: #3b82f6;
}

.relevance-gradient {
    display: flex;
    gap: 4px;
}

.relevance-box {
    width: 20px;
    height: 12px;
    border-radius: 3px;
}

.relevance-strongest {
    background-color: #16a34a; /* Strong green */
}

.relevance-strong {
    background-color: #22c55e; /* Medium green */
}

.relevance-medium {
    background-color: #84cc16; /* Light green */
}

.relevance-weak {
    background-color: #9ca3af; /* Gray */
}

.part-of-speech-header {
    display: flex;
    align-items: baseline;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.part-of-speech-title {
    font-size: 20px;
    font-weight: 700;
    color: #475569;
    margin: 0;
    margin-right: 8px;
    text-transform: capitalize;
}

.part-of-speech-context {
    font-size: 16px;
    color: #6b7280;
    font-style: italic;
    margin: 0;
    font-weight: 400;
}

.pos-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
    background: #fafafa;
    border-radius: 6px 6px 0 0;
    padding: 0 4px;
}

.pos-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s ease;
    margin: 2px 1px 0 1px;
}

.pos-tab.active {
    color: #475569;
    background: white;
    box-shadow: 0 -1px 0 #475569;
    font-weight: 700;
}

.pos-tab:hover:not(.active) {
    color: #475569;
    background: #f8fafc;
}

.pos-tab-content {
    display: none;
}

.pos-tab-content.active {
    display: block;
}

/* Remove intensity titles - use color only */
.intensity-section {
    margin-bottom: 12px;
}

.intensity-title {
    display: none; /* Hide intensity category names */
}

.synonym-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Enhanced color-only intensity system */
.synonym-tag-strongest,
.synonym-tag-strong,
.synonym-tag-weak,
.antonym-tag-strongest,
.antonym-tag-strong {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: inline-block;
    text-decoration: none;
    position: relative;
}

.synonym-tag-strongest:hover,
.synonym-tag-strong:hover,
.synonym-tag-weak:hover,
.antonym-tag-strongest:hover,
.antonym-tag-strong:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* Merriam-Webster inspired color intensity */
.synonym-tag-strongest {
    background-color: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
    font-weight: 600;
}

.synonym-tag-strong {
    background-color: #f0fdf4;
    color: #15803d;
    border-color: #dcfce7;
    font-weight: 500;
}

.synonym-tag-weak {
    background-color: #f9fafb;
    color: #6b7280;
    border-color: #f3f4f6;
    font-weight: 400;
}

.antonym-tag-strongest {
    background-color: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
    font-weight: 600;
}

.antonym-tag-strong {
    background-color: #fef7f7;
    color: #b91c1c;
    border-color: #fed7d7;
    font-weight: 500;
}

.antonym-tag:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.related-tag {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.related-tag:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

/* =============================================================================
   EXAMPLE SENTENCES - Clean List Design
   ============================================================================= */
.example-sentence {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.example-sentence:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.example-sentence:last-child {
    margin-bottom: 0;
}

.example-number {
    font-weight: 600;
    color: #14B8A6;
    margin-right: 0.75rem;
    font-size: 0.875rem;
    min-width: 1.5rem;
    flex-shrink: 0;
}

.example-text {
    color: #374151;
    line-height: 1.6;
    font-size: 0.95rem;
    flex: 1;
}

/* =============================================================================
   ETYMOLOGY & USAGE - Ultra-Minimal Info
   ============================================================================= */
.etymology,
.usage-notes {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #64748b;
    background: #f8fafc;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    font-weight: 400;
    position: relative;
    margin-left: 0.5rem;
}

/* Removed info icon from etymology and usage notes */

/* =============================================================================
   COMPACT HEADER WHEN RESULTS ARE SHOWN
   ============================================================================= */
.container.has-results .header {
    margin-bottom: 2rem;
    padding: 1rem 0;
    text-align: center;
}

.container.has-results .header .title {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.container.has-results .header .subtitle {
    font-size: 1rem;
}

.container.has-results .search-container {
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* =============================================================================
   FOOTER SECTION - MINIMAL DESIGN
   ============================================================================= */
.footer {
    text-align: center;
    padding: 2rem 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    max-width: 900px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Landing page footer - positioned at bottom */
.container:not(.has-results) .footer {
    margin-top: auto;
    flex-shrink: 0;
    max-width: 900px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Results page footer - normal flow */
.container.has-results .footer {
    margin-top: 3rem;
}

.footer-text {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
}

.footer-link {
    color: #14B8A6;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.footer-link:hover {
    color: #0D9488;
    text-decoration: underline;
}

.footer-link:focus {
    outline: 2px solid #14B8A6;
    outline-offset: 2px;
    border-radius: 2px;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */
.hidden {
    display: none !important;
}

/* =============================================================================
   BOT PROTECTION & CAPTCHA STYLES
   ============================================================================= */

.captcha-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.captcha-modal {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.captcha-modal h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.captcha-modal p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.captcha-question {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.captcha-modal input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.captcha-modal input:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.captcha-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.captcha-buttons button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.captcha-buttons button:first-child {
    background: #06b6d4;
    color: white;
}

.captcha-buttons button:first-child:hover {
    background: #0891b2;
}

.captcha-buttons button:last-child {
    background: #f1f5f9;
    color: #64748b;
}

.captcha-buttons button:last-child:hover {
    background: #e2e8f0;
}

/* =============================================================================
   RESPONSIVE DESIGN - Mobile First Approach
   ============================================================================= */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header {
        margin-bottom: 2.5rem;
        padding: 1rem 0;
    }
    
    /* Landing page adjustments for tablet */
    .container:not(.has-results) .header {
        margin-bottom: 2rem;
    }
    
    .container:not(.has-results) .search-container {
        max-width: 900px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .search-container {
        margin-bottom: 2rem;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 12px;
    }
    
    .search-button {
        border-radius: 0 0 12px 12px;
        padding: 1rem 1.5rem;
    }
    
    #wordInput {
        border-radius: 12px 12px 0 0;
        padding: 1rem 1.5rem;
    }
    
    .results {
        border-radius: 16px;
    }
    
    .word-header {
        padding: 2rem 1.5rem;
    }
    
    .word-title {
        font-size: 2.5rem;
    }
    
    .pronunciation-container {
        gap: 0.5rem;
    }
    
    .pronunciation-buttons {
        gap: 0.375rem;
    }
    
    .pronunciation-btn {
        min-width: 50px;
        height: 36px;
        padding: 0.375rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .accent-label {
        font-size: 0.7rem;
    }
    
    .definitions-section,
    .synonyms-section,
    .antonyms-section,
    .etymology-section,
    .examples-section,
    .usage-section,
    .word-forms-section {
        padding: 1.5rem;
    }
    
    .definitions-section h3,
    .synonyms-section h3,
    .antonyms-section h3,
    .etymology-section h3,
    .examples-section h3,
    .usage-section h3,
    .word-forms-section h3 {
        font-size: 1.25rem;
    }
    
    .footer {
        padding: 1.5rem 1rem;
        margin-top: 2rem;
    }
    
    .footer-text {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }
    
    .title {
        font-size: 2rem;
    }
    
    /* Landing page adjustments for mobile */
    .container:not(.has-results) .header {
        margin-bottom: 1.5rem;
        padding: 0.5rem 0;
    }
    
    .container:not(.has-results) .search-container {
        margin-bottom: 0;
    }
    
    .word-title {
        font-size: 2rem;
    }
    
    .word-header {
        padding: 1.5rem 1rem;
    }
    
    .pronunciation-btn {
        width: 32px;
        height: 32px;
    }
    
    .definitions-section,
    .synonyms-section,
    .antonyms-section,
    .etymology-section,
    .examples-section,
    .usage-section,
    .word-forms-section {
        padding: 1rem;
    }
    
    .search-button {
        padding: 0.875rem 1.25rem;
    }
    
    #wordInput {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
    
    .footer {
        padding: 1rem 0.75rem;
        margin-top: 1.5rem;
    }
    
    .footer-text {
        font-size: 0.75rem;
    }
}

/* =============================================================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for better accessibility */
.search-button:focus,
#wordInput:focus {
    outline: 2px solid #14B8A6;
    outline-offset: 2px;
}

.synonym-tag:focus,
.antonym-tag:focus {
    outline: 2px solid #14B8A6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .search-box {
        border-color: #000;
    }
    
    .definition-item {
        border-color: #000;
    }
    
    .synonym-tag,
    .antonym-tag {
        border-color: #000;
    }
}

/* =============================================================================
   WORD FORMS SECTION STYLES
   ============================================================================= */

.word-forms {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #64748b;
    background: #f8fafc;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    font-weight: 400;
    position: relative;
    margin-left: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.word-form-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.word-form-word {
    font-weight: 500;
    color: #2d3748;
    font-size: 0.95rem;
}

.word-form-type {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 400;
    font-style: italic;
}

/* =============================================================================
   INLINE VALIDATION MESSAGE STYLES - Minimal Design
   ============================================================================= */

.inline-validation-message {
    width: 100%;
    max-width: 900px;
    margin: 1rem auto;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.validation-message {
    background: transparent;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 1rem;
    border: none;
    box-shadow: none;
}

/* Minimal validation type styles */
.validation-type {
    background: transparent;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: none;
    box-shadow: none;
    background-size: 100% 100%;
}

.validation-message-text {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-weight: 400;
    text-align: left;
}

.validation-suggestion {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0;
    font-style: normal;
    opacity: 0.7;
    text-align: left;
    margin-top: 0.25rem;
}

.validation-origin {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.validation-definition {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.suggestions {
    margin: 1rem 0 0.5rem 0;
}

.suggestions p {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.suggestion-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.suggestion-btn {
    background: rgba(255, 255, 255, 0.8);
    color: #374151;
    border: 1px solid rgba(20, 184, 166, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 70px;
    backdrop-filter: blur(10px);
}

.suggestion-btn:hover {
    background: rgba(20, 184, 166, 0.1);
    border-color: rgba(20, 184, 166, 0.5);
    transform: scale(1.05);
}

/* Removed validation examples styling - no longer used */

/* Minimal validation type specific styles - very subtle */
.spelling-correction {
    border-left: 2px solid rgba(246, 173, 85, 0.3);
    background: transparent;
}

.abbreviation {
    border-left: 2px solid rgba(104, 211, 145, 0.3);
    background: transparent;
}

.foreign-word {
    border-left: 2px solid rgba(99, 179, 237, 0.3);
    background: transparent;
}

.error-message {
    border-left: 2px solid rgba(252, 129, 129, 0.3);
    background: transparent;
}

/* =============================================================================
   SPELL CHECK SUGGESTION STYLES
   =============================================================================
   Styles for spell check suggestions that appear when a word is misspelled
*/

.spell-check-simple {
    text-align: left;
    margin: 1rem auto 0.5rem auto;
    max-width: 600px;
    padding-left: 0;
}

.spell-check-message {
    font-size: 1.125rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

.spell-check-link {
    color: #20b2aa;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.spell-check-link:hover {
    color: #1a9b94;
    border-bottom-color: #20b2aa;
    text-decoration: none;
}

.spell-check-link:active {
    color: #158a83;
}

/* Mobile responsiveness for spell check */
@media (max-width: 768px) {
    .spell-check-simple {
        margin: 0.5rem;
    }
    
    .spell-check-message {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .spell-check-message {
        font-size: 0.8rem;
    }
}

/* Technical Tags Styling */
.technical-tags {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0F766E;
}

.technical-tags h4 {
    margin: 0 0 10px 0;
    color: #0F766E;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.technical-tag {
    display: inline-block;
    margin: 5px 10px 5px 0;
    padding: 6px 12px;
    background: #e0f2fe;
    color: #0277bd;
    border: 1px solid #bae6fd;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.field-tag {
    background: #e8f5e8;
    color: #2e7d32;
    border-color: #c8e6c9;
}

.level-tag {
    background: #fff3e0;
    color: #f57c00;
    border-color: #ffcc02;
}

/* ============================================================================= */
/* USER GUIDE PAGE STYLES - WORD DOCUMENT STYLE */
/* ============================================================================= */

.user-guide-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 60px 80px;
    background: #ffffff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    text-align: left !important;
}

.user-guide-container * {
    text-align: left !important;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2d3748;
    text-align: left;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
}

.intro-section {
    margin-bottom: 30px;
    text-align: left;
}

.intro-text {
    font-size: 16px;
    line-height: 1.6;
    color: #2d3748;
    margin: 0;
    font-weight: 400;
}

.guide-section {
    margin-bottom: 25px;
}

.guide-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
    margin-top: 25px;
    text-align: left;
}

.guide-section h2:first-child {
    margin-top: 0;
}

.guide-item {
    margin-bottom: 20px;
}

.guide-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    margin-top: 0;
}

.guide-item p {
    margin: 0 0 12px 0;
    line-height: 1.6;
    color: #2d3748;
    font-size: 16px;
    font-weight: 400;
}

.example-list {
    margin: 15px 0;
    padding-left: 0;
    list-style: none;
}

.example-list li {
    margin-bottom: 8px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-left: 4px solid #0F766E;
    font-size: 16px;
    color: #2d3748;
    font-weight: 400;
}

.inline-link {
    color: #0F766E;
    text-decoration: none;
    font-weight: 500;
}

.inline-link:hover {
    color: #0D5D56;
    text-decoration: underline;
}

.tips-grid {
    margin-top: 20px;
}

.tip-card {
    margin-bottom: 25px;
    padding: 0;
    background: none;
    border: none;
}

.tip-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    margin-top: 0;
}

.tip-card ol {
    margin: 0;
    padding-left: 20px;
}

.tip-card li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #2d3748;
    font-size: 16px;
    font-weight: 400;
}

.advantages-grid {
    margin-top: 20px;
}

.advantage-card {
    margin-bottom: 25px;
    padding: 0;
    background: none;
    border: none;
}

.advantage-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    margin-top: 0;
}

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

.advantage-list li {
    margin-bottom: 6px;
    padding-left: 0;
    line-height: 1.6;
    color: #2d3748;
    font-size: 16px;
    font-weight: 400;
}

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

.help-list li {
    margin-bottom: 8px;
    padding-left: 0;
    line-height: 1.6;
    color: #2d3748;
    font-size: 16px;
    font-weight: 400;
}

.cta-section {
    margin-top: 40px;
    text-align: left;
    padding: 30px 0;
    border-top: 1px solid #e2e8f0;
}

.cta-text {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 20px;
    line-height: 1.6;
    color: #2d3748;
}

.cta-button {
    display: inline-block;
    padding: 12px 24px;
    background: #0F766E;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.cta-button:hover {
    background: #0D5D56;
    text-decoration: none;
}

/* Force left alignment for all user guide content */
.user-guide-container h1,
.user-guide-container h2,
.user-guide-container h3,
.user-guide-container h4,
.user-guide-container p,
.user-guide-container ul,
.user-guide-container ol,
.user-guide-container li,
.user-guide-container div {
    text-align: left !important;
}

.user-guide-container .page-title {
    text-align: left !important;
}

.user-guide-container .cta-section {
    text-align: left !important;
}

/* Responsive Design for User Guide */
@media (max-width: 768px) {
    .user-guide-container {
        padding: 40px 30px;
        margin: 20px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .guide-section {
        margin-bottom: 20px;
    }
    
    .cta-section {
        margin-top: 30px;
        padding: 20px 0;
    }
}

/* =============================================================================
   COMPARE MODE STYLES
   ============================================================================= */
/* 
 * This section contains all styles for the Compare feature.
 * 
 * STRUCTURE:
 * ----------
 * 1. Banner Container - Main container for word display
 * 2. Banner Word - Individual word sections
 * 3. Banner VS - Separator between words
 * 4. Phonetics - IPA symbols display
 * 5. Pronunciation Buttons - US/UK accent buttons
 * 6. Three-Word Layout - Special styling for 3-word comparisons
 * 7. Comparison Table - Side-by-side comparison table
 * 8. Educational Sections - Simple explanation, key differences, etc.
 * 
 * FOR JUNIOR DEVELOPERS:
 * ----------------------
 * The banner uses flexbox for layout:
 * - display: flex - Makes container a flex container
 * - align-items: flex-start - Aligns items to top
 * - justify-content: center - Centers items horizontally
 * - gap: 2rem - Space between items
 * - flex-wrap: wrap - Allows wrapping on small screens
 * 
 * z-index and pointer-events ensure buttons are clickable
 * (prevents other elements from blocking clicks)
 */

/* Compare Banner Container - Two words with individual pronunciation */
/* 
 * Main container for the compare banner.
 * Holds word titles, phonetics, and pronunciation buttons.
 * 
 * Layout: [Word 1] vs [Word 2] (horizontal)
 * Or: [Word 1] vs [Word 2] vs [Word 3] (for 3-word comparisons)
 */
.compare-banner-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    pointer-events: auto;  /* Ensures clicks work on this container */
}

/* 
 * SPECIAL STYLING FOR 3-WORD COMPARISONS
 * ====================================
 * 
 * For 3-word comparisons, we need a more compact layout because:
 * - 3 words take more horizontal space
 * - Need to fit in same banner width
 * - Elements are stacked vertically (Word → Phonetics → Buttons)
 * 
 * Key differences from 2-word layout:
 * - Smaller font sizes (2.5rem vs 3.5rem)
 * - Reduced gaps (1.5rem vs 2rem)
 * - No wrapping (flex-wrap: nowrap)
 * - Equal width distribution (flex: 1)
 * - Vertical stacking of elements
 */
.compare-banner-three-words {
    flex-wrap: nowrap;  /* Keep all 3 words in one row */
    gap: 1.5rem;  /* Reduced gap for compact layout */
}

.compare-banner-three-words .compare-banner-word {
    gap: 0.5rem;  /* Reduced gap between word and phonetics */
    flex: 1;  /* Equal width for each word */
    min-width: 0; /* Allow flex items to shrink below content size */
}

.compare-banner-three-words .compare-banner-word-title {
    font-size: 2.5rem;  /* Smaller than 2-word layout (3.5rem) */
}

.compare-banner-three-words .compare-banner-vs {
    font-size: 1.5rem;  /* Smaller than 2-word layout (2rem) */
    margin-top: 0.5rem;
    flex-shrink: 0;  /* Don't shrink the "vs" text */
}

/* For 3-word comparisons, stack phonetics and buttons vertically */
.compare-banner-three-words .compare-banner-word .phonetics {
    font-size: 0.95rem;
    padding: 0.375rem 0.875rem;
    margin-bottom: 0.5rem;
}

.compare-banner-three-words .compare-banner-word .pronunciation-buttons {
    margin-top: 0.25rem;
}

.compare-banner-three-words .compare-banner-pronunciation-btn {
    min-width: 44px;
    height: 28px;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

.compare-banner-three-words .compare-banner-pronunciation-btn svg {
    width: 12px;
    height: 12px;
}

/* Responsive adjustments for 3-word comparisons on smaller screens */
@media (max-width: 768px) {
    .compare-banner-three-words {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .compare-banner-three-words .compare-banner-word {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 150px;
    }
    
    .compare-banner-three-words .compare-banner-word-title {
        font-size: 2rem;
    }
    
    .compare-banner-three-words .compare-banner-vs {
        width: 100%;
        text-align: center;
        margin: 0.25rem 0;
    }
}

/* On very small screens, stack all 3 words vertically */
@media (max-width: 480px) {
    .compare-banner-three-words .compare-banner-word {
        flex: 1 1 100%;
    }
}

.compare-banner-word {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.compare-banner-word-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.compare-banner-vs {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    align-self: flex-start;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.9rem;
    line-height: 1.2;
    height: fit-content;
}

.compare-banner-word .phonetics {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    display: inline-block;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.compare-banner-phonetics-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.compare-banner-word .pronunciation-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

/* Compare banner pronunciation buttons - explicitly include all .pronunciation-btn styles */
.compare-banner-pronunciation-btn {
    /* Copy all properties from .pronunciation-btn */
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
    min-width: 60px;
    height: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    pointer-events: auto !important;
}

/* Explicitly ensure enabled buttons are clickable - higher specificity */
.pronunciation-btn.compare-banner-pronunciation-btn:not(.no-pronunciation),
.compare-banner-pronunciation-btn:not(.no-pronunciation) {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Disabled buttons (no pronunciation data) - must come before enabled styles */
.compare-banner-pronunciation-btn.no-pronunciation {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.5) !important;
    pointer-events: none !important;
}

/* Prevent hover effects on disabled buttons */
.compare-banner-pronunciation-btn.no-pronunciation:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: none !important;
    cursor: not-allowed !important;
}

/* Hover state for enabled buttons (same as dictionary page) - higher specificity */
.pronunciation-btn.compare-banner-pronunciation-btn:hover:not(.no-pronunciation),
.compare-banner-pronunciation-btn:hover:not(.no-pronunciation) {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: scale(1.05) !important;
    cursor: pointer !important;
    color: rgba(255, 255, 255, 0.9) !important;
    pointer-events: auto !important;
}

.compare-banner-pronunciation-btn:active:not(.no-pronunciation) {
    transform: scale(0.95) !important;
}

.compare-banner-pronunciation-btn.playing:not(.no-pronunciation) {
    background: rgba(255, 255, 255, 0.4) !important;
    animation: pulse 1s infinite;
}

/* Compare Results Container */
.compare-results {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Compare-specific styles that work with Dictionary sections */
/* Using definition-meaning class from Dictionary - no extra styling needed */

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

.differences-list li {
    font-size: 15px;
    line-height: 1.7;
    color: #2d3748;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.differences-list li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: #14B8A6;
    font-size: 1.2rem;
}

.differences-list li:last-child {
    margin-bottom: 0;
}

.memory-tip {
    font-size: 15px;
    line-height: 1.7;
    color: #2d3748;
    margin: 0;
}

/* Simple Explanation Section */
.compare-simple-explanation {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.compare-simple-explanation h3 {
    font-size: 20px;
    font-weight: 600;
    color: #475569;
    margin: 0 0 12px 0;
}

.compare-simple-explanation p {
    font-size: 16px;
    line-height: 1.6;
    color: #64748b;
    margin: 0;
}

/* Compare Table Container - Minimal design */
.compare-table-container {
    background: white;
    border: none !important;
    border-radius: 0;
    overflow: visible;
    margin-bottom: 0;
    box-shadow: none;
    padding: 0;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
}

.compare-table th.compare-word-header {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    padding: 1rem 2rem;
    text-align: left !important;
    background: white;
    vertical-align: top;
}

.compare-word-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    text-align: left;
}

.compare-word-title .part-of-speech {
    margin-left: 0.5rem;
    display: inline-block;
}

.compare-phonetics {
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.6);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.compare-pronunciation-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: center;
    margin-top: 0.5rem;
}

.compare-pronunciation-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.7);
    padding: 0.375rem 0.625rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 50px;
    height: 32px;
    font-size: 0.7rem;
    font-weight: 600;
}

.compare-pronunciation-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.compare-pronunciation-btn:active {
    transform: scale(0.95);
}

.compare-pronunciation-btn .accent-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.compare-table th.compare-word-header:first-child {
    border-left: none !important;
}

.compare-table th.compare-word-header:last-child {
    border-right: none !important;
}

/* Ensure borders are visible and merge properly */
.compare-table {
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

/* Single unified rule for all table cells - ensures borders merge properly */
/* All cells must have identical border styles for border-collapse to work */
.compare-table td,
.compare-table th {
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

/* Table cell specific styles */
.compare-table td.word-cell {
    padding: 1.5rem 2rem;
    vertical-align: top;
    background: #ffffff;
}

/* Word Info Styling - Matches Mockup */
.word-info {
    padding: 0;
    text-align: left;
}

.word-info .definition-section,
.word-info .examples-section,
.word-info .synonyms-section {
    padding: 1rem 0;
    border-bottom: none !important;
    font-size: 1rem;
    line-height: 1.6;
    color: #1e293b;
}

.word-info .synonyms-section {
    border-bottom: none !important;
}

.word-info .definition-section strong,
.word-info .examples-section strong,
.word-info .synonyms-section strong {
    font-weight: 600;
    color: #1e293b;
    margin-right: 0.5rem;
}

.word-info .definition-section {
    color: #1e293b;
}

.word-info .examples-section {
    color: #1e293b;
}

.word-info .synonyms-section {
    color: #1e293b;
}

/* Examples Styling - Minimal */
.examples {
    padding: 0;
    background: transparent;
    border-top: none;
}

.word-info .example-item {
    font-size: 1rem;
    line-height: 1.6;
    color: #1e293b;
    margin-top: 0.5rem;
    font-weight: 400;
    font-style: normal;
}

.word-info .example-item:last-child {
    margin-bottom: 0;
}

.no-content {
    font-size: 14px;
    color: #9ca3af;
    font-style: italic;
}

/* Two-word table specific styles */
.compare-table.two-word th,
.compare-table.two-word td {
    width: 50%;
}

/* Three-word table specific styles */
.compare-table.three-word th,
.compare-table.three-word td {
    width: 33.33%;
}

/* Key Differences Section - matches dictionary style */
.differences-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.differences-list li {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #1e293b;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.differences-list li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: #14B8A6;
    font-size: 1.2rem;
    font-weight: bold;
}

.differences-list li:last-child {
    margin-bottom: 0;
}

.memory-tip {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #1e293b;
    margin: 1rem 0 0 0;
    padding: 1rem 1.25rem;
    background: #f0fdf4;
    border-radius: 8px;
    border-left: 3px solid #14B8A6;
    font-weight: 500;
}

.key-difference-item {
    font-size: 1rem;
    line-height: 1.6;
    color: #1e293b;
    margin-bottom: 0.75rem;
    font-weight: 400;
}

.key-difference-item:last-child {
    margin-bottom: 0;
}

.key-difference-item strong {
    font-weight: 600;
    color: #1e293b;
    margin-right: 0.5rem;
}

/* Memory Tip Section */
.compare-memory-tip {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.compare-memory-tip h3 {
    font-size: 20px;
    font-weight: 600;
    color: #166534;
    margin: 0 0 12px 0;
}

.compare-memory-tip p {
    font-size: 16px;
    line-height: 1.6;
    color: #15803d;
    margin: 0;
    font-weight: 500;
}

/* Common Error Section - matches dictionary style */
.error-example {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.error-incorrect,
.error-correct,
.error-explanation {
    font-size: 1rem;
    line-height: 1.6;
    color: #2d3748;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin: 0;
    border-left: 3px solid;
}

.error-incorrect {
    background: #fef2f2;
    border-left-color: #dc2626;
}

.error-correct {
    background: #f0fdf4;
    border-left-color: #16a34a;
}

.error-explanation {
    background: #fef3c7;
    border-left-color: #f59e0b;
}

.error-incorrect strong,
.error-correct strong,
.error-explanation strong {
    font-weight: 600;
    margin-right: 0.5rem;
}

/* Mobile Responsiveness for Compare Tables */
@media (max-width: 768px) {
    .compare-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .compare-table {
        min-width: 600px;
    }
    
    .compare-table th.word-header,
    .compare-table td.word-cell {
        padding: 1rem 1.5rem;
        font-size: 14px;
    }
    
    .compare-table th.word-header {
        font-size: 15px;
    }
    
    .word-info,
    .examples {
        padding: 0;
    }
    
    .error-example {
        gap: 0.75rem;
    }
    
    .error-incorrect,
    .error-correct,
    .error-explanation {
        padding: 0.875rem 1rem;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .compare-table th.word-header,
    .compare-table td.word-cell {
        padding: 0.875rem 1rem;
        font-size: 13px;
    }
    
    .compare-table th.word-header {
        font-size: 14px;
    }
    
    .word-info,
    .examples {
        padding: 0;
    }
}

