/* Custom Dropdown Styles */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: fit-content; /* Adjust width to content */
    min-width: 250px; /* Reduced min-width */
    max-width: 90%; /* Ensure it fits on mobile */
    margin: 1rem auto;
    font-family: 'Road Rage';
    display: block !important; /* Changed from inline-block to block for centering */
    visibility: visible !important;
    opacity: 1 !important;
}

.custom-select-trigger {
    position: relative;
    display: block;
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-size: 1.5rem;
    font-weight: 400;
    color: #ff00ff;
    line-height: 1.25rem;
    background: #6a0dad;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(106, 13, 173, 0.5), 0 4px 8px rgba(0, 0, 0, 0.6), 0 8px 16px rgba(0, 0, 0, 0.4);
    text-shadow: 2px 2px 4px #000, -2px -2px 4px #000, 2px -2px 4px #000, -2px 2px 4px #000;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Mobile touch improvements */
    -webkit-tap-highlight-color: rgba(106, 13, 173, 0.3);
    touch-action: manipulation;
    min-height: 44px; /* Minimum touch target size for mobile */
}

.custom-select-trigger:after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    font-size: 0.8rem;
    opacity: 0.7;
}

.custom-select-wrapper.open .custom-select-trigger:after {
    content: '▲';
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 2px solid #550a8a;
    border-top: 0;
    background: #6a0dad;
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.custom-select-wrapper.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.custom-option {
    position: relative;
    display: block;
    padding: 12px 15px;
    font-size: 1.25rem;
    font-weight: 400;
    color: #ff00ff;
    line-height: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: none;
    text-align: center;
    text-shadow: 1px 1px 2px #000;
    /* Mobile touch improvements */
    -webkit-tap-highlight-color: rgba(106, 13, 173, 0.3);
    touch-action: manipulation;
    min-height: 44px; /* Minimum touch target size for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-option:last-of-type {
    border-bottom: none;
}

.custom-option:hover {
    background-color: #550a8a;
}

.custom-option.selected {
    background-color: #4a007a;
    font-weight: bold;
}

/* Hide original select */
#categories-input {
    display: none !important;
}

