/**
 * Ebhor Dictionary - Word Detail Page Redesign Styles
 * Premium Language-Learning & Modern SaaS Aesthetic
 */

/* ==========================================================================
   1. Design Tokens & Scoped Variables
   ========================================================================== */
:root {
    --wd-primary: #4f46e5;
    --wd-primary-hover: #4338ca;
    --wd-primary-light: #eef2ff;
    --wd-primary-glow: rgba(79, 70, 229, 0.15);
    
    --wd-secondary: #06b6d4;
    --wd-accent-purple: #8b5cf6;
    --wd-accent-amber: #f59e0b;
    --wd-accent-emerald: #10b981;
    
    --wd-bg-page: #f8fafc;
    --wd-bg-card: #ffffff;
    --wd-bg-card-elevated: #ffffff;
    --wd-bg-subtle: #f1f5f9;
    --wd-bg-muted: #f8fafc;
    
    --wd-text-title: #0f172a;
    --wd-text-body: #334155;
    --wd-text-muted: #64748b;
    --wd-text-subtle: #94a3b8;
    
    --wd-border: #e2e8f0;
    --wd-border-subtle: rgba(226, 232, 240, 0.7);
    --wd-border-focus: #818cf8;
    
    --wd-shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --wd-shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --wd-shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
    --wd-shadow-xl: 0 20px 30px -10px rgba(15, 23, 42, 0.08);
    
    --wd-radius-sm: 8px;
    --wd-radius-md: 12px;
    --wd-radius-lg: 18px;
    --wd-radius-xl: 24px;
    --wd-radius-full: 9999px;
    
    --wd-font-en: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --wd-font-hi: 'Noto Sans Devanagari', 'Inter', sans-serif;
    
    --wd-transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --wd-bg-page: #090d16;
    --wd-bg-card: #131b2e;
    --wd-bg-card-elevated: #18233c;
    --wd-bg-subtle: #1e293b;
    --wd-bg-muted: #111827;
    
    --wd-text-title: #f8fafc;
    --wd-text-body: #cbd5e1;
    --wd-text-muted: #94a3b8;
    --wd-text-subtle: #64748b;
    
    --wd-border: #243048;
    --wd-border-subtle: rgba(51, 65, 85, 0.5);
    --wd-border-focus: #6366f1;
    
    --wd-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --wd-shadow-md: 0 4px 10px rgba(0, 0, 0, 0.35);
    --wd-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.45);
    --wd-shadow-xl: 0 20px 35px rgba(0, 0, 0, 0.55);
    
    --wd-primary-light: rgba(79, 70, 229, 0.18);
    --wd-primary-glow: rgba(99, 102, 241, 0.25);
}

/* ==========================================================================
   2. Page Container & Two-Column Grid
   ========================================================================== */
.wd-page-wrapper {
    background-color: var(--wd-bg-page);
    min-height: 100vh;
    padding-bottom: 5rem;
    color: var(--wd-text-body);
    font-family: var(--wd-font-en);
}

.wd-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.wd-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    margin-top: 1.5rem;
}

@media (min-width: 1024px) {
    .wd-layout-grid {
        grid-template-columns: minmax(0, 70%) minmax(0, 30%);
        gap: 2.25rem;
    }
}

.wd-main-column {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    min-width: 0;
}

.wd-sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .wd-sidebar-column {
        position: sticky;
        top: 84px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        padding-bottom: 2rem;
        scrollbar-width: thin;
    }
    .wd-sidebar-column::-webkit-scrollbar {
        width: 4px;
    }
    .wd-sidebar-column::-webkit-scrollbar-thumb {
        background: var(--wd-border);
        border-radius: 4px;
    }
}

/* ==========================================================================
   3. Header Refinements (Polished SaaS Navbar)
   ========================================================================== */
.site-header {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid var(--wd-border) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    height: 64px !important;
    display: flex !important;
    align-items: center !important;
    transition: var(--wd-transition) !important;
}

[data-theme="dark"] .site-header {
    background: rgba(15, 23, 42, 0.88) !important;
}

.site-header .container {
    width: 100%;
}

.site-header .header-content {
    padding: 0 !important;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header .logo a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--wd-text-title);
    text-decoration: none;
}

.site-header .logo-badge-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.site-header .main-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-header .main-nav a {
    color: var(--wd-text-muted);
    font-size: 0.925rem;
    font-weight: 500;
    padding: 0.45rem 0.85rem;
    border-radius: var(--wd-radius-md);
    transition: var(--wd-transition);
    text-decoration: none;
}

.site-header .main-nav a:hover {
    color: var(--wd-primary);
    background: var(--wd-primary-light);
}

.site-header .main-nav a.active {
    color: var(--wd-primary);
    background: var(--wd-primary-light);
    font-weight: 600;
}

/* ==========================================================================
   4. Search Experience (Large Premium Component)
   ========================================================================== */
.wd-search-section {
    padding: 1.75rem 0 1rem;
}

.wd-search-wrapper {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
}

.wd-search-bar {
    display: flex;
    align-items: center;
    background: var(--wd-bg-card);
    border: 1.5px solid var(--wd-border);
    border-radius: var(--wd-radius-lg);
    padding: 0.45rem 0.65rem 0.45rem 1.25rem;
    box-shadow: var(--wd-shadow-md), 0 0 0 0 var(--wd-primary-glow);
    transition: var(--wd-transition);
}

.wd-search-bar:focus-within {
    border-color: var(--wd-primary);
    box-shadow: var(--wd-shadow-lg), 0 0 0 4px var(--wd-primary-glow);
    transform: translateY(-1px);
}

.wd-search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wd-primary);
    margin-right: 0.85rem;
    flex-shrink: 0;
}

.wd-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--wd-text-title);
    padding: 0.5rem 0;
    min-width: 0;
    font-family: inherit;
}

.wd-search-input::placeholder {
    color: var(--wd-text-subtle);
    font-weight: 400;
}

.wd-search-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.wd-search-kbd {
    display: none;
    align-items: center;
    background: var(--wd-bg-subtle);
    border: 1px solid var(--wd-border);
    color: var(--wd-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    letter-spacing: 0.02em;
    user-select: none;
}

@media (min-width: 640px) {
    .wd-search-kbd {
        display: inline-flex;
    }
}

.wd-mic-btn {
    background: transparent;
    border: none;
    color: var(--wd-text-muted);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--wd-transition);
}

.wd-mic-btn:hover {
    color: var(--wd-primary);
    background: var(--wd-primary-light);
}

.wd-mic-btn.listening {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    animation: pulseMic 1.2s infinite;
}

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

.wd-search-btn {
    background: linear-gradient(135deg, var(--wd-primary), #6366f1);
    color: white;
    border: none;
    border-radius: var(--wd-radius-md);
    padding: 0.65rem 1.25rem;
    font-size: 0.925rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--wd-transition);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.wd-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

/* Autocomplete Floating Dropdown */
.wd-autocomplete-box {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--wd-bg-card);
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius-lg);
    box-shadow: var(--wd-shadow-xl);
    z-index: 1050;
    display: none;
    overflow: hidden;
    backdrop-filter: blur(12px);
    animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.wd-autocomplete-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.15rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--wd-text-muted);
    background: var(--wd-bg-subtle);
    border-bottom: 1px solid var(--wd-border-subtle);
}

.wd-autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.15rem;
    color: var(--wd-text-title);
    text-decoration: none;
    border-bottom: 1px solid var(--wd-border-subtle);
    transition: var(--wd-transition);
}

.wd-autocomplete-item:last-child {
    border-bottom: none;
}

.wd-autocomplete-item:hover,
.wd-autocomplete-item.selected {
    background: var(--wd-primary-light);
    color: var(--wd-primary);
}

.wd-autocomplete-word {
    font-weight: 600;
    font-size: 0.975rem;
}

.wd-autocomplete-meaning {
    font-size: 0.85rem;
    color: var(--wd-text-muted);
    margin-left: 0.75rem;
    font-family: var(--wd-font-hi);
}

.wd-autocomplete-footer {
    padding: 0.5rem 1.15rem;
    font-size: 0.75rem;
    color: var(--wd-text-subtle);
    background: var(--wd-bg-muted);
    display: flex;
    justify-content: space-between;
}

/* ==========================================================================
   5. Breadcrumbs
   ========================================================================== */
.wd-breadcrumb-bar {
    padding: 0.5rem 0 1rem;
}

.wd-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: var(--wd-text-muted);
}

.wd-breadcrumbs a {
    color: var(--wd-text-muted);
    text-decoration: none;
    transition: var(--wd-transition);
}

.wd-breadcrumbs a:hover {
    color: var(--wd-primary);
}

.wd-breadcrumbs .sep {
    color: var(--wd-text-subtle);
    font-size: 0.8rem;
}

.wd-breadcrumbs .current {
    color: var(--wd-text-title);
    font-weight: 600;
    background: var(--wd-primary-light);
    color: var(--wd-primary);
    padding: 0.15rem 0.55rem;
    border-radius: var(--wd-radius-sm);
}

/* ==========================================================================
   6. Main Word Hero Section
   ========================================================================== */
.wd-hero-card {
    position: relative;
    background: var(--wd-bg-card);
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius-xl);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--wd-shadow-md);
    overflow: hidden;
    transition: var(--wd-transition);
}

.wd-hero-card::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 180px;
    background: radial-gradient(circle, var(--wd-primary-glow) 0%, transparent 70%);
    pointer-events: none;
}

.wd-hero-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.wd-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--wd-radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.wd-badge.lang-badge {
    background: var(--wd-primary-light);
    color: var(--wd-primary);
}

.wd-badge.pos-badge {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
}

[data-theme="dark"] .wd-badge.pos-badge {
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.2);
}

.wd-badge.level-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

[data-theme="dark"] .wd-badge.level-badge {
    color: #34d399;
}

.wd-word-title {
    font-size: clamp(2.5rem, 6vw, 3.85rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--wd-text-title);
    margin: 0 0 0.5rem;
    font-family: var(--wd-font-hi), var(--wd-font-en);
}

.wd-pronunciation-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--wd-text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.wd-ipa-tag {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: var(--wd-bg-subtle);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--wd-border-subtle);
    font-size: 0.95rem;
}

/* Interactive Sound-Wave Listen Button */
.wd-hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.wd-listen-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.6rem;
    background: linear-gradient(135deg, var(--wd-primary), #6366f1);
    color: white;
    border: none;
    border-radius: var(--wd-radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.3);
    transition: var(--wd-transition);
}

.wd-listen-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.wd-listen-btn:active {
    transform: translateY(0);
}

/* Audio Soundwave animation */
.wd-sound-wave {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 16px;
}

.wd-sound-wave span {
    display: inline-block;
    width: 3px;
    height: 6px;
    background: white;
    border-radius: 2px;
}

.wd-listen-btn.playing .wd-sound-wave span:nth-child(1) {
    animation: waveBar 0.6s infinite ease-in-out alternate;
}
.wd-listen-btn.playing .wd-sound-wave span:nth-child(2) {
    animation: waveBar 0.6s infinite ease-in-out 0.2s alternate;
}
.wd-listen-btn.playing .wd-sound-wave span:nth-child(3) {
    animation: waveBar 0.6s infinite ease-in-out 0.4s alternate;
}

@keyframes waveBar {
    0% { height: 4px; }
    100% { height: 16px; }
}

.wd-secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1.35rem;
    background: var(--wd-bg-subtle);
    color: var(--wd-text-body);
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--wd-transition);
    text-decoration: none;
}

.wd-secondary-btn:hover {
    background: var(--wd-border);
    color: var(--wd-text-title);
    transform: translateY(-1px);
}

/* ==========================================================================
   7. Primary Word Information Card
   ========================================================================== */
.wd-card {
    background: var(--wd-bg-card);
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius-lg);
    padding: 1.75rem;
    box-shadow: var(--wd-shadow-md);
    transition: var(--wd-transition);
}

.wd-card:hover {
    box-shadow: var(--wd-shadow-lg);
}

.wd-card-accent-top {
    border-top: 3.5px solid var(--wd-primary);
}

.wd-meaning-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.wd-meaning-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wd-primary);
}

.wd-meaning-primary-text {
    font-size: clamp(1.6rem, 3.8vw, 2.35rem);
    font-weight: 700;
    line-height: 1.45;
    color: var(--wd-text-title);
    font-family: var(--wd-font-hi);
    margin: 0.5rem 0 1.25rem;
}

.wd-meaning-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px dashed var(--wd-border-subtle);
}

.wd-action-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--wd-radius-md);
    background: var(--wd-bg-subtle);
    border: 1px solid var(--wd-border);
    color: var(--wd-text-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--wd-transition);
}

.wd-action-chip:hover {
    background: var(--wd-primary-light);
    color: var(--wd-primary);
    border-color: var(--wd-primary);
}

/* ==========================================================================
   8. Meaning / Explanation Section
   ========================================================================== */
.wd-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.wd-section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--wd-text-title);
    margin: 0;
}

.wd-explanation-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--wd-text-body);
    font-family: var(--wd-font-hi), var(--wd-font-en);
}

.wd-explanation-body p {
    margin-bottom: 1rem;
}

.wd-explanation-body p:last-child {
    margin-bottom: 0;
}

/* Expandable Read More */
.wd-expandable-content {
    position: relative;
    max-height: 160px;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.wd-expandable-content.expanded {
    max-height: 2000px;
}

.wd-expandable-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--wd-bg-card));
    pointer-events: none;
}

.wd-expandable-content.expanded .wd-expandable-fade {
    display: none;
}

.wd-toggle-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    background: none;
    border: none;
    color: var(--wd-primary);
    font-weight: 600;
    font-size: 0.925rem;
    cursor: pointer;
    padding: 0.25rem 0;
}

/* Cultural Context Note */
.wd-cultural-callout {
    margin-top: 1.25rem;
    padding: 1.15rem 1.35rem;
    background: rgba(245, 158, 11, 0.08);
    border-left: 3.5px solid var(--wd-accent-amber);
    border-radius: var(--wd-radius-md);
    color: var(--wd-text-body);
}

[data-theme="dark"] .wd-cultural-callout {
    background: rgba(245, 158, 11, 0.12);
}

.wd-cultural-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--wd-accent-amber);
    margin: 0 0 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ==========================================================================
   9. Example Sentences Section
   ========================================================================== */
.wd-examples-subtitle {
    font-size: 0.925rem;
    color: var(--wd-text-muted);
    margin: -0.5rem 0 1.25rem;
}

.wd-examples-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wd-example-card {
    position: relative;
    background: var(--wd-bg-card);
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius-lg);
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 1.25rem;
    transition: var(--wd-transition);
}

.wd-example-card:hover {
    border-color: var(--wd-primary);
    box-shadow: var(--wd-shadow-md);
    transform: translateY(-2px);
}

.wd-example-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--wd-primary-light);
    color: var(--wd-primary);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wd-example-content {
    flex: 1;
    min-width: 0;
}

.wd-example-source {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--wd-text-title);
    margin-bottom: 0.45rem;
    line-height: 1.5;
}

.wd-example-source mark,
.wd-example-source .highlight {
    background: rgba(79, 70, 229, 0.14);
    color: var(--wd-primary);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-weight: 700;
}

.wd-example-target {
    font-size: 1.025rem;
    color: var(--wd-text-muted);
    font-family: var(--wd-font-hi);
    line-height: 1.6;
}

.wd-example-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.wd-example-mini-btn {
    background: transparent;
    border: none;
    color: var(--wd-text-subtle);
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--wd-transition);
}

.wd-example-mini-btn:hover {
    background: var(--wd-bg-subtle);
    color: var(--wd-primary);
}

/* ==========================================================================
   10. "Learn This Word" Interactive Section
   ========================================================================== */
.wd-learn-section {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.04), rgba(6, 182, 212, 0.04));
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius-xl);
    padding: 1.75rem;
}

.wd-learn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.wd-learn-card {
    background: var(--wd-bg-card);
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius-md);
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    cursor: pointer;
    transition: var(--wd-transition);
    text-decoration: none;
    color: inherit;
}

.wd-learn-card:hover {
    border-color: var(--wd-primary);
    box-shadow: var(--wd-shadow-md);
    transform: translateY(-2px);
}

.wd-learn-card-icon {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
}

.wd-learn-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--wd-text-title);
}

.wd-learn-card-desc {
    font-size: 0.825rem;
    color: var(--wd-text-muted);
    line-height: 1.4;
}

/* Flashcard Flip Interactive Widget */
.wd-flashcard-box {
    margin-top: 1.5rem;
    background: var(--wd-bg-card);
    border: 1.5px dashed var(--wd-border);
    border-radius: var(--wd-radius-lg);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--wd-transition);
    user-select: none;
}

.wd-flashcard-box:hover {
    border-color: var(--wd-primary);
    background: var(--wd-primary-light);
}

.wd-flashcard-hint {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wd-primary);
    margin-bottom: 0.5rem;
}

.wd-flashcard-front,
.wd-flashcard-back {
    transition: var(--wd-transition);
}

.wd-flashcard-front {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--wd-text-title);
}

.wd-flashcard-back {
    display: none;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--wd-primary);
    font-family: var(--wd-font-hi);
}

.wd-flashcard-box.flipped .wd-flashcard-front {
    display: none;
}

.wd-flashcard-box.flipped .wd-flashcard-back {
    display: block;
}

/* ==========================================================================
   11. Related Words (Synonyms & Antonyms)
   ========================================================================== */
.wd-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.wd-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: var(--wd-radius-full);
    background: var(--wd-bg-subtle);
    border: 1px solid var(--wd-border);
    color: var(--wd-text-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--wd-transition);
}

.wd-chip:hover {
    background: var(--wd-primary-light);
    color: var(--wd-primary);
    border-color: var(--wd-primary);
    transform: translateY(-1px);
}

.wd-chip .chip-arrow {
    font-size: 0.8rem;
    opacity: 0.6;
    transition: transform 0.15s ease;
}

.wd-chip:hover .chip-arrow {
    transform: translateX(2px);
    opacity: 1;
}

/* ==========================================================================
   12. Sidebar Styling (Nearby, Popular, Recent)
   ========================================================================== */
.wd-sidebar-card {
    background: var(--wd-bg-card);
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius-lg);
    padding: 1.35rem;
    box-shadow: var(--wd-shadow-sm);
}

.wd-sidebar-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--wd-text-title);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wd-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.wd-sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.65rem;
    border-radius: var(--wd-radius-md);
    color: var(--wd-text-body);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    transition: var(--wd-transition);
}

.wd-sidebar-item:hover {
    background: var(--wd-bg-subtle);
    color: var(--wd-primary);
    transform: translateX(3px);
}

.wd-sidebar-item .item-rank {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--wd-text-subtle);
    width: 22px;
}

.wd-sidebar-item .item-arrow {
    color: var(--wd-text-subtle);
    font-size: 0.85rem;
    transition: transform 0.15s ease;
}

.wd-sidebar-item:hover .item-arrow {
    transform: translateX(3px);
    color: var(--wd-primary);
}

.wd-badge-new {
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   13. Share & Helpful Feedback Sections
   ========================================================================== */
.wd-share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

.wd-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: var(--wd-radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--wd-transition);
}

.wd-share-btn.whatsapp { background: #25d366; }
.wd-share-btn.twitter { background: #0f1419; }
[data-theme="dark"] .wd-share-btn.twitter { background: #272c30; border: 1px solid #3e444a; }
.wd-share-btn.facebook { background: #1877f2; }
.wd-share-btn.copylink {
    background: var(--wd-bg-subtle);
    color: var(--wd-text-body);
    border: 1px solid var(--wd-border);
}

.wd-share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.95;
    box-shadow: var(--wd-shadow-md);
}

/* Feedback Card */
.wd-feedback-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--wd-bg-subtle);
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius-lg);
}

.wd-feedback-btns {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1rem 0 0.75rem;
}

.wd-feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    border-radius: var(--wd-radius-full);
    background: var(--wd-bg-card);
    border: 1px solid var(--wd-border);
    color: var(--wd-text-body);
    font-size: 0.925rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--wd-transition);
}

.wd-feedback-btn:hover {
    border-color: var(--wd-primary);
    color: var(--wd-primary);
    transform: translateY(-1px);
}

.wd-feedback-success {
    display: none;
    font-weight: 600;
    color: var(--wd-accent-emerald);
    animation: fadeIn 0.3s ease;
}

/* ==========================================================================
   14. Mobile Sticky Bottom Action Bar
   ========================================================================== */
.wd-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--wd-border);
    padding: 0.65rem 1rem;
    z-index: 990;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .wd-mobile-bar {
    background: rgba(15, 23, 42, 0.92);
}

.wd-mobile-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    max-width: 500px;
    margin: 0 auto;
}

.wd-mobile-bar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: transparent;
    border: none;
    color: var(--wd-text-body);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    transition: var(--wd-transition);
}

.wd-mobile-bar-btn:active {
    background: var(--wd-primary-light);
    color: var(--wd-primary);
}

@media (max-width: 767px) {
    .wd-mobile-bar {
        display: block;
    }
}

/* ==========================================================================
   15. Toast Notifications
   ========================================================================== */
.wd-toast-box {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.wd-toast {
    background: var(--wd-text-title);
    color: var(--wd-bg-card);
    padding: 0.85rem 1.35rem;
    border-radius: var(--wd-radius-md);
    box-shadow: var(--wd-shadow-lg);
    font-size: 0.925rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(12px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(12px) scale(0.95); }
}

/* ==========================================================================
   16. Multi-Device Responsive Breakpoints (1440px, 1024px, 768px, 390px, 360px)
   ========================================================================== */
.wd-word-title,
.wd-meaning-primary-text,
.wd-example-source,
.wd-example-target {
    word-break: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 1023px) {
    .wd-layout-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
}

@media (max-width: 767px) {
    .wd-page-wrapper {
        padding-bottom: 6.5rem; /* Space for floating mobile bar */
    }
    .wd-search-section {
        padding: 1rem 0 0.5rem;
    }
    .wd-hero-card {
        padding: 2rem 1.25rem;
        border-radius: var(--wd-radius-lg);
    }
    .wd-word-title {
        font-size: clamp(2rem, 7.5vw, 2.75rem);
    }
    .wd-meaning-primary-text {
        font-size: clamp(1.4rem, 5.5vw, 1.85rem);
    }
    .wd-card {
        padding: 1.25rem;
        border-radius: var(--wd-radius-md);
    }
    .wd-example-card {
        padding: 1rem;
        gap: 0.85rem;
    }
    .wd-example-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    .wd-learn-section {
        padding: 1.25rem;
        border-radius: var(--wd-radius-lg);
    }
    .wd-learn-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .wd-container {
        padding: 0 0.85rem;
    }
    .wd-search-bar {
        padding: 0.35rem 0.45rem 0.35rem 0.85rem;
    }
    .wd-search-input {
        font-size: 0.95rem;
    }
    .wd-search-btn {
        padding: 0.55rem 0.85rem;
    }
    .wd-search-btn span {
        display: none;
    }
    .wd-search-kbd {
        display: none !important;
    }
    .wd-hero-card {
        padding: 1.75rem 1rem;
    }
    .wd-hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .wd-listen-btn,
    .wd-secondary-btn {
        width: 100%;
        justify-content: center;
    }
    .wd-learn-grid {
        grid-template-columns: 1fr;
    }
    .wd-share-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 360px) {
    .wd-word-title {
        font-size: 1.85rem;
    }
    .wd-meaning-primary-text {
        font-size: 1.35rem;
    }
    .wd-share-grid {
        grid-template-columns: 1fr;
    }
}
