/* ============================================
   FRONT PAGE - DICTIONARY.COM STYLE
   ============================================ */

.dict-front { background: #fafafa; }

/* ============================================
   HERO
   ============================================ */
.dict-hero {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    padding: 80px 20px 60px;
    text-align: center;
}

.hero-content { max-width: 700px; margin: 0 auto; }

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 36px;
}

.hero-search { margin-bottom: 24px; }

.search-input-wrapper {
    display: flex;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 20px 24px;
    border: none;
    font-size: 1.2rem;
    color: #333;
    background: white;
    font-family: inherit;
}
.search-input::placeholder { color: #999; font-style: italic; }
.search-input:focus { outline: none; }

.search-btn {
    padding: 20px 28px;
    background: #e8f0fe;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    transition: background 0.15s;
}
.search-btn:hover { background: #d2e3fc; }

.hero-hint { font-size: 0.9rem; color: rgba(255,255,255,0.5); }
.hero-hint a { color: rgba(255,255,255,0.8); text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,0.3); }
.hero-hint a:hover { color: white; border-bottom-color: white; }

/* ============================================
   WORD OF THE DAY
   ============================================ */
.dict-wotd { padding: 0 16px; margin-top: -30px; position: relative; z-index: 2; }

.wotd-card {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}

.wotd-header {
    background: linear-gradient(135deg, #1a1a2e, #2a3a5e);
    padding: 14px 24px;
}

.wotd-label {
    color: #ffd700;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.wotd-body { padding: 28px 24px; }

.wotd-word-link { text-decoration: none; }
.wotd-word-link:hover .wotd-word { color: #1a73e8; }

.wotd-word {
    font-family: var(--font-ewe);
    font-size: 2.5rem;
    color: #1a1a2e;
    margin-bottom: 8px;
    line-height: 1.2;
}

.wotd-pronunciation {
    display: inline-block;
    font-size: 1rem;
    color: #666;
    font-style: italic;
    margin-right: 12px;
}

.wotd-tone {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.wotd-meanings { margin: 20px 0; }

.wotd-meaning {
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    align-items: baseline;
}

.meaning-lang {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    min-width: 70px;
}

.meaning-text { font-size: 1.05rem; color: #333; }

.wotd-example {
    background: #f8f9fa;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
    border-left: 3px solid #1a73e8;
}

.example-ewe { font-family: var(--font-ewe); font-size: 1.05rem; color: #1a1a2e; margin-bottom: 4px; }
.example-en { font-size: 0.9rem; color: #666; font-style: italic; }

.wotd-full-link {
    display: inline-block;
    margin-top: 8px;
    color: #1a73e8;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}
.wotd-full-link:hover { text-decoration: underline; }

.wotd-empty { text-align: center; padding: 40px; color: #999; }

/* ============================================
   WORD OF THE DAY VIDEO
   ============================================ */

.wotd-video {
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-wrapper iframe,
.video-wrapper object,
.video-wrapper embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Two-column layout when video exists */
.wotd-card .wotd-body {
    padding: 0;
}

.wotd-card .wotd-content {
    padding: 28px 24px;
}



/* ============================================
   SECTION LABELS
   ============================================ */
.section-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    margin-bottom: 20px;
    text-align: center;
}

/* ============================================
   BROWSE BY LETTER
   ============================================ */
.dict-browse-letters { padding: 56px 16px 40px; }

.letters-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 900px;
    margin: 0 auto;
}

.letter-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s;
}
.letter-box:hover {
    background: #1a1a2e;
    border-color: #1a1a2e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.letter-box:hover .letter-char { color: white; }

.letter-char {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

/* ============================================
   BROWSE BY CATEGORY
   ============================================ */
.dict-browse-cats { padding: 0 16px 56px; }

.cats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.cat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 12px;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s;
}
.cat-box:hover {
    border-color: #1a73e8;
    box-shadow: 0 4px 16px rgba(26,115,232,0.1);
    transform: translateY(-3px);
}

.cat-icon { font-size: 1.75rem; margin-bottom: 8px; }
.cat-name { font-size: 0.9rem; font-weight: 600; color: #333; text-align: center; }
.cat-count { font-size: 0.75rem; color: #999; margin-top: 4px; }

/* ============================================
   RECENTLY ADDED
   ============================================ */
.dict-recent { padding: 0 16px 56px; }

.recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto 20px;
}

.recent-header .section-label { margin-bottom: 0; text-align: left; }

.see-all {
    font-size: 0.85rem;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}
.see-all:hover { text-decoration: underline; }

.recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.recent-card {
    display: flex;
    flex-direction: column;
    padding: 20px 18px;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}
.recent-card:hover {
    border-color: #1a73e8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.recent-word { font-family: var(--font-ewe); font-size: 1.25rem; color: #1a1a2e; margin-bottom: 6px; font-weight: 600; }
.recent-pron { font-size: 0.8rem; color: #888; font-style: italic; margin-bottom: 4px; }
.recent-eng { font-size: 0.9rem; color: #555; margin-bottom: 8px; flex: 1; }
.recent-cat { display: inline-block; align-self: flex-start; padding: 3px 8px; background: #f0f4ff; color: #1a73e8; border-radius: 4px; font-size: 0.7rem; font-weight: 600; }

/* ============================================
   STATS BAR
   ============================================ */
.dict-stats-bar {
    background: #1a1a2e;
    padding: 48px 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 768px) {
    .dict-hero { padding: 48px 16px 40px; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .search-input { padding: 16px 18px; font-size: 1.05rem; }
    .search-btn { padding: 16px 20px; }
    
    .wotd-word { font-size: 1.75rem; }
    .wotd-body { padding: 20px 16px; }
    
    .letters-grid { gap: 5px; }
    .letter-box { width: 38px; height: 38px; }
    .letter-char { font-size: 0.95rem; }
    
    .cats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .recent-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stats-grid { grid-template-columns: (2, 1fr); gap: 20px; }
     .wotd-card .wotd-content {
        padding: 16px 16px;
    }
    
    .wotd-video {
        margin-bottom: 0;
        border-radius: 12px 12px 0 0;
    }


}

@media (max-width: 480px) {
    .hero-title { font-size: 1.6rem; }
    .cats-grid { grid-template-columns: 1fr 1fr; }
    .recent-grid { grid-template-columns: 1fr; }
    .wotd-word { font-size: 1.5rem; }
}



/* ============================================
   POPULAR WORDS SECTION
   ============================================ */

.dict-popular {
    padding: 48px 16px;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-sublabel {
    font-size: 0.85rem;
    color: #888;
    margin-top: 4px;
}

/* Popular Grid */
.popular-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 750px;
    margin: 0 auto;
}

.popular-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.popular-card:hover {
    background: #f0f4ff;
    border-color: #d0d8f0;
    transform: translateX(4px);
}

/* Rank Number */
.popular-rank {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ccc;
}

.popular-card:nth-child(1) .rank-number { color: #d4a017; }
.popular-card:nth-child(2) .rank-number { color: #c0c0c0; }
.popular-card:nth-child(3) .rank-number { color: #cd7f32; }

/* Popular Content */
.popular-content {
    flex: 1;
}

.popular-word-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.popular-word {
    font-family: var(--font-ewe);
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a1a2e;
}

.popular-audio-icon {
    font-size: 0.9rem;
    opacity: 0.6;
}

.popular-pron {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
    margin-left: 4px;
}

.popular-translations {
    display: flex;
    gap: 12px;
    margin-top: 2px;
}

.popular-eng {
    font-size: 0.9rem;
    color: #444;
}

.popular-fr {
    font-size: 0.85rem;
    color: #888;
}

/* Popular Meta */
.popular-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.popular-cat {
    padding: 2px 8px;
    background: #f0f4ff;
    color: #1a73e8;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.popular-tone {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
}

.popular-views {
    font-size: 0.75rem;
    color: #aaa;
    margin-left: auto;
}

/* Arrow */
.popular-arrow {
    color: #ccc;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.popular-card:hover .popular-arrow {
    color: #1a73e8;
    transform: translateX(3px);
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 768px) {
    .popular-card {
        padding: 14px 16px;
        gap: 12px;
    }
    
    .popular-rank {
        width: 32px;
        height: 32px;
    }
    
    .popular-word {
        font-size: 1.05rem;
    }
    
    .popular-meta {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .popular-views {
        margin-left: 0;
    }
}