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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.genre-filter-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(10, 18, 32, 0.75);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 0;
}

.genre-filter {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    outline: none;
    min-width: 140px;
    cursor: pointer;
}

.genre-filter option {
    background: #1a1a2e;
    color: #fff;
}

/* Hide the old about button */
.about-button {
    display: none !important;
}

.map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(10, 18, 32, 0.9);
    padding: 20px 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

.loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(10, 18, 32, 0.75);
    backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.player.active {
    transform: translateY(0);
}

.player-content {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.player-cover {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #1a1a2e;
    overflow: hidden;
    margin-right: 16px;
    flex-shrink: 0;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-info {
    flex: 1;
    min-width: 0;
    margin-right: 16px;
}

.player-title {
    font-weight: 600;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.player-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.play-btn:active {
    transform: scale(0.95);
}

.play-btn.playing {
    animation: pulse-play 2s ease-in-out infinite;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.volume-slider {
    width: 100px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.website-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.website-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.maplibregl-popup-content {
    background: rgba(10, 18, 32, 0.75) !important;
    backdrop-filter: blur(25px) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 20px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
    min-width: 320px;
    color: white;
}

.maplibregl-popup-tip {
    border-top-color: rgba(10, 18, 32, 0.75) !important;
}

.station-popup {
    display: flex;
    gap: 16px;
    align-items: center;
}

.station-popup-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: #1a1a2e;
    overflow: hidden;
    flex-shrink: 0;
}

.station-popup-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.station-popup-info {
    flex: 1;
    min-width: 0;
}

.station-popup-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-popup-location {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-popup-genre {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

@keyframes pulse-play {
    0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile version */
@media (max-width: 768px) {
    /* Top menu - compressed to leave space for hamburger */
    .genre-filter-overlay {
        top: 10px;
        left: 10px;
        right: 70px; /* Leave space for hamburger menu */
        padding: 6px 8px;
        max-width: calc(100vw - 80px); /* Ensure it doesn't overflow */
    }
    
    .genre-filter {
        min-width: 120px;
        font-size: 13px;
    }
    
    .clear-favorites-btn {
        font-size: 11px;
        padding: 4px 8px;
        margin-left: 8px;
    }
    
    /* Player stays as is, just a bit smaller */
    .player {
        height: 70px;
    }
    
    .player-cover {
        width: 50px;
        height: 50px;
    }
    
    .play-btn {
        width: 44px;
        height: 44px;
    }
    
    /* Station popups */
    .station-popup {
        flex-direction: column;
        text-align: center;
    }
    
    .station-popup-logo {
        width: 60px;
        height: 60px;
    }
    
    /* Hide volume on mobile */
    .volume-container {
        display: none;
    }
}

/* Fix for mobile browsers */
@media (max-width: 768px) {
    .player {
        bottom: env(safe-area-inset-bottom, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    
    /* Alternative approach - add margin */
    body {
        padding-bottom: 20px;
    }
    
    #app {
        padding-bottom: 90px;
    }
}

/* Player text optimization for mobile */
@media (max-width: 768px) {
    .player-content {
        padding: 0 12px;
        display: flex;
        align-items: center;
        height: 100%;
    }
    
    .player-info {
        flex: 1;
        min-width: 0;
        margin-right: 8px;
        overflow: hidden;
    }
    
    .player-title {
        font-size: 13px;
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
    }
    
    .player-subtitle {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
        opacity: 0.8;
    }
    
    .player-controls {
        gap: 8px;
        flex-shrink: 0;
    }
    
    .player-cover {
        margin-right: 10px;
        flex-shrink: 0;
    }
}

/* Minimalist mobile player */
@media (max-width: 768px) {
    /* Hide text in player */
    .player-info {
        display: none;
    }
    
    /* Compact player with only buttons */
    .player {
        height: 60px;
    }
    
    .player-content {
        justify-content: center;
        gap: 16px;
    }
    
    .player-cover {
        width: 44px;
        height: 44px;
    }
    
    /* Compact station popups */
    .maplibregl-popup-content {
        padding: 12px !important;
        min-width: 240px !important;
    }
    
    .station-popup {
        gap: 10px;
    }
    
    .station-popup-logo {
        width: 50px;
        height: 50px;
    }
    
    .station-popup-name {
        font-size: 15px;
        margin-bottom: 3px;
    }
    
    .station-popup-location {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .station-popup-genre {
        font-size: 11px;
        padding: 3px 8px;
        margin-bottom: 8px;
    }
    
    .station-favorite-btn {
        font-size: 18px;
        padding: 6px;
    }
}

/* Forced mobile styles */
@media (max-width: 768px) {
    .player-info {
        display: none !important;
    }
    
    .player {
        height: 60px !important;
    }
    
    .player-content {
        justify-content: center !important;
        gap: 16px !important;
        align-items: center !important;
    }
    
    .player-cover {
        width: 44px !important;
        height: 44px !important;
        margin-right: 0 !important;
    }
    
    .play-btn {
        width: 40px !important;
        height: 40px !important;
    }
    
    .player-favorite-btn,
    .website-btn {
        width: 36px !important;
        height: 36px !important;
    }
}

/* Mobile player design fixes */
@media (max-width: 768px) {
    /* All buttons same size and round */
    .play-btn,
    .player-favorite-btn,
    .website-btn {
        width: 42px !important;
        height: 42px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Fix favorite heart */
    .player-favorite-btn {
        font-size: 16px !important;
    }
    
    /* Even spacing between elements */
    .player-content {
        gap: 14px !important;
    }
    
    /* Logo also sized to match */
    .player-cover {
        width: 42px !important;
        height: 42px !important;
        border-radius: 8px !important;
    }
}

/* Restore desktop styles for favorites */
@media (min-width: 769px) {
    .player-favorite-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
        border-radius: 50% !important;
    }
    
    .station-favorite-btn {
        background: transparent !important;
        border: none !important;
        font-size: 20px !important;
        padding: 4px !important;
        border-radius: 50% !important;
    }
}

/* Additionally fix mobile styles */
@media (max-width: 768px) {
    .station-favorite-btn {
        font-size: 20px !important;
        padding: 6px !important;
        background: transparent !important;
        border: none !important;
        border-radius: 50% !important;
    }
}

/* FIX: Even more compact mobile popups */
@media (max-width: 768px) {
    /* Reduce popup size */
    .maplibregl-popup-content {
        min-width: 160px !important;
        max-width: 200px !important;
        padding: 6px !important;
        border-radius: 12px !important;
    }
    
    /* More compact layout */
    .station-popup {
        flex-direction: row !important;
        text-align: left !important;
        align-items: center !important;
        gap: 6px !important;
        position: relative !important;
    }
    
    .station-popup-logo {
        width: 36px !important;
        height: 36px !important;
        flex-shrink: 0 !important;
    }
    
    .station-popup-info {
        flex: 1 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    
    .station-popup-name {
        font-size: 12px !important;
        margin-bottom: 1px !important;
        padding-right: 25px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        word-wrap: break-word !important;
    }
    
    .station-popup-location {
        font-size: 10px !important;
        margin-bottom: 0 !important;
        padding-right: 25px !important;
        opacity: 0.8 !important;
        line-height: 1.2 !important;
        word-wrap: break-word !important;
    }
    
    /* Hide genre on mobile */
    .station-popup-genre {
        display: none !important;
    }
    
    /* Beautiful heart on top right */
    .station-favorite-btn {
        position: absolute !important;
        top: -4px !important;
        right: -4px !important;
        font-size: 14px !important;
        padding: 8px !important;
        width: 32px !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Less margin on popup arrow */
    .maplibregl-popup-tip {
        border-top-width: 6px !important;
        border-left-width: 6px !important;
        border-right-width: 6px !important;
    }
}

/* For very narrow screens (less than 400px) - even more compact */
@media (max-width: 400px) {
    .maplibregl-popup-content {
        min-width: 140px !important;
        max-width: 180px !important;
        padding: 5px !important;
    }
    
    .station-popup {
        gap: 5px !important;
    }
    
    .station-popup-logo {
        width: 32px !important;
        height: 32px !important;
    }
    
    .station-popup-name {
        font-size: 11px !important;
        padding-right: 22px !important;
    }
    
    .station-popup-location {
        font-size: 9px !important;
        padding-right: 22px !important;
    }
    
    .station-favorite-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
        padding: 6px !important;
    }
}

/* Stylish Clear favorites button */
.clear-favorites-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border-radius: 8px !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    transition: all 0.2s ease !important;
    backdrop-filter: blur(10px) !important;
}

.clear-favorites-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-1px) !important;
}

.clear-favorites-btn:active {
    transform: translateY(0) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Mobile version of button */
@media (max-width: 768px) {
    .clear-favorites-btn {
        font-size: 10px !important;
        padding: 4px 8px !important;
        margin-left: 6px !important;
    }
}

/* Button with icon only */
.clear-favorites-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    border-radius: 6px !important;
    padding: 6px 8px !important;
    font-size: 14px !important;
    line-height: 1 !important;
    min-width: auto !important;
    margin-left: 8px !important;
    transition: all 0.2s ease !important;
}

.clear-favorites-btn:hover {
    background: rgba(255, 107, 107, 0.2) !important;
    border-color: rgba(255, 107, 107, 0.3) !important;
    color: #ff6b6b !important;
}

@media (max-width: 768px) {
    .clear-favorites-btn {
        padding: 4px 6px !important;
        font-size: 12px !important;
        margin-left: 6px !important;
    }
}

/* Compact top bar for mobile */
@media (max-width: 768px) {
    .genre-filter-overlay {
        padding: 6px 10px !important;
        top: 8px !important;
        left: 8px !important;
        right: 8px !important;
    }
    
    .genre-filter {
        min-width: 100px !important;
        max-width: 150px !important;
        font-size: 12px !important;
        margin-right: 8px !important;
    }
    
    .clear-favorites-btn {
        font-size: 11px !important;
        padding: 5px 8px !important;
        margin-left: 0 !important;
    }
}

/* Remove popup close button everywhere */
.maplibregl-popup-close-button {
    display: none !important;
}

/* Compact Clear all button for mobile */
@media (max-width: 768px) {
    .clear-favorites-btn {
        font-size: 10px !important;
        padding: 4px 6px !important;
        margin-left: 6px !important;
        white-space: nowrap !important;
        max-width: 80px !important;
        overflow: hidden !important;
    }
    
    .genre-filter-overlay {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 6px 10px !important;
    }
    
    .genre-filter {
        flex: 1 !important;
        max-width: 60% !important;
        margin-right: 8px !important;
    }
}

/* Improved mobile version alignment */
@media (max-width: 768px) {
    .genre-filter-overlay {
        top: 8px !important;
        left: 8px !important;
        right: auto !important;
        width: auto !important;
        max-width: calc(100vw - 16px) !important;
        padding: 6px 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }
    
    .genre-filter {
        flex: 0 0 auto !important;
        min-width: 140px !important;
        font-size: 12px !important;
        margin: 0 !important;
    }
    
    .clear-favorites-btn {
        flex: 0 0 auto !important;
        font-size: 11px !important;
        padding: 6px 8px !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }
}

/* ============ FAVORITES DROPDOWN STYLES ============ */

.favorites-dropdown {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 12px;
    min-width: 160px;
    margin-left: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.favorites-dropdown:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.favorites-dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.favorites-dropdown option {
    background: #1a1a2e;
    color: #fff;
    padding: 8px 12px;
}

.favorites-dropdown option:disabled {
    color: rgba(255, 255, 255, 0.5);
}

.favorites-dropdown option[value="clear_all"] {
    color: #ff6b6b;
    font-weight: 500;
}

/* Mobile version */
@media (max-width: 768px) {
    .favorites-dropdown {
        min-width: 120px;
        font-size: 11px;
        padding: 5px 6px;
    }
    
    .genre-filter-overlay {
        flex-wrap: wrap;
        gap: 6px;
    }
}

/* ============ END OF FAVORITES DROPDOWN STYLES ============ */

/* ============ COMPACT MOBILE TOP BAR ============ */

@media (max-width: 768px) {
    /* More compact top bar - leave space for smaller hamburger */
    .genre-filter-overlay {
        top: 6px !important;
        left: 6px !important;
        right: 42px !important; /* Space for compact hamburger (30px + 12px margin) */
        padding: 4px 8px !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important; /* Prevent wrapping */
        gap: 6px !important;
        max-width: calc(100vw - 52px) !important; /* Account for hamburger space */
        overflow: hidden !important;
    }
    
    /* Compact genre filter */
    .genre-filter {
        flex: 1 !important;
        min-width: 60px !important; /* Reduced minimum width */
        max-width: 55% !important; /* Reduced maximum to fit better */
        font-size: 11px !important;
        padding: 4px 6px !important;
        margin: 0 !important;
        border-radius: 4px !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
    }
    
    /* Compact favorites dropdown */
    .favorites-dropdown {
        flex: 0 0 auto !important;
        min-width: 70px !important; /* Reduced minimum width */
        max-width: 40% !important; /* Increased maximum to balance */
        font-size: 10px !important;
        padding: 4px 6px !important;
        margin: 0 !important;
        border-radius: 4px !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
    }
    
    /* Shortened text for very narrow screens */
    .favorites-dropdown option:first-child {
        /* JavaScript will update text */
    }
}

/* For very narrow screens (less than 350px) */
@media (max-width: 350px) {
    .genre-filter-overlay {
        padding: 3px 6px !important;
        gap: 4px !important;
        right: 36px !important; /* Space for tiny hamburger (26px + 10px margin) */
        max-width: calc(100vw - 46px) !important;
    }
    
    .genre-filter {
        font-size: 10px !important;
        padding: 3px 5px !important;
        max-width: 50% !important; /* Further reduced for narrow screens */
        min-width: 50px !important;
    }
    
    .favorites-dropdown {
        font-size: 9px !important;
        padding: 3px 5px !important;
        min-width: 60px !important; /* Further reduced */
        max-width: 45% !important;
    }
}

/* ============ END OF COMPACT MOBILE TOP BAR ============ */

/* ============ RESTORE SHARE BUTTON ============ */

/* Forced share button styles for ALL resolutions */
.player-share-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 16px !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 40px !important;
    min-height: 40px !important;
    flex-shrink: 0 !important;
}

.player-share-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.1) !important;
}

.player-share-btn:active {
    transform: scale(0.95) !important;
    transition: all 0.1s ease !important;
}

/* Special for mobile - slightly bigger */
@media (max-width: 768px) {
    .player-share-btn {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
        font-size: 14px !important;
    }
}

/* Make sure other buttons are also round */
.player-favorite-btn,
.website-btn {
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

@media (max-width: 768px) {
    .player-favorite-btn,
    .website-btn {
        width: 42px !important;
        height: 42px !important;
        border-radius: 50% !important;
    }
}

/* ============ END OF SHARE BUTTON RESTORE ============ */

/* Fix favorite buttons visibility and clickability */
.player-favorite-btn {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.player-favorite-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: scale(1.1) !important;
}

.station-favorite-btn {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.station-favorite-btn:hover {
    transform: scale(1.2) !important;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5)) !important;
}

/* Fix mobile touch for favorite buttons */
@media (max-width: 768px) {
    .station-favorite-btn {
        touch-action: manipulation !important;
        user-select: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    .station-favorite-btn:active {
        transform: scale(0.9) !important;
        transition: transform 0.1s ease !important;
    }
}

/* Fix touch events on mobile */
@media (max-width: 768px) {
    .station-favorite-btn {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        pointer-events: auto !important;
    }
    
    .station-favorite-btn:hover {
        transform: none !important;
        filter: none !important;
    }
    
    .station-favorite-btn:active {
        transform: scale(0.95) !important;
        transition: transform 0.1s ease !important;
    }
}

/* Share Modal Styles */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.share-modal {
    background: rgba(10, 18, 32, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    color: white;
}

.share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.share-header h3 {
    margin: 0;
    font-size: 18px;
}

.share-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.share-url-section {
    margin-bottom: 20px;
}

.share-url-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    opacity: 0.8;
}

.share-url-input {
    display: flex;
    gap: 8px;
}

.share-url-input input {
    flex: 1;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
}

.share-url-input button {
    padding: 8px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.share-btn {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .share-modal {
        margin: 20px;
        padding: 16px;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
    }
}

/* ============ MOBILE AD POPUP FIXES ============ */

/* Adaptive styles for mobile ad popups */
.mobile-ad-popup .maplibregl-popup-content {
    min-width: 180px !important;
    max-width: 220px !important;
    padding: 8px !important;
    box-sizing: border-box !important;
}

@media (max-width: 400px) {
    .mobile-ad-popup .maplibregl-popup-content {
        min-width: 150px !important;
        max-width: 200px !important;
        padding: 6px !important;
    }
}

@media (max-width: 350px) {
    .mobile-ad-popup .maplibregl-popup-content {
        min-width: 130px !important;
        max-width: 180px !important;
        padding: 5px !important;
    }
}

/* ============ END OF MOBILE AD POPUP FIXES ============ */

/* Hide the old about button if it exists anywhere */
.about-button {
    display: none !important;
}
