.rn-radio-player {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    min-height: 80px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background-position: top center;
    background-repeat: no-repeat;
    background-size: cover;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.rn-radio-player:hover {
    border-color: #ccc;
}

.rn-radio-player .radio-name {
    font-weight: 500;
    text-align: center;
    width: 100%;
    text-transform: uppercase;
    margin: 12px auto 0;
    font-size: 15px;
    color: #555;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.rn-radio-player .radio-freq {
    font-size: 0.9em;
    text-align: center;
    margin-bottom: 10px;
    opacity: 0.8;
}

.rn-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 15px;
    width: 100%;
    padding: 0 20px;
    border-top: 1px solid #e0e0e0;
    transition: border-color 0.3s ease;
}

.rn-radio-player audio {
    display: none;
}

.rn-radio-player button {
    background-color: transparent;
    border: none;
    outline: none;
    margin: 0;
    padding: 0;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Station Selector Styles */
.rn-radio-player .rn-station-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.rn-radio-player .rn-station-button {
    background-color: transparent;
    border: none;
    outline: none;
    margin: 0;
    padding: 2px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    position: relative;
}

.rn-radio-player .rn-station-button .station-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 2px solid #777;
    border-radius: 50%;
    background-color: transparent;
    color: #777;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.rn-radio-player .rn-station-button:hover .station-number {
    border-color: #555;
    color: #555;
    transform: scale(1.15);
    background-color: rgba(85, 85, 85, 0.05);
}

.rn-radio-player .rn-station-button.active .station-number {
    background-color: #e53e3e;
    border-color: #e53e3e;
    color: #fff;
    transform: scale(1.1);
    animation: pulse 2s infinite;
}

/* Пульсирующий эффект для активной станции */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(229, 62, 62, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(229, 62, 62, 0);
    }
}

.rn-radio-player .rn-station-button:active .station-number {
    transform: scale(0.95);
}

/* Custom Tooltip Styles */
.rn-tooltip {
    position: relative;
}

.rn-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
    pointer-events: none;
}

.rn-tooltip::after {
    content: '';
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
    pointer-events: none;
}

.rn-tooltip:hover::before,
.rn-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

.rn-radio-player #rn-controls {
    display: flex;
    align-items: center;
    width: 100%;
}

.rn-radio-player .rn-progress-bar {
    height: 6px;
    background-color: #e0e0e0;
    position: relative;
    flex-grow: 1;
    margin: 0 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rn-radio-player .rn-progress-bar:hover {
    background-color: #d0d0d0;
    transform: scaleY(1.2);
}

.rn-radio-player .rn-progress-bar-filled {
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(90deg, #777 0%, #999 100%);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.rn-radio-player #rn-time {
    font-size: 12px;
    white-space: nowrap;
    color: #777;
    font-weight: 500;
    transition: color 0.3s ease;
}

.rn-radio-player .volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #777;
    width: 100%;
    transition: all 0.3s ease;
}

.rn-radio-player .volume-control .volume-icon {
    font-size: 24px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
}

.rn-radio-player .volume-control .volume-icon:hover {
    background-color: rgba(119, 119, 119, 0.1);
}

.rn-radio-player .volume-control .volume-icon:active {
    transform: scale(0.95);
}

.rn-radio-player .volume-control .volume-icon svg {
    color: #777;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rn-radio-player .volume-control:hover .volume-icon svg {
    color: #555;
    transform: scale(1.1);
}

.rn-radio-player .volume-slider {
    margin: 10px 2.5%;
    width: 95%;
}

.rn-radio-player .volume-slider::-webkit-slider-runnable-track {
    background: #e0e0e0;
    border-radius: 4px;
}

.rn-radio-player .volume-slider::-moz-range-track {
    background: #e0e0e0;
    border-radius: 4px;
}

.rn-radio-player .volume-slider::-ms-fill-upper {
    background: #e0e0e0;
    border-radius: 4px;
}

.rn-radio-player .volume-slider::before {
    width: var(--volume-before-width);
}

.rn-radio-player #mute-icon {
    margin: 0 2.5%;
}

.rn-radio-player input[type="range"] {
    position: relative;
    -webkit-appearance: none;
    margin: 0;
    padding: 0;
    height: 20px;
    float: left;
    outline: none;
    border: 0;
    background: none;
    transition: all 0.3s ease;
}

.rn-radio-player input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.rn-radio-player input[type="range"]::before {
    position: absolute;
    content: "";
    top: 8px;
    left: 0;
    width: var(--seek-before-width);
    height: 4px;
    background: linear-gradient(90deg, #777 0%, #999 100%);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.rn-radio-player input[type="range"]::-webkit-slider-thumb {
    position: relative;
    -webkit-appearance: none;
    box-sizing: content-box;
    border: 2px solid #777;
    height: 18px;
    width: 6px;
    border-radius: 0;
    background-color: #fff;
    cursor: pointer;
    margin: -8px 0 0 0;
    transition: none;
}

.rn-radio-player input[type="range"]:hover::-webkit-slider-thumb {
    /* Убираем анимацию при наведении */
}

.rn-radio-player input[type="range"]:active::-webkit-slider-thumb {
    background: #777;
}

.rn-radio-player input[type="range"]::-moz-range-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #e0e0e0;
    border-radius: 4px;
}

.rn-radio-player input[type="range"]::-moz-range-progress {
    background: linear-gradient(90deg, #777 0%, #999 100%);
    border-radius: 4px;
}

.rn-radio-player input[type="range"]::-moz-focus-outer {
    border: 0;
}

.rn-radio-player input[type="range"]::-moz-range-thumb {
    box-sizing: content-box;
    border: 2px solid #777;
    height: 18px;
    width: 6px;
    border-radius: 0;
    background-color: #fff;
    cursor: pointer;
    transition: none;
}

.rn-radio-player input[type="range"]:hover::-moz-range-thumb {
    /* Убираем анимацию при наведении */
}

.rn-radio-player input[type="range"]:active::-moz-range-thumb {
    background: #777;
}

.rn-radio-player input[type="range"]::-ms-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: transparent;
    border: solid transparent;
    color: transparent;
}

.rn-radio-player input[type="range"]::-ms-fill-lower {
    background: linear-gradient(90deg, #777 0%, #999 100%);
    border-radius: 4px;
}

.rn-radio-player input[type="range"]::-ms-fill-upper {
    background: #e0e0e0;
    border-radius: 4px;
}

.rn-radio-player input[type="range"]::-ms-thumb {
    box-sizing: content-box;
    border: 2px solid #777;
    height: 18px;
    width: 6px;
    border-radius: 0;
    background-color: #fff;
    cursor: pointer;
    transition: none;
}

.rn-radio-player input[type="range"]:hover::-ms-thumb {
    /* Убираем анимацию при наведении */
}

.rn-radio-player input[type="range"]:active::-ms-thumb {
    background: #777;
}

.rn-radio-player .volume-down,
.rn-radio-player .volume-up {
    font-size: 24px;
}

.rn-radio-player .rn-equalizer-container {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.rn-image-container,
.rn-radio-player .pause-image {
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

#bouncing-bars {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

#bouncing-bars-paused {
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    display: none;
    transition: all 0.3s ease;
}

@-webkit-keyframes equalize {
    0% {
        height: 60px
    }

    4% {
        height: 50px
    }

    8% {
        height: 40px
    }

    12% {
        height: 30px
    }

    16% {
        height: 20px
    }

    20% {
        height: 30px
    }

    24% {
        height: 40px
    }

    28% {
        height: 10px
    }

    32% {
        height: 40px
    }

    36% {
        height: 60px
    }

    40% {
        height: 20px
    }

    44% {
        height: 40px
    }

    48% {
        height: 70px
    }

    52% {
        height: 30px
    }

    56% {
        height: 10px
    }

    60% {
        height: 30px
    }

    64% {
        height: 50px
    }

    68% {
        height: 60px
    }

    72% {
        height: 70px
    }

    76% {
        height: 80px
    }

    80% {
        height: 70px
    }

    84% {
        height: 60px
    }

    88% {
        height: 50px
    }

    92% {
        height: 60px
    }

    96% {
        height: 70px
    }

    to {
        height: 80px
    }
}

@keyframes equalize {
    0% {
        height: 60px
    }

    4% {
        height: 50px
    }

    8% {
        height: 40px
    }

    12% {
        height: 30px
    }

    16% {
        height: 20px
    }

    20% {
        height: 30px
    }

    24% {
        height: 40px
    }

    28% {
        height: 10px
    }

    32% {
        height: 40px
    }

    36% {
        height: 60px
    }

    40% {
        height: 20px
    }

    44% {
        height: 40px
    }

    48% {
        height: 70px
    }

    52% {
        height: 30px
    }

    56% {
        height: 10px
    }

    60% {
        height: 30px
    }

    64% {
        height: 50px
    }

    68% {
        height: 60px
    }

    72% {
        height: 70px
    }

    76% {
        height: 80px
    }

    80% {
        height: 70px
    }

    84% {
        height: 60px
    }

    88% {
        height: 50px
    }

    92% {
        height: 60px
    }

    96% {
        height: 70px
    }

    to {
        height: 80px
    }
}

#bouncing-bars .bar {
    fill: #e53e3e;
    width: 10px;
    -webkit-animation: equalize 2s steps(25) 0s infinite;
    animation: equalize 2s steps(25) 0s infinite;
    transition: all 0.3s ease;
}

#bouncing-bars.out .bar {
    -webkit-animation: down 1.6s ease-in-out normal forwards;
    animation: down 1.6s ease-in-out normal forwards;
}

svg {
    overflow: hidden;
    vertical-align: top;
    display: block;
}

#bouncing-bars-paused .bar-paused {
    fill: #777;
    transition: all 0.3s ease;
}

/* Dark Theme Styles */
.rn-radio-player.rn-dark-theme {
    border-color: #444;
    background-color: rgba(0, 0, 0, 0.1);
}

.rn-radio-player.rn-dark-theme:hover {
    border-color: #666;
}

.rn-radio-player.rn-dark-theme .radio-name {
    color: #f0f0f0;
}

.rn-radio-player.rn-dark-theme .rn-player-controls {
    border-top-color: #444;
}

.rn-radio-player.rn-dark-theme .rn-station-button .station-number {
    border-color: #ccc;
    color: #ccc;
}

.rn-radio-player.rn-dark-theme .rn-station-button:hover .station-number {
    border-color: #fff;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.rn-radio-player.rn-dark-theme .rn-station-button.active .station-number {
    background-color: #ff4757;
    border-color: #ff4757;
    color: #fff;
}

.rn-radio-player.rn-dark-theme .rn-progress-bar {
    background-color: #444;
}

.rn-radio-player.rn-dark-theme .rn-progress-bar:hover {
    background-color: #555;
}

.rn-radio-player.rn-dark-theme .rn-progress-bar-filled {
    background: linear-gradient(90deg, #ff4757 0%, #ff6b7a 100%);
}

.rn-radio-player.rn-dark-theme #rn-time {
    color: #ccc;
}

.rn-radio-player.rn-dark-theme .volume-control {
    color: #ccc;
}

.rn-radio-player.rn-dark-theme .volume-control .volume-icon svg {
    color: #ccc;
}

.rn-radio-player.rn-dark-theme .volume-control .volume-icon:hover {
    background-color: rgba(204, 204, 204, 0.1);
}

.rn-radio-player.rn-dark-theme .volume-control:hover .volume-icon svg {
    color: #fff;
}

.rn-radio-player.rn-dark-theme input[type="range"]::-webkit-slider-runnable-track {
    background: #444;
}

.rn-radio-player.rn-dark-theme input[type="range"]::before {
    background: linear-gradient(90deg, #ff4757 0%, #ff6b7a 100%);
}

.rn-radio-player.rn-dark-theme input[type="range"]::-webkit-slider-thumb {
    border: 2px solid #ff4757;
}

.rn-radio-player.rn-dark-theme input[type="range"]:hover::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.3);
}

.rn-radio-player.rn-dark-theme input[type="range"]:active::-webkit-slider-thumb {
    background: #ff4757;
}

.rn-radio-player.rn-dark-theme input[type="range"]::-moz-range-track {
    background: #444;
}

.rn-radio-player.rn-dark-theme input[type="range"]::-moz-range-progress {
    background: linear-gradient(90deg, #ff4757 0%, #ff6b7a 100%);
}

.rn-radio-player.rn-dark-theme input[type="range"]::-moz-range-thumb {
    border: 2px solid #ff4757;
}

.rn-radio-player.rn-dark-theme input[type="range"]:active::-moz-range-thumb {
    background: #ff4757;
}

.rn-radio-player.rn-dark-theme input[type="range"]::-ms-fill-lower {
    background: linear-gradient(90deg, #ff4757 0%, #ff6b7a 100%);
}

.rn-radio-player.rn-dark-theme input[type="range"]::-ms-fill-upper {
    background: #444;
}

.rn-radio-player.rn-dark-theme input[type="range"]::-ms-thumb {
    border: 2px solid #ff4757;
}

.rn-radio-player.rn-dark-theme input[type="range"]:active::-ms-thumb {
    background: #ff4757;
}

.rn-radio-player.rn-dark-theme #bouncing-bars .bar {
    fill: #ff4757;
}

.rn-radio-player.rn-dark-theme #bouncing-bars-paused .bar-paused {
    fill: #ccc;
}

/* System Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .rn-radio-player:not(.rn-dark-theme) {
        border-color: #444;
        background-color: rgba(0, 0, 0, 0.05);
    }

    .rn-radio-player:not(.rn-dark-theme):hover {
        border-color: #666;
    }

    .rn-radio-player:not(.rn-dark-theme) .radio-name {
        color: #e0e0e0;
    }

    .rn-radio-player:not(.rn-dark-theme) .rn-player-controls {
        border-top-color: #444;
    }

    .rn-radio-player:not(.rn-dark-theme) .rn-station-button .station-number {
        border-color: #aaa;
        color: #aaa;
    }

    .rn-radio-player:not(.rn-dark-theme) .rn-station-button:hover .station-number {
        border-color: #ddd;
        color: #ddd;
        background-color: rgba(221, 221, 221, 0.1);
    }

    .rn-radio-player:not(.rn-dark-theme) .rn-progress-bar {
        background-color: #444;
    }

    .rn-radio-player:not(.rn-dark-theme) .rn-progress-bar:hover {
        background-color: #555;
    }

    .rn-radio-player:not(.rn-dark-theme) #rn-time {
        color: #aaa;
    }

    .rn-radio-player:not(.rn-dark-theme) .volume-control {
        color: #aaa;
    }

    .rn-radio-player:not(.rn-dark-theme) .volume-control .volume-icon svg {
        color: #aaa;
    }

    .rn-radio-player:not(.rn-dark-theme) .volume-control:hover .volume-icon svg {
        color: #ddd;
    }

    .rn-radio-player:not(.rn-dark-theme) input[type="range"]::-webkit-slider-runnable-track {
        background: #444;
    }

    .rn-radio-player:not(.rn-dark-theme) input[type="range"]::-webkit-slider-thumb {
        border: 2px solid #e53e3e;
    }

    .rn-radio-player:not(.rn-dark-theme) input[type="range"]::-moz-range-track {
        background: #444;
    }

    .rn-radio-player:not(.rn-dark-theme) input[type="range"]::-moz-range-thumb {
        border: 2px solid #e53e3e;
    }

    .rn-radio-player:not(.rn-dark-theme) input[type="range"]::-ms-fill-upper {
        background: #444;
    }

    .rn-radio-player:not(.rn-dark-theme) input[type="range"]::-ms-thumb {
        border: 2px solid #e53e3e;
    }

    .rn-radio-player:not(.rn-dark-theme) #bouncing-bars-paused .bar-paused {
        fill: #aaa;
    }
}

@media screen and (max-width: 768px) {
    .rn-radio-player {
        width: 100% !important;
        max-width: calc(100vw - 20px);
        margin: 0 10px;
        min-width: 300px;
        gap: 10px;
    }

    .rn-radio-player .radio-name {
        font-size: 14px;
        margin: 10px auto 0;
    }

    .rn-player-controls {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .rn-radio-player .rn-station-selector {
        order: -1;
        margin-bottom: 8px;
        gap: 8px;
    }

    .rn-radio-player .rn-station-button .station-number {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .rn-radio-player .volume-control {
        width: 100%;
        justify-content: center;
        gap: 10px;
    }

    .rn-radio-player .volume-control .volume-icon {
        font-size: 22px;
    }

    .rn-radio-player .volume-slider {
        width: 75%;
        margin: 0 10px;
    }

    .rn-radio-player #rn-controls {
        flex-direction: column;
        gap: 12px;
        padding: 0 12px;
    }

    .rn-radio-player .rn-progress-bar {
        margin: 0;
        width: 100%;
        height: 8px;
    }

    .rn-radio-player #rn-time {
        font-size: 13px;
        font-weight: 600;
    }

    .rn-radio-player .rn-equalizer-container {
        width: 56px;
        height: 56px;
    }

    #bouncing-bars,
    #bouncing-bars-paused {
        width: 40px;
        height: 40px;
    }
}

@media screen and (max-width: 480px) {
    .rn-radio-player {
        width: 100% !important;
        max-width: calc(100vw - 10px);
        margin: 0 5px;
        min-width: 280px;
        gap: 8px;
        border-radius: 16px;
    }

    .rn-player-controls {
        gap: 10px;
        padding: 10px;
    }

    .rn-radio-player .radio-name {
        font-size: 13px;
        margin: 8px auto 0;
        letter-spacing: 0.3px;
    }

    .rn-radio-player .rn-station-selector {
        gap: 6px;
    }

    .rn-radio-player .rn-station-button .station-number {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .rn-radio-player .volume-control .volume-icon {
        font-size: 20px;
    }

    .rn-radio-player .volume-slider {
        width: 70%;
        margin: 0 8px;
    }

    .rn-radio-player .rn-progress-bar {
        height: 6px;
        border-radius: 4px;
    }

    .rn-radio-player #rn-time {
        font-size: 12px;
        font-weight: 500;
    }

    .rn-radio-player .rn-equalizer-container {
        width: 50px;
        height: 50px;
    }

    .rn-image-container,
    .rn-radio-player .pause-image {
        width: 50px;
        height: 50px;
    }

    #bouncing-bars,
    #bouncing-bars-paused {
        width: 36px;
        height: 36px;
    }

    /* Улучшенные тултипы для мобильных */
    .rn-tooltip::before {
        font-size: 11px;
        padding: 4px 8px;
        bottom: 120%;
    }

    .rn-tooltip::after {
        bottom: 110%;
    }
}