/* Custom CSS for Cyber-Radio Terminal */

/* Global scanline animation imitating an old CRT monitor */
.scanline {
    width: 100%;
    height: 15px;
    z-index: 50;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(255, 42, 109, 0.15) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.3;
    position: absolute;
    pointer-events: none;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% {
        top: -20px;
    }

    100% {
        top: 100%;
    }
}

/* Advanced Glitch text effect */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch-text:hover::before {
    left: 2px;
    text-shadow: -2px 0 #ff2a6d;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
    opacity: 1;
}

.glitch-text:hover::after {
    left: -2px;
    text-shadow: -2px 0 #05d9e8;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
    opacity: 1;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 81px, 0);
    }

    10% {
        clip: rect(83px, 9999px, 20px, 0);
    }

    20% {
        clip: rect(32px, 9999px, 55px, 0);
    }

    30% {
        clip: rect(98px, 9999px, 12px, 0);
    }

    40% {
        clip: rect(4px, 9999px, 89px, 0);
    }

    50% {
        clip: rect(65px, 9999px, 32px, 0);
    }

    60% {
        clip: rect(21px, 9999px, 99px, 0);
    }

    70% {
        clip: rect(78px, 9999px, 14px, 0);
    }

    80% {
        clip: rect(45px, 9999px, 67px, 0);
    }

    90% {
        clip: rect(12px, 9999px, 88px, 0);
    }

    100% {
        clip: rect(54px, 9999px, 45px, 0);
    }
}

/* Webkit Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #020205;
}

::-webkit-scrollbar-thumb {
    background: #ff2a6d;
    border-radius: 5px;
}

/* Volume Slider Customization */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
}

input[type=range]:focus {
    outline: none;
}

/* Custom Thumb for Webkit Browsers */
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #05d9e8;
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 0 15px rgba(5, 217, 232, 1);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

/* Custom Track for Webkit Browsers */
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: #1f2937;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Input Range for Firefox */
input[type="range"]::-moz-range-track {
    background: #1f2937;
    height: 8px;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

input[type="range"]::-moz-range-thumb {
    border: none;
    box-shadow: 0 0 15px rgba(5, 217, 232, 1);
}

/* Custom Cursor Setup */
body, a, button, input[type="range"] {
    cursor: auto !important;
}

/* Puntero luminoso pequeño (dot) */
.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: #05d9e8;
    /* Cyan */
    border-radius: 50%;
    position: fixed;
    top: 50%;
    left: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(5, 217, 232, 0.8), 0 0 20px rgba(5, 217, 232, 0.4);
}

/* Anillo exterior que sigue al puntero (outline) */
.cursor-outline {
    width: 30px;
    height: 30px;
    border: 2px solid #ff2a6d;
    /* Neon Pink */
    border-radius: 50%;
    position: fixed;
    top: 50%;
    left: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        height 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        background-color 0.2s;
}

/* Marquee Animation for LCD Panel */
@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.animate-\\[marquee_10s_linear_infinite\\] {
    animation: marquee 10s linear infinite;
}

/* Fake Signal Meter Bars */
.signal-bar {
    width: 4px;
    background-color: #05d9e8;
    border-radius: 2px;
    transition: height 0.1s ease;
    box-shadow: 0 0 5px rgba(5, 217, 232, 0.5);
}
/* Mobile/Tablet: usar cursor nativo y ocultar puntero personalizado */
@media (max-width: 1024px) {
  body, a, button, input[type="range"] {
    cursor: auto !important;
  }
  .cursor-dot,
  .cursor-outline {
    display: none !important;
  }
}


/* Force-disable custom cursor on touch/mobile */
@media (hover: none), (pointer: coarse), (max-width: 1024px) {
  html, body, * {
    cursor: auto !important;
  }
  .cursor-dot,
  .cursor-outline {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
