/* Tile Select Overlay */
.tile-category-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tile-category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-width: 80px;
}

.tile-category-btn:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateY(-3px);
}

.tile-category-btn.active {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.cat-emoji {
    font-size: 1.5rem;
}

.cat-name {
    font-size: 0.8rem;
    font-weight: bold;
    color: #ffd700;
}

.tile-theme-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.theme-option:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateY(-3px);
}

.theme-option.selected {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.theme-preview {
    font-size: 2rem;
    margin-bottom: 8px;
    letter-spacing: 4px;
}

.theme-name {
    font-size: 1.1rem;
    font-weight: bold;
    font-family: 'Pacifico', cursive;
    color: #ffd700;
}

/* Scrollbar styling */
.tile-theme-list::-webkit-scrollbar {
    width: 8px;
}

.tile-theme-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.tile-theme-list::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.4);
    border-radius: 4px;
}

.tile-theme-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.6);
}

/* Mobile: horizontal scroll for categories, smaller buttons, larger theme options */
@media (max-width: 600px) {
    #tile-select-overlay .overlay-content {
        max-height: 100vh;
        display: flex;
        flex-direction: column;
        padding: 20px 16px;
    }
    
    #tile-select-overlay .overlay-content h2 {
        font-size: 1.6rem;
        margin-bottom: 6px;
    }
    
    #tile-select-overlay .overlay-content p {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
    
    .tile-category-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        gap: 8px;
        padding-bottom: 8px;
        margin-bottom: 12px;
    }
    
    .tile-category-buttons::-webkit-scrollbar {
        height: 6px;
    }
    
    .tile-category-buttons::-webkit-scrollbar-thumb {
        background: rgba(255, 215, 0, 0.4);
        border-radius: 3px;
    }
    
    .tile-category-btn {
        padding: 8px 12px;
        min-width: 60px;
        gap: 4px;
    }
    
    .cat-emoji {
        font-size: 1.1rem;
    }
    
    .cat-name {
        font-size: 0.65rem;
    }
    
    .tile-theme-list {
        max-height: 48vh;
        gap: 10px;
        margin: 10px 0;
        flex: 1;
    }
    
    .theme-option {
        padding: 12px 10px;
    }
    
    .theme-preview {
        font-size: 1.4rem;
        letter-spacing: 2px;
        margin-bottom: 4px;
    }
    
    .theme-name {
        font-size: 0.9rem;
    }
}
