/* Macro Radio - Standar Edition */
:root {
    --mr-bg: #0a0b1e;
    --mr-neon-blue: #00f3ff;
    --mr-dark-blue: #0077ff;
    --mr-glow: rgba(0, 243, 255, 0.4);
    --mr-text: #e0faff;
    --mr-border-radius: 8px;
    --mr-font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.mr-container {
    width: 380px;
    height: 400px;
    max-width: 90vw;
    position: relative;
    border-radius: var(--mr-border-radius);
    color: var(--mr-text);
    overflow: hidden;
    font-family: var(--mr-font-main);
    transition: transform 0.3s ease;
    backdrop-filter: blur(5px);
    margin: 1rem auto;
}

.mr-inner-image {
    position: absolute;
    pointer-events: none;
    object-fit: contain;
}


.mr-container * {
    box-sizing: border-box;
}

/* Background scanning effect */
.mr-background-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 243, 255, 0.05) 50%, transparent 100%);
    background-size: 100% 4px;
    opacity: 0.3;
}

.mr-inner {
    position: relative;
    z-index: 1;
}

/* Header section, position is controlled by dynamic CSS */
.mr-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mr-status-dot {
    width: 8px;
    height: 8px;
    background: #ff0000;
    border-radius: 50%;
    box-shadow: 0 0 5px #ff0000;
    animation: mr-pulse-red 1.5s infinite alternate;
}

.mr-status-text {
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

/* Body and Info */
.mr-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mr-title {
    margin: 0;
    font-size: 1.25rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--mr-neon-blue);
    text-shadow: 0 0 8px var(--mr-neon-blue);
}

/* Visualizer (Modern & Multi-style) */
.mr-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 40px;
    margin-top: 0.5rem;
}

.mr-visualizer span {
    width: 4px;
    background: var(--mr-neon-blue);
    border-radius: 2px;
    height: 4px;
    transition: height 0.1s;
    opacity: 0.7;
}

/* Base playing animation for the default style */
.mr-playing.style-cyberpunk .mr-visualizer span {
    animation: mr-cyber-bar 0.8s ease-in-out infinite alternate;
}

/* Sin-wave delay pattern for smooth motion */
.mr-visualizer span:nth-child(n) {
    animation-delay: calc(var(--i, 0) * 0.1s);
}

/* Since we don't have JS to set --i, we map them manually for 20 */
.mr-visualizer span:nth-child(1) {
    animation-delay: 0.1s;
}

.mr-visualizer span:nth-child(2) {
    animation-delay: 0.2s;
}

.mr-visualizer span:nth-child(3) {
    animation-delay: 0.3s;
}

.mr-visualizer span:nth-child(4) {
    animation-delay: 0.4s;
}

.mr-visualizer span:nth-child(5) {
    animation-delay: 0.5s;
}

.mr-visualizer span:nth-child(6) {
    animation-delay: 0.6s;
}

.mr-visualizer span:nth-child(7) {
    animation-delay: 0.7s;
}

.mr-visualizer span:nth-child(8) {
    animation-delay: 0.8s;
}

.mr-visualizer span:nth-child(9) {
    animation-delay: 0.9s;
}

.mr-visualizer span:nth-child(10) {
    animation-delay: 1.0s;
}

.mr-visualizer span:nth-child(11) {
    animation-delay: 1.1s;
}

.mr-visualizer span:nth-child(12) {
    animation-delay: 1.0s;
}

.mr-visualizer span:nth-child(13) {
    animation-delay: 0.9s;
}

.mr-visualizer span:nth-child(14) {
    animation-delay: 0.8s;
}

.mr-visualizer span:nth-child(15) {
    animation-delay: 0.7s;
}

.mr-visualizer span:nth-child(16) {
    animation-delay: 0.6s;
}

.mr-visualizer span:nth-child(17) {
    animation-delay: 0.5s;
}

.mr-visualizer span:nth-child(18) {
    animation-delay: 0.4s;
}

.mr-visualizer span:nth-child(19) {
    animation-delay: 0.3s;
}

.mr-visualizer span:nth-child(20) {
    animation-delay: 0.2s;
}

/* Global playing status */
.mr-playing .mr-status-dot {
    background: #00ff00;
    box-shadow: 0 0 5px #00ff00;
    animation-name: mr-pulse-green;
}

/* Controls */
.mr-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mr-btn {
    background: transparent;
    border: 2px solid var(--mr-neon-blue);
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 10px var(--mr-glow);
}

.mr-btn:hover {
    box-shadow: 0 0 20px var(--mr-neon-blue);
    transform: scale(1.1);
}

.mr-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--mr-neon-blue);
    filter: drop-shadow(0 0 3px var(--mr-neon-blue));
}

.mr-volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-grow: 1;
    margin-left: 1rem;
}

.mr-volume-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--mr-neon-blue);
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: rgba(0, 243, 255, 0.1);
    height: 4px;
    border-radius: 4px;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: var(--mr-neon-blue);
    box-shadow: 0 0 8px var(--mr-neon-blue);
}


/* Footer & Decorative elements */
.mr-footer {
    border-top: 1px solid rgba(0, 243, 255, 0.2);
    margin-top: 1rem;
    padding-top: 0.5rem;
    display: flex;
    justify-content: center;
    position: relative;
}

.mr-glitch-text {
    font-size: 0.6rem;
    color: var(--mr-neon-blue);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mr-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--mr-neon-blue);
    opacity: 0.1;
    animation: mr-scanline 8s linear infinite;
}

/* Keyframes */
@keyframes mr-pulse-red {
    from {
        opacity: 0.6;
        box-shadow: 0 0 2px #ff0000;
    }

    to {
        opacity: 1;
        box-shadow: 0 0 10px #ff0000;
    }
}

@keyframes mr-pulse-green {
    from {
        opacity: 0.6;
        box-shadow: 0 0 2px #00ff00;
    }

    to {
        opacity: 1;
        box-shadow: 0 0 10px #00ff00;
    }
}

@keyframes mr-cyber-bar {
    0% {
        height: 4px;
        filter: brightness(1);
    }

    100% {
        height: 35px;
        filter: brightness(1.5);
        box-shadow: 0 0 10px var(--mr-neon-blue);
    }
}

@keyframes mr-smooth-wave {

    0%,
    100% {
        height: 8px;
        transform: translateY(0);
    }

    50% {
        height: 40px;
        transform: translateY(-5px);
    }
}

@keyframes mr-minimal-pulse {

    0%,
    100% {
        height: 2px;
        opacity: 0.2;
    }

    50% {
        height: 25px;
        opacity: 0.9;
    }
}

@keyframes mr-led-stack {
    0% {
        height: 4px;
        background: #BF360C;
    }

    50% {
        height: 15px;
        background: #E64A19;
    }

    100% {
        height: 35px;
        background: #FF5722;
        box-shadow: 0 -2px 10px #FF5722;
    }
}

@keyframes mr-glass-dot {
    0% {
        transform: scaleY(1);
        opacity: 0.4;
    }

    100% {
        transform: scaleY(5);
        opacity: 0.9;
    }
}

@keyframes mr-scanline {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

@media (max-width: 480px) {
    .mr-container {
        width: 100%;
    }
}

/* ADMIN STYLING */
.mr-style-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.mr-style-option {
    cursor: pointer;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    padding: 10px;
    border-radius: 4px;
    transition: all 0.2s;
    flex: 1;
    min-width: 150px;
    text-align: center;
}

.mr-style-option:hover {
    background: #fff;
    border-color: #2271b1;
}

.mr-style-option input {
    margin-bottom: 5px;
}

.mr-style-option span {
    display: block;
    font-weight: 600;
}

/* STYLE OVERRIDES */

/* Cyberpunk (Default) */
.mr-container.style-cyberpunk {
    border: 1px solid var(--mr-neon-blue);
    background: var(--mr-bg);
    box-shadow: 0 0 30px var(--mr-glow);
}

/* AURORA GRADIENT */
.mr-container.style-aurora {
    background: linear-gradient(135deg, #1A1A40 0%, #700B97 50%, #8E05C2 100%);
    border: none;
    box-shadow: 0 10px 40px rgba(112, 11, 151, 0.4);
}

.mr-container.style-aurora .mr-background-glow {
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 60%);
    opacity: 1;
}

.mr-container.style-aurora .mr-title {
    color: #fff;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.mr-container.style-aurora .mr-btn {
    background: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mr-container.style-aurora .mr-btn svg {
    fill: #700B97;
    filter: none;
}

.mr-container.style-aurora .mr-visualizer span {
    background: #fff;
    width: 5px;
    border-radius: 5px;
}

.mr-playing.style-aurora .mr-visualizer span {
    animation: mr-smooth-wave 1.2s ease-in-out infinite;
}

.mr-container.style-aurora .mr-visualizer {
    align-items: center;
    /* Wave centered */
}

.mr-container.style-aurora .mr-volume-icon svg {
    fill: #fff;
}

.mr-container.style-aurora input[type="range"]::-webkit-slider-thumb {
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* ECHO STREAM DARK */
.mr-container.style-echo {
    background: #000;
    border: 1px solid #333;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 1);
}

.mr-container.style-echo .mr-background-glow {
    display: none;
}

.mr-container.style-echo .mr-title {
    color: #eee;
    font-family: 'Helvetica', sans-serif;
    font-weight: 300;
    letter-spacing: 5px;
    text-shadow: none;
}

.mr-container.style-echo .mr-btn {
    border-color: #eee;
    border-width: 1px;
    box-shadow: none;
}

.mr-container.style-echo .mr-btn svg {
    fill: #eee;
    filter: none;
}

.mr-container.style-echo .mr-visualizer {
    gap: 6px;
}

.mr-container.style-echo .mr-visualizer span {
    background: #fff;
    width: 1px;
    opacity: 0.4;
}

.mr-playing.style-echo .mr-visualizer span {
    animation: mr-minimal-pulse 0.4s linear infinite;
}

.mr-container.style-echo .mr-glitch-text {
    opacity: 0.3;
}

/* WOODEN CLASSIC */
.mr-container.style-wooden {
    background: #5D4037;
    border: 10px solid #3E2723;
    border-radius: 20px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mr-container.style-wooden::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    pointer-events: none;
    background-image: url('https://www.transparenttextures.com/patterns/wood-pattern.png');
}

.mr-container.style-wooden .mr-title {
    color: #FFE0B2;
    text-shadow: 2px 2px 0 #3E2723;
    font-family: 'Georgia', serif;
}

.mr-container.style-wooden .mr-btn {
    background: #8D6E63;
    border: 3px solid #3E2723;
    box-shadow: 2px 4px 0 #3E2723;
}

.mr-container.style-wooden .mr-btn svg {
    fill: #3E2723;
    filter: none;
}

.mr-container.style-wooden .mr-status-dot {
    background: #FF5722;
    box-shadow: 0 0 5px #FF5722;
}

.mr-container.style-wooden .mr-visualizer span {
    background: #FF5722;
    width: 6px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.2);
}

.mr-playing.style-wooden .mr-visualizer span {
    animation: mr-led-stack 0.6s steps(6) infinite alternate;
}

/* GLASSMORPHISM */
.mr-container.style-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.mr-container.style-glass .mr-background-glow {
    background: radial-gradient(circle at center, rgba(0, 119, 255, 0.1), transparent);
}

.mr-container.style-glass .mr-title {
    color: #fff;
    text-shadow: none;
    font-weight: 500;
}

.mr-container.style-glass .mr-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: none;
}

.mr-container.style-glass .mr-btn svg {
    fill: #fff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.mr-container.style-glass .mr-visualizer span {
    background: #fff;
    opacity: 0.5;
    width: 4px;
    border-radius: 10px;
}

.mr-playing.style-glass .mr-visualizer span {
    animation: mr-glass-dot 1s ease-in-out infinite alternate;
}

.mr-container.style-glass .mr-visualizer {
    align-items: center;
}

.mr-container.style-glass .mr-status-text {
    color: #fff;
}