.language-dropdown {
    position: relative;
    margin-left: 20px;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
    text-decoration: none;
    font-family: inherit;
    font-size: inherit;
}

.language-toggle:hover {
    background: var(--primary-color);
    border-color: var(--accent-color);
    color: var(--light-color);
}

.language-toggle .chevron {
    font-size: 0.8em;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.language-dropdown.active .language-toggle .chevron {
    transform: rotate(180deg);
    color: var(--light-color);
}

.language-dropdown.active .language-toggle {
    background: var(--primary-color);
    color: var(--light-color);
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.language-dropdown.active .language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.language-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.language-option:hover {
    background: var(--primary-color);
    color: var(--light-color);
}

.language-option.current {
    background: var(--secondary-color);
    color: var(--light-color);
    cursor: default;
}

.language-option:not(.current):hover {
    background: var(--accent-color);
}

/* Mobile styles */
@media (max-width: 992px) {
    .language-dropdown {
        margin: 10px 0;
        width: 100%;
    }

    .language-toggle {
        width: 100%;
        justify-content: space-between;
        background: transparent;
        border: 1px solid var(--text-tertiary);
        color: var(--text-color);
    }

    .language-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--card-border);
        width: 100%;
        background: transparent;
    }

    .language-option {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .language-option:last-child {
        border-bottom: none;
    }
}

/* Show ad only on desktop */
.desktop-add {
    min-height: auto;
    width: 100%;
    display: block;
}

.desktop-ad {
    min-height: auto;
    width: 100%;
    display: block;
}

.browse-btn,
.tool-card a {
    background-color: var(--primary-color);
}

/* === ADVANCED ANTI-ADBLOCK MODAL STYLES (Simplified & Responsive) === */
#adBlockModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    /* Controlled by JS */
    justify-content: center;
    align-items: center;
    z-index: 999999;
    /* Max Z-Index to cover everything */
    overflow-y: auto;
    /* Allow scrolling if content overflows on small screens */
    backdrop-filter: blur(10px);
    padding: 20px;
    /* Added padding for better mobile spacing */
}

#adBlockModalContent {
    background: #fff;
    color: #333;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 550px;
    /* Desktop max width */
    width: 100%;
    /* Fill available width */
    text-align: center;
    font-family: 'Inter', sans-serif;
    animation: fadeIn 0.5s;
    /* Ensure content doesn't get squeezed too tight */
    min-height: 250px;
}

.ad-gif-container {
    margin: 20px auto;
    max-width: 400px;
    /* desktop max width */
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-gif-container img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    /* keeps the image fully visible */
}

#adBlockModalContent h2 {
    color: #e74c3c;
    margin-top: 0;
    font-size: 1.8rem;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#adBlockModalContent p {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.ad-modal-actions a,
.ad-modal-actions button {
    display: block;
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 15px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    font-weight: 600;
    text-align: center;
}

.ad-modal-actions .upgrade-btn {
    background-color: #3498db;
    color: white;
}

.ad-modal-actions .upgrade-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.ad-modal-actions .action-btn {
    background-color: #2ecc71;
    /* Green for "I fixed it" */
    color: white;
}

.ad-modal-actions .action-btn:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
}

/* Mobile specific adjustments */
@media (max-width: 600px) {
    #adBlockModalContent {
        padding: 20px;
        /* Allow modal content to take more space on small screens */
        max-width: 95%;
    }

    #adBlockModalContent h2 {
        font-size: 1.5rem;
    }

    #adBlockModalContent p {
        font-size: 1rem;
    }

    .ad-gif-container {
        /* Use full available width on mobile for the image */
        max-width: 100%;
    }

    .ad-modal-actions a,
    .ad-modal-actions button {
        padding: 12px 15px;
        font-size: 1rem;
    }
}

/* Hide the entire page content underneath the modal */
body.adblock-active>#main-content,
body.adblock-active>.main-header,
body.adblock-active>.footer {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}

/* Small animation for visual appeal */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* === END ADVANCED ANTI-ADBLOCK MODAL STYLES === */

#fcf-upgrade-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

#fcf-upgrade-box {
    background: #fff;
    max-width: 420px;
    width: 90%;
    padding: 28px;
    border-radius: 10px;
    text-align: center;
}

#fcf-upgrade-box h2 {
    margin: 0 0 10px;
    font-size: 22px;
    color: #000;
    ;
}

#fcf-upgrade-box p {
    font-size: 15px;
    color: #555;
}

#fcf-upgrade-btn {
    display: inline-block;
    margin-top: 18px;
    padding: 12px 22px;
    background: #000;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
}