/* Minimal Fixed Header - Arkadium Style */
.minimal-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: visible !important;
    box-sizing: border-box !important;
}

/* Left Section */
.minimal-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 1;
    min-width: 0;
}

.minimal-header-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

/* Breadcrumb Button */
.minimal-header-breadcrumb {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 8px;
    color: #333;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.minimal-header-breadcrumb:hover {
    background: rgba(0, 0, 0, 0.05);
}

.minimal-header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 18px;
}

.minimal-header-logo img {
    height: 32px;
    width: auto;
}

/* Breadcrumb Dropdown - SEO-friendly (visible to crawlers) */
.minimal-header-breadcrumb-dropdown {
    position: absolute;
    top: 45px;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 10000;

    /* SEO-friendly hiding - content is in DOM but visually hidden */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.minimal-header-breadcrumb-dropdown.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.breadcrumb-item:hover {
    background: #f5f5f5;
}

.breadcrumb-item.breadcrumb-all-games {
    background: rgba(107, 101, 255, 0.05);
    font-weight: 600;
}

.breadcrumb-item.breadcrumb-all-games:hover {
    background: rgba(107, 101, 255, 0.1);
}

.breadcrumb-icon {
    font-size: 18px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breadcrumb-text {
    font-size: 14px;
}

/* Game Logo in Breadcrumb */
.breadcrumb-game-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.minimal-header-breadcrumb-dropdown hr {
    margin: 0;
    border: none;
    border-top: 1px solid #eee;
}

/* Navigation Links */
.minimal-header-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s;
    border: none !important;
    outline: none !important;
    background: none;
    cursor: pointer;
}

.nav-link:hover {
    color: #6b65ff;
    background: rgba(107, 101, 255, 0.05);
}

.nav-link:focus,
.nav-link:active {
    outline: none !important;
    border: none !important;
}

/* Navigation Dropdowns */
.nav-dropdown {
    position: relative;
}

/* Extend hover zone for nav dropdowns */
.nav-hover-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -10px;
    right: -10px;
    height: 20px;
    background: transparent;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    border: none !important;
    outline: none !important;
}

.dropdown-toggle:focus {
    outline: none !important;
    border: none !important;
}

.dropdown-toggle:active {
    outline: none !important;
    border: none !important;
}

/* Dropdown arrow styling */
.dropdown-toggle .dropdown-arrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 400;
    margin-left: 2px;
    transform: rotate(90deg);
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.nav-hover-dropdown:hover .dropdown-toggle .dropdown-arrow {
    transform: rotate(270deg);
    opacity: 1;
}

.new-badge {
    background: #ff4757;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 8px 0;
    padding-top: 16px;
    z-index: 10000;
}

/* Invisible bridge to prevent gap between toggle and menu */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -20px;
    right: -20px;
    height: 25px;
    background: transparent;
}

.nav-hover-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-link {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-link:hover {
    background: #f5f5f5;
    color: #6b65ff;
}

/* Dropdown item buttons (for Profile Settings, etc) */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
    color: #6b65ff;
}

.dropdown-item .link-icon {
    font-size: 16px;
}

.dropdown-divider {
    margin: 8px 0;
    border: none;
    border-top: 1px solid #eee;
}

/* Right Section */
.minimal-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Theme Switcher */
.minimal-header-theme {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.minimal-header-theme:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Theme Dropdown Menu */
.minimal-theme-dropdown {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 260px;
    overflow: hidden;
    z-index: 10000;
}

.minimal-theme-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.minimal-theme-option:hover {
    background: #f5f5f5;
}

.minimal-theme-option.active {
    background: rgba(107, 101, 255, 0.1);
}

.minimal-theme-option .theme-icon {
    font-size: 24px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.minimal-theme-option .theme-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.minimal-theme-option .theme-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.minimal-theme-option .theme-desc {
    font-size: 11px;
    color: #666;
}

.minimal-theme-option.active .theme-name {
    color: #6b65ff;
}

/* Buy Me a Coffee Link - Moved to footer */
/*
.minimal-header-coffee {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(255, 121, 63, 0.1);
    color: #ff6b35;
    border: 1px solid rgba(255, 121, 63, 0.3);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 16px;
    transition: all 0.2s;
    white-space: nowrap;
}

.minimal-header-coffee:hover {
    background: rgba(255, 121, 63, 0.2);
    color: #ff5722;
    border-color: rgba(255, 121, 63, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}
*/

/* Language Selector */
.minimal-header-language {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.minimal-header-language img {
    transition: transform 0.2s;
}

.minimal-header-language:hover {
    background: rgba(0, 0, 0, 0.05);
}

.minimal-header-language:hover img {
    transform: scale(1.1);
}

/* Language Dropdown Menu */
.minimal-lang-dropdown {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    overflow: hidden;
    z-index: 10000;
}

.minimal-lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.minimal-lang-option:hover {
    background: #f5f5f5;
}

.minimal-lang-option.active {
    background: rgba(107, 101, 255, 0.1);
    font-weight: 600;
}

.minimal-lang-option .lang-flag {
    font-size: 20px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.minimal-lang-option .lang-name {
    flex: 1;
}

/* Sign In Button */
.minimal-header-signin {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(107, 101, 255, 0.1);
    border: 2px solid #6b65ff;
    color: #6b65ff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s;
}

/* Sign In Button - Visible by default (assume not signed in initially) */
.minimal-header-signin {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    color: #333;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s;
}

.minimal-header-signin:hover {
    background: #6b65ff;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(107, 101, 255, 0.3);
}

.minimal-header-signin .signin-text {
    display: inline;
}

@media (max-width: 768px) {
    .minimal-header-signin .signin-text {
        display: none;
    }
}

/* Auth hidden state - takes priority over all display rules */
.auth-hidden,
#google-signin-btn.auth-hidden,
.minimal-header-signin.auth-hidden {
    display: none !important;
    visibility: hidden !important;
}

/* When authManager shows it */
#google-signin-btn[style*="display: block"]:not(.auth-hidden),
#google-signin-btn[style*="display: flex"]:not(.auth-hidden) {
    display: flex !important;
}

/* User Profile - Hidden by default (assume not signed in initially) */
.minimal-header-user {
    display: none !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

/* When authManager shows it - force flex display and override the default hide */
#user-profile[style*="display: block"],
#user-profile[style*="display: flex"] {
    display: flex !important;
}

.minimal-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #6b65ff;
    transition: border-color 0.2s, transform 0.2s;
    cursor: pointer;
}

.minimal-header-user:hover .minimal-header-avatar,
.minimal-header-user.dropdown-open .minimal-header-avatar {
    border-color: #5a45d6;
    transform: scale(1.05);
}

.minimal-header-username {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* User Dropdown */
.minimal-header-dropdown {
    display: none !important;
    position: absolute;
    top: 45px;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    overflow: hidden;
    z-index: 10001;
}

/* Show dropdown on click (via class) or hover */
.minimal-header-user.dropdown-open .minimal-header-dropdown,
.minimal-header-user:hover .minimal-header-dropdown {
    display: block !important;
}

/* Dropdown Action Buttons (Sign In, Sign Up, Sign Out) */
.dropdown-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-align: left;
}

.dropdown-action-btn:hover {
    background: rgba(107, 101, 255, 0.1);
    color: #6b65ff;
}

.dropdown-action-btn .btn-icon {
    font-size: 18px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-action-btn .btn-text {
    flex: 1;
}

/* Dropdown Links (Profile, Favorites) */
.minimal-header-dropdown .dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.minimal-header-dropdown .dropdown-link:hover {
    background: rgba(107, 101, 255, 0.1);
    color: #6b65ff;
}

.minimal-header-dropdown .link-icon {
    font-size: 18px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.minimal-header-dropdown .link-text {
    flex: 1;
}

.minimal-header-dropdown hr {
    margin: 0;
    border: none;
    border-top: 1px solid #eee;
}

/* Add top padding to body so content isn't hidden under fixed header */
body.has-minimal-header {
    padding-top: 50px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .minimal-header {
        padding: 0 10px !important;
        height: 50px !important;
    }

    .minimal-header-left {
        gap: 10px !important;
    }

    .minimal-header-right {
        gap: 10px !important;
    }

    .minimal-header-logo {
        font-size: 16px;
    }

    .minimal-header-logo img {
        height: 28px;
    }

    .minimal-header-logo span {
        display: none;
    }

    /* Hide nav links on mobile */
    .minimal-header-nav {
        display: none;
    }

    .minimal-header-username {
        display: none;
    }

    .minimal-header-breadcrumb {
        padding: 5px;
        font-size: 18px;
    }

    .minimal-header-theme {
        padding: 5px;
        font-size: 18px;
    }

    .minimal-header-language {
        padding: 5px;
        font-size: 18px;
    }

    .minimal-header-language img {
        width: 20px;
        height: 20px;
    }

    /* Coffee link on mobile */
    .minimal-header-coffee {
        padding: 5px 10px;
        font-size: 12px;
    }

    /* Sign in button on mobile */
    .minimal-header-signin {
        padding: 6px 12px;
        font-size: 13px;
        gap: 4px;
    }

    /* User dropdown positioning on mobile */
    .minimal-header-dropdown {
        top: 50px;
        right: 5px;
        min-width: 180px;
        max-width: calc(100vw - 20px);
    }

    /* Theme and language dropdowns on mobile */
    .minimal-theme-dropdown,
    .minimal-lang-dropdown {
        min-width: 200px;
        max-width: calc(100vw - 20px);
        left: auto !important;
    }

    .minimal-lang-option {
        padding: 10px 14px;
        font-size: 13px;
    }

    .minimal-lang-option .lang-flag {
        font-size: 18px;
        width: 22px;
    }
}

@media (max-width: 480px) {
    .minimal-header-right {
        gap: 6px;
    }

    .minimal-header-theme {
        padding: 4px;
        font-size: 16px;
    }

    .minimal-header-language {
        padding: 4px;
        font-size: 16px;
    }

    .minimal-header-language img {
        width: 18px;
        height: 18px;
    }

    .minimal-header-avatar {
        width: 32px;
        height: 32px;
    }

    .minimal-header-signin {
        padding: 5px 10px;
        font-size: 12px;
    }

    /* Smaller dropdowns on very small screens */
    .minimal-header-dropdown {
        min-width: 160px;
        font-size: 13px;
    }

    .dropdown-item,
    .dropdown-link {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* Language dropdown on very small screens */
    .minimal-lang-dropdown {
        min-width: 160px;
        max-width: calc(100vw - 16px);
    }

    .minimal-lang-option {
        padding: 8px 12px;
        font-size: 12px;
        gap: 8px;
    }

    .minimal-lang-option .lang-flag {
        font-size: 16px;
        width: 20px;
    }

    .minimal-lang-option .lang-name {
        font-size: 12px;
    }

    /* Theme dropdown on very small screens */
    .minimal-theme-dropdown {
        min-width: 200px;
        max-width: calc(100vw - 16px);
    }

    .minimal-theme-option {
        padding: 10px 12px;
        gap: 10px;
    }

    .minimal-theme-option .theme-icon {
        font-size: 20px;
        width: 28px;
    }

    .minimal-theme-option .theme-name {
        font-size: 13px;
    }

    .minimal-theme-option .theme-desc {
        font-size: 10px;
    }
}

/* Mobile Menu Button - Hidden by default */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    padding: 8px;
    cursor: pointer;
    color: #666;
    border-radius: 8px;
    transition: all 0.2s;
}

.mobile-menu-toggle:hover {
    background: rgba(107, 101, 255, 0.1);
    color: #6b65ff;
}

/* Mobile Navigation Menu */
.mobile-nav-menu {
    display: none;
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 9998;
    padding: 10px 0;
    max-height: calc(100vh - 50px);
    overflow-y: auto;
}

.mobile-nav-menu.open {
    display: block;
}

.mobile-nav-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.mobile-nav-menu a:hover {
    background: rgba(107, 101, 255, 0.05);
    color: #6b65ff;
    border-left-color: #6b65ff;
}

.mobile-nav-menu .mobile-nav-section {
    padding: 8px 20px 4px;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-nav-menu hr {
    margin: 8px 20px;
    border: none;
    border-top: 1px solid #eee;
}

/* Show mobile menu toggle on mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ===== Dictionary Button & Modal ===== */

/* Dictionary Button in Header */
.minimal-header-dict-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    background: rgba(107, 101, 255, 0.1);
    border-radius: 20px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.minimal-header-dict-btn .dict-text {
    font-size: 14px;
    font-weight: 600;
    color: #6b65ff;
}

.minimal-header-dict-btn:hover {
    background: rgba(107, 101, 255, 0.2);
    transform: translateY(-1px);
}

.minimal-header-dict-btn:hover .dict-text {
    color: #5649ff;
}

/* Hide "Dictionary" text on small screens to save space */
@media (max-width: 768px) {
    .minimal-header-dict-btn .dict-text {
        display: none;
    }

    .minimal-header-dict-btn {
        width: 40px;
        height: 40px;
        padding: 8px;
        border-radius: 50%;
    }
}

/* Dictionary Modal Overlay */
.dict-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.dict-modal-overlay.open {
    display: flex;
}

/* Dictionary Modal */
.dict-modal {
    background: var(--bg-secondary, #ffffff);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 24px;
    animation: dict-modal-appear 0.2s ease;
}

@keyframes dict-modal-appear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dict-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-primary, #f3f4f6);
    color: var(--text-secondary, #6b7280);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.dict-modal-close:hover {
    background: var(--border-color, #e5e7eb);
    color: var(--text-primary, #1f2937);
}

.dict-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin-bottom: 16px;
}

.dict-modal-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.dict-modal-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    font-size: 16px;
    background: var(--bg-primary, #f3f4f6);
    color: var(--text-primary, #1f2937);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dict-modal-input:focus {
    border-color: #6b65ff;
    box-shadow: 0 0 0 3px rgba(107, 101, 255, 0.15);
}

.dict-modal-input::placeholder {
    color: var(--text-secondary, #6b7280);
}

.dict-modal-btn {
    padding: 12px 20px;
    background: #6b65ff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.dict-modal-btn:hover {
    background: #5a54e6;
}

/* Dictionary Result */
.dict-modal-result {
    min-height: 50px;
}

.dict-loading {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary, #6b7280);
}

.dict-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color, #e5e7eb);
    border-top-color: #6b65ff;
    border-radius: 50%;
    animation: dict-spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes dict-spin {
    to { transform: rotate(360deg); }
}

.dict-error {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary, #6b7280);
}

.dict-word-result {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    margin-bottom: 16px;
    text-transform: capitalize;
}

.dict-pos-group {
    margin-bottom: 16px;
}

.dict-pos-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #6b65ff;
    background: rgba(107, 101, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.dict-def-list {
    margin: 0;
    padding-left: 20px;
    color: var(--text-primary, #1f2937);
}

.dict-def-list li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.dict-examples {
    background: var(--bg-primary, #f3f4f6);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
}

.dict-examples strong {
    display: block;
    font-size: 12px;
    color: var(--text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.dict-examples ul {
    margin: 0;
    padding-left: 16px;
}

.dict-examples li {
    font-size: 13px;
    color: var(--text-secondary, #6b7280);
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 4px;
}

/* Dark theme support for dictionary modal */
[data-theme="darknight"] .dict-modal {
    background: var(--bg-secondary, #1a2332);
}

[data-theme="darknight"] .dict-modal-close {
    background: var(--bg-primary, #0f1419);
}

[data-theme="darknight"] .dict-modal-input {
    background: var(--bg-primary, #0f1419);
    border-color: var(--border-color, #2d3748);
}

[data-theme="darknight"] .dict-examples {
    background: var(--bg-primary, #0f1419);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .dict-modal {
        max-height: 90vh;
        padding: 20px;
    }

    .dict-modal-form {
        flex-direction: column;
    }

    .dict-modal-btn {
        width: 100%;
    }

    .dict-word-result {
        font-size: 24px;
    }
}
