/* WORDLE THEME V1 */
:root {
    --bg-color: #ffffff;
    --text-color: #121213;
    --correct-color: #6aaa64;
    --present-color: #d1b036;
    --absent-color: #787c7e;
    --border-color: #d3d6da;
    --header-border: #d3d6da;
    --hover-bg: #f3f3f3;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Clear Sans', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    color: var(--text-color);
    text-decoration: none;
}

/* GLOBAL HEADER UPGRADE */
.global-header {
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-color);
}
.logo .logo-accent {
    color: var(--correct-color);
}

/* Integrated Header Search */
.header-search {
    flex: 1;
    max-width: 500px;
    position: relative;
}
.search-box {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    padding: 8px 15px;
    border-radius: 50px;
    border: 1.5px solid transparent;
    transition: all 0.2s;
}
.search-box:focus-within {
    background: white;
    border-color: var(--correct-color);
    box-shadow: 0 0 0 4px rgba(106, 170, 100, 0.1);
}
.search-icon {
    width: 20px;
    height: 20px;
    color: var(--absent-color);
    margin-right: 12px;
}
.search-box input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.header-search .search-results {
    top: calc(100% + 10px);
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Nav links */
.global-nav .nav-links {
    list-style: none;
    display: flex;
    gap: 15px;
    align-items: center;
}
.nav-btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: background 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-btn:hover {
    background: var(--hover-bg);
}
.has-dropdown:hover .dropdown-menu {
    display: block;
}
.dropdown-menu {
    position: absolute;
    top: 70px;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    min-width: 400px;
    padding: 15px;
    display: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 101;
}
/* Bridge to keep dropdown open when moving mouse from trigger to menu */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
}
.dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.drop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: background 0.2s;
}
.drop-item:hover { background: var(--hover-bg); }
.drop-icon { font-size: 1.2rem; }

/* Mobile logic */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
    justify-content: center;
}
.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #1e293b;
    border-radius: 2px;
    transition: 0.3s;
}

/* FAVORITES SIDEBAR */
.favorites-sidebar {
    position: fixed;
    top: 0;
    right: -350px;
    width: 300px;
    height: 100vh;
    background: var(--bg-color);
    border-left: 1px solid var(--border-color);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}
.favorites-sidebar.open { right: 0; }
.fav-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fav-header h3 { font-size: 1.2rem; text-transform: uppercase; }
#close-favorites-btn {
    background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-color);
}
.fav-content {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}
.fav-item {
    display: flex;
    justify-content: space-between;
    border: 1px solid var(--border-color);
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}
.fav-item-remove { cursor: pointer; color: var(--absent-color); margin-left:10px; font-weight:bold; }
.fav-item-remove:hover { color: red; }
.empty-fav { color: var(--absent-color); font-style: italic; }

.sidebar-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5); z-index: 1999;
    display: none;
}
.sidebar-overlay.open { display: block; }

.heart-btn {
    background: none; border: none; font-size: 1.5rem; cursor: pointer;
    color: var(--border-color); transition: color 0.2s;
    float: right; margin-top: -5px; outline: none;
}
.heart-btn.is-favorite { color: #e11d48; }

/* GLOBAL FOOTER */
.global-footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 20px;
    margin-top: 40px;
    text-align: center;
    color: var(--absent-color);
}
.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}
.footer-links a { color: var(--text-color); text-decoration: underline; }


/* SEARCH BAR */
.search-container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    border-radius: 4px;
    outline: none;
    font-weight: bold;
    text-transform: uppercase;
}

.search-input:focus {
    border-color: var(--present-color);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-results.active {
    display: block;
}

.search-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-color);
    transition: background 0.2s;
}
.search-item:hover {
    background: var(--hover-bg);
    cursor: pointer;
}
.search-item-logo {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}
.search-item-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.search-item-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.search-item-name {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--text-color);
}
.search-item-cat {
    font-size: 0.75rem;
    color: var(--absent-color);
    text-transform: uppercase;
}
.search-item strong {
    color: var(--correct-color);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* MAIN LAYOUT */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* GLOBE SECTION */
#globe-container {
    width: 100%;
    height: 400px;
    margin: 20px 0;
    background: radial-gradient(circle, #2a2a2c 0%, #121213 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* GRID / CARDS (Wordle Style) */
.section-title {
    font-size: 1.5rem;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.game-card {
    border: 2px solid var(--border-color);
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    background-color: var(--bg-color);
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--correct-color);
}

.game-card h3 {
    font-size: 1.4rem;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.game-card .cat-tag {
    background: var(--absent-color);
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: inline-block;
}

.game-card p {
    font-size: 0.9rem;
    color: #a1a1aa;
    margin-bottom: 15px;
}

.btn-play {
    background-color: var(--correct-color);
    color: white;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 4px;
    text-transform: uppercase;
    display: inline-block;
    transition: opacity 0.2s;
}
.btn-play:hover {
    opacity: 0.8;
}

/* REFINED GAME CARD STYLES */
.game-card-img-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--border-color);
}
.game-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.cat-tag-wrap {
    margin-bottom: 10px;
}
.btn-play-mini {
    margin-top: auto;
    background: var(--correct-color);
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-play-mini:hover { background: #538d4e; }

.mobile-list-img-container {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}
.mobile-list-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* SINGLE GAME PAGES & ANSWERS */
.single-page {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.single-page h1 {
    font-size: 3rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: var(--present-color);
}

.breadcrumb {
    color: var(--absent-color);
    margin-bottom: 20px;
    font-weight: bold;
}
.breadcrumb a {
    color: var(--text-color);
    text-decoration: underline;
}

/* MOBILE BLOCKS - HIDDEN ON DESKTOP */
.mobile-list-item { display: none; }
.ad-slot-mobile-eng { display: none; }

.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
}

@media (max-width: 768px) {
    .mobile-search-toggle { display: block !important; }
    .header-inner { 
        gap: 0; 
        height: 60px; 
        padding: 0 15px; 
        justify-content: space-between;
    }
    .logo-text { font-size: 1.1rem; }
    .header-search { 
        display: none !important; 
        position: absolute; 
        top: 60px; 
        left: 0; 
        right: 0; 
        background: white; 
        padding: 10px; 
        border-bottom: 2px solid var(--border-color); 
        z-index: 1002; 
    }
    .header-search.active { display: block !important; }
    .hide-mobile { display: none !important; }
    
    .menu-toggle { 
        display: flex !important; 
        z-index: 1003; 
        width: 40px;
        height: 40px;
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
    }
    .global-nav {
        display: none !important;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: #ffffff;
        padding: 30px 20px;
        z-index: 1001;
        overflow-y: auto;
        box-shadow: inset 0 10px 20px rgba(0,0,0,0.05);
    }
    .global-nav.active { display: block !important; }
    .global-nav .nav-links { 
        flex-direction: column; 
        gap: 0; 
        align-items: stretch; 
        width: 100%;
    }
    .nav-btn { 
        font-size: 1.1rem;
        font-weight: 800;
        width: 100%; 
        padding: 20px 0; 
        border-bottom: 2px solid #f1f5f9; 
        border-radius: 0; 
        justify-content: flex-start;
        color: #1e293b !important;
        background: transparent !important;
    }
    .nav-btn:hover { background: #f8fafc !important; }
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

    /* Mobile Dropdown Expansion */
    .has-dropdown.active-mobile-dropdown .dropdown-menu {
        display: block !important;
        position: static !important;
        min-width: 100% !important;
        box-shadow: none !important;
        background: #f8fafc !important;
        border: none !important;
        padding: 10px 0 10px 20px !important;
        margin-top: 10px;
    }
    .active-mobile-dropdown .dropdown-grid {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .active-mobile-dropdown .drop-item {
        padding: 12px 15px;
        border-bottom: 1px solid #e2e8f0;
    }

    /* Hide Home item on Desktop if needed */
    .mobile-only { display: block; }
}

@media (min-width: 769px) {
    .mobile-only { display: none; }
}

    /* Fix Discovery Card Overflow */
    .discovery-feed-container { overflow: hidden; }
    .discovery-card { padding: 12px; margin-bottom: 10px; }
    .disc-card-link { flex-direction: column; gap: 12px; }
    .disc-logo-wrap { width: 50px; height: 50px; }
    .disc-title-row h3 { font-size: 1.1rem; }
    .disc-description { font-size: 0.85rem; }
    .disc-heart { top: 15px; right: 15px; transform: none; font-size: 1.5rem; }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .global-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    .global-nav.active { display: block; }
    .global-nav .nav-links { flex-direction: column; gap: 15px; align-items: flex-start; }
    
    .games-grid { display: block; }
    .game-card { display: none; } /* Ocultar cards en fav de lista móvil */
    
    .mobile-list-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        margin-bottom: 10px;
        background: var(--bg-color);
    }
    .mobile-list-item h3 { font-size: 1.1rem; margin-bottom: 5px; color: var(--text-color); }
    .mobile-list-item p { display: none; }
    .btn-play-mobile {
        background: var(--correct-color); color: white; padding: 6px 12px; font-weight: bold; font-size: 0.8rem; border-radius: 4px;
    }
    
    .ad-slot-mobile-eng {
        width: 100%;
        min-height: 100px;
        background: #f1f5f9;
        border: 1px dashed #cbd5e1;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #64748b;
        font-size: 0.9rem;
        font-weight: bold;
        text-transform: uppercase;
        border-radius: 4px;
        text-align: center;
    }

    #globe-container {
        height: 300px;
    }
    .hero-split {
        flex-direction: column;
    }
    .lang-details:not([open]) .lang-picker-content {
        display: none;
    }
    .lang-summary::after {
        content: '▼ TAP TO SHOW LANGUAGES ▼';
        display: block;
        text-align: center;
        font-size: 0.8rem;
        margin-top: 10px;
        color: #888;
        font-weight: bold;
    }
    .lang-details[open] .lang-summary::after {
        content: '▲ HIDE LANGUAGES ▲';
    }
}

/* HERO MAP SECTION */
.hero-map-section {
    position: relative;
    width: 100%;
}
#globe-container {
    border-radius: 12px;
    overflow: hidden;
    cursor: grab;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.05);
}
#globe-container:active { cursor: grabbing; }

/* MODAL */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.close-modal {
    position: absolute; top: 10px; right: 15px;
    font-size: 1.5rem; cursor: pointer; color: var(--absent-color);
}
.close-modal:hover { color: red; }
#modal-country-name {
    font-size: 1.5rem; margin-bottom: 20px; color: var(--text-color);
}

/* MODERN LANG GRID */
.lang-finder-large {
    width: 100%; padding: 18px; font-size: 1.2rem;
    border: 2px solid var(--border-color); border-radius: 30px;
    outline: none; background: transparent; color: var(--text-color);
    transition: border-color 0.2s; margin-bottom: 30px; 
}
.lang-finder-large:focus { border-color: var(--correct-color); }

.lang-grid-modern {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px;
}
.lang-item-modern {
    display: flex; align-items: center; padding: 15px;
    border: 1px solid var(--border-color); border-radius: 12px;
    background: var(--bg-color); transition: all 0.2s; text-decoration: none;
}
.lang-item-modern:hover {
    border-color: var(--correct-color); transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.05);
}

/* Flag Bubble */
.lang-flag-bubble {
    font-size: 2.2rem;
    margin-right: 14px;
    line-height: 1;
    min-width: 40px;
    width: 40px;
    height: 40px;
    text-align: center;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: #f8fafc;
}
.lang-flag-svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.lang-item-modern .lang-native {
    font-weight: 700; color: var(--text-color); display: block; font-size: 0.95rem;
}
.lang-item-modern .lang-en {
    color: var(--absent-color); font-size: 0.82rem;
}

/* LANGUAGE TOGGLE HEADER */
.lang-toggle-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 25px; border: 2px solid var(--border-color);
    border-radius: 14px; cursor: pointer;
    background: var(--bg-color); transition: all 0.25s;
    user-select: none;
}
.lang-toggle-header:hover {
    border-color: var(--correct-color);
    box-shadow: 0 4px 12px rgba(106,170,100,0.12);
}
.lang-toggle-header.active {
    border-color: var(--correct-color);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}
.lang-toggle-left {
    display: flex; align-items: center; gap: 15px;
}
.lang-toggle-icon { font-size: 2rem; line-height: 1; }
.lang-toggle-title {
    font-size: 1.1rem; font-weight: 700; color: var(--text-color);
    text-transform: uppercase; letter-spacing: 1px; display: block;
}
.lang-toggle-subtitle {
    font-size: 0.85rem; color: var(--absent-color); display: block; margin-top: 2px;
}
.lang-toggle-arrow {
    font-size: 1.2rem; color: var(--correct-color);
    transition: transform 0.3s;
}
.lang-toggle-arrow.rotated { transform: rotate(180deg); }

/* Collapsible container */
.lang-collapsible {
    border: 2px solid var(--correct-color);
    border-top: none;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    padding: 5px 20px 20px 20px;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lang-summary {
    cursor: pointer;
    list-style: none; /* remove default arrow */
    margin-bottom: 15px;
}
.lang-summary::-webkit-details-marker {
    display: none;
}
.lang-finder {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
    outline: none;
}
.lang-finder:focus {
    border-color: #999;
}
.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0;
    max-height: 400px;
    overflow-y: auto;
    border-top: 1px solid #eee;
}
.lang-grid::-webkit-scrollbar {
    width: 8px;
}
.lang-grid::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
.lang-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    color: #333;
    text-decoration: none;
    transition: background 0.1s;
}
.lang-item:hover {
    background: #f5f5f5;
}
.lang-flag {
    font-size: 1.5rem;
    margin-right: 15px;
    line-height: 1;
}
.lang-texts {
    display: flex;
    flex-direction: column;
}
.lang-native {
    font-weight: bold;
    font-size: 0.95rem;
    color: #222;
}
.lang-en {
    font-size: 0.8rem;
    color: #888;
}

@media (min-width: 769px) {
    /* Always open on desktop */
    .lang-details { pointer-events: none; }
    .lang-picker-content { pointer-events: auto; }
}

/* DISCOVERY FEED STYLES */
.discovery-header {
    margin-bottom: 25px;
}
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Custom Select Dropdowns */
.custom-select {
    position: relative;
    min-width: 140px;
}
.select-trigger {
    width: 100%;
    padding: 10px 15px;
    background: white;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    transition: border-color 0.2s;
}
.select-trigger:hover { border-color: var(--correct-color); }
.select-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}
.custom-select.active .select-options { display: block; }
.option {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.1s;
}
.option:hover { background: var(--hover-bg); }
.option.active { color: var(--correct-color); background: #f0fdf4; }

.filter-btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1.5px solid var(--border-color);
    background: white;
    transition: all 0.2s;
}
.btn-surprise:hover { background: #fee2e2; border-color: #f87171; }
.btn-favs-toggle { display: flex; align-items: center; gap: 8px; }
.btn-favs-toggle.active { background: #fff1f2; border-color: #fb7185; color: #e11d48; }

/* Discovery Cards */
.discovery-feed {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.discovery-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    position: relative;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.discovery-card:hover {
    transform: translateY(-2px);
    border-color: var(--correct-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}
.disc-card-link {
    display: flex;
    gap: 20px;
    text-decoration: none;
    color: inherit;
}
.disc-logo-wrap {
    width: 65px;
    height: 65px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
}
.disc-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }

.disc-content { flex-grow: 1; }
.disc-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.disc-title-row h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-color);
    text-transform: none;
}
.disc-tags { display: flex; gap: 8px; align-items: center; }
.tag-link {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    text-decoration: none;
    transition: opacity 0.2s;
}
.tag-cat { background: #fecaca; color: #dc2626; }
.tag-cat:hover { opacity: 0.8; }
.tag-new {
    background: #e9d5ff; color: #9333ea;
    font-size: 0.7rem; font-weight: 800; padding: 4px 10px; border-radius: 20px;
}

.disc-description {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 12px;
    line-height: 1.4;
}
.disc-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
}
.disc-stars { color: #fbbf24; font-size: 1rem; }
.disc-ratings { color: #94a3b8; }

.disc-heart {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    z-index: 5;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--border-color);
    outline: none;
}
.disc-heart.is-favorite { color: #e11d48; }

.load-more-container {
    text-align: center;
    margin: 40px 0;
}
.btn-load-more {
    background: white;
    border: 2px solid var(--correct-color);
    color: var(--correct-color);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}
.btn-load-more:hover {
    background: var(--correct-color);
    color: white;
}
.btn-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--border-color);
    color: var(--absent-color);
}

@media (max-width: 640px) {
    .disc-card-link { flex-direction: column; gap: 12px; }
    .disc-logo-wrap { width: 50px; height: 50px; }
    .disc-heart { top: 20px; transform: none; }
    .filter-bar { justify-content: center; }
}
