/* ======================================
   AUDIO PLAYER STYLING - CONSOLIDATED
   ====================================== */

/* CSS Variables for easy theming */
:root {
  --audio-primary-color: #00ffff;
  --audio-secondary-color: #0088ff;
  --audio-bg-color: rgba(0, 20, 40, 0.8);
  --audio-border-color: rgba(0, 255, 255, 0.4);
  --audio-text-color: #00ffff;
  --audio-glow-color: rgba(0, 255, 255, 0.5);
  --audio-dark-bg: rgba(5, 10, 20, 0.9);
}

/* Basic audio player styling */
.audio-section {
    background: rgba(10, 15, 25, 0);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
}

/* Container for the entire audio player */
.audio-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem auto;
    width: 90%;
    max-width: 1000px;
}

/* Main controls area with buttons and info */
.audio-controls {
    position: relative;
    width: 100%;
    max-width: 750px;
    margin: 0 auto 2rem;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.699);
    border-left: 3px solid #f9f900;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(249, 249, 0, 0.8),
        0 0 20px rgba(249, 249, 0, 0.4);
    z-index: 50;
}

/* Track information display */
.audio-container .track-info {
    text-align: center;
    margin-bottom: 1rem;
}

.audio-container .track-title {
    font-family: 'Orbitron', sans-serif;
    color: #f9f900;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 
        0 0 10px rgba(249, 249, 0, 0.8),
        0 0 20px rgba(249, 249, 0, 0.4);
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

/* Add glitch effect to the title */
.audio-container .track-title::before,
.audio-container .track-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    clip: rect(0, 0, 0, 0);
}

.audio-container .track-title::before {
    left: -2px;
    text-shadow: 2px 0 #00ffff;
    animation: glitch-effect 3s infinite linear alternate-reverse;
}

.audio-container .track-title::after {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    animation: glitch-effect 2s infinite linear alternate-reverse;
}

/* Control buttons container */
.audio-container .control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 1rem 0;
}

/* Individual control buttons */
.audio-container .control-button {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(249, 249, 0, 0.4);
    color: #f9f900;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 10px rgba(249, 249, 0, 0.2),
        inset 0 0 5px rgba(249, 249, 0, 0.1);
}

.audio-container .control-button:hover {
    background: rgba(249, 249, 0, 0.1);
    box-shadow: 
        0 0 15px rgba(249, 249, 0, 0.4),
        inset 0 0 5px rgba(249, 249, 0, 0.2);
    transform: scale(1.05);
}

/* Play button specific styling */
.audio-container .play-button {
    width: 55px;
    height: 55px;
    font-size: 1.2em;
}

.audio-container .play-button.playing {
    background: rgba(0, 255, 255, 0.2);
}

/* Volume control styling */
.audio-container .volume-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Volume slider styling */
.audio-container .volume-slider {
    -webkit-appearance: none;
    width: 120px;
    height: 4px;
    background: rgba(249, 249, 0, 0.2);
    border-radius: 2px;
    outline: none;
    box-shadow: inset 0 0 5px rgba(249, 249, 0, 0.3);
}

.audio-container .volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f9f900;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(249, 249, 0, 0.8);
}

.audio-container .volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--audio-primary-color);
    cursor: pointer;
    border: none;
}

/* Audio player progress bar */
.audio-container .progress-container {
    width: 100%;
    height: 6px;
    background: rgba(0, 20, 40, 0.6);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    margin: 1rem 0;
    overflow: hidden;
}

.audio-container .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--audio-primary-color), var(--audio-secondary-color));
    width: 0%;
    border-radius: 3px;
    position: relative;
    transition: width 0.1s linear;
}

/* Progress bar handle */
.audio-container .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0 3px 3px 0;
    box-shadow: 0 0 10px var(--audio-glow-color);
}

/* Time display for current/total duration */
.audio-container .time-display {
    display: flex;
    justify-content: space-between;
    color: rgba(0, 255, 255, 0.8);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Audio visualizer connection button */
.audio-container .audio-visualizer-toggle {
    background: var(--audio-bg-color);
    border: 1px solid var(--audio-border-color);
    color: var(--audio-text-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: 'Rajdhani', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.audio-container .audio-visualizer-toggle:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px var(--audio-glow-color);
}

.audio-container .audio-visualizer-toggle.active {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

.audio-container .audio-visualizer-toggle i {
    font-size: 1.2rem;
}

/* PowerShell Terminal Music Widget - with unique class names */
.ps-music-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 400px;
    height: auto;
    background: rgba(1, 10, 20, 0.9);
    border: 1px solid var(--audio-border-color);
    border-radius: 6px;
    overflow: hidden;
    z-index: 100;
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(0, 255, 255, 0.2);
    font-family: 'Rajdhani', monospace;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    transform: translateY(0);
}

.ps-music-widget.minimized {
    transform: translateY(calc(100% - 30px));
}

.ps-header {
    height: 30px;
    background: rgba(0, 30, 60, 0.95);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    color: var(--audio-text-color);
    font-size: 14px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    user-select: none;
}

.ps-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.7);
}

.ps-controls {
    display: flex;
    gap: 10px;
}

.ps-controls span {
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.ps-controls span:hover {
    opacity: 1;
    text-shadow: 0 0 8px var(--audio-primary-color);
}

.ps-content {
    padding: 10px;
    color: #e0e0e0;
    position: relative;
    overflow: hidden;
}

.ps-command-line {
    display: flex;
    margin-bottom: 8px;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.4;
}

.ps-prompt {
    color: #0f0;
    margin-right: 8px;
    user-select: none;
}

.ps-command {
    color: #fff;
}

.ps-output {
    background: rgba(0, 20, 40, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 4px;
    padding: 10px;
    margin: 8px 0 12px;
    font-size: 13px;
}

.ps-status-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.ps-label {
    color: #aaa;
}

.ps-value {
    font-weight: bold;
}

.ps-status.active {
    color: #0f0;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.7);
}

.ps-status.inactive {
    color: #f00;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.7);
}

.ps-visualizer-status.enabled {
    color: #0ff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.7);
}

.ps-visualizer-status.disabled {
    color: #f90;
    text-shadow: 0 0 5px rgba(255, 153, 0, 0.7);
}

.ps-eq-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 30px;
    gap: 4px;
    margin: 10px 0;
}

.ps-eq-bar {
    width: 6px;
    height: 5px;
    background: var(--audio-primary-color);
    border-radius: 1px;
    transition: height 0.1s ease;
}

.ps-eq-container.active .ps-eq-bar {
    animation: ps-eq-animation 0.5s infinite;
}

.ps-eq-container.active .ps-eq-bar:nth-child(1) { animation-delay: 0.0s; }
.ps-eq-container.active .ps-eq-bar:nth-child(2) { animation-delay: 0.1s; }
.ps-eq-container.active .ps-eq-bar:nth-child(3) { animation-delay: 0.2s; }
.ps-eq-container.active .ps-eq-bar:nth-child(4) { animation-delay: 0.3s; }
.ps-eq-container.active .ps-eq-bar:nth-child(5) { animation-delay: 0.4s; }

.ps-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.ps-buttons button {
    flex: 1;
    background: rgba(0, 30, 60, 0.8);
    color: var(--audio-primary-color);
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: 4px;
    padding: 8px 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
}

.ps-buttons button:hover {
    background: rgba(0, 60, 100, 0.6);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.ps-buttons button:active {
    transform: translateY(1px);
}

.ps-buttons button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(0, 255, 255, 0.4) 0%,
        transparent 70%
    );
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

.ps-buttons button.clicked::before {
    animation: ps-button-pulse 0.8s ease-out;
}

@keyframes ps-button-pulse {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 0;
        transform: scale(2);
    }
}

.ps-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 255, 0.5) 50%,
        transparent 100%
    );
    opacity: 0.7;
    z-index: 10;
    pointer-events: none;
    animation: ps-scan-active 2s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ps-music-widget {
        width: 90%;
        right: 5%;
        bottom: 20px;
    }
}

/* Audio player theme variations */
.audio-player-dark {
    background: var(--audio-dark-bg);
    border: 1px solid var(--audio-border-color);
}

.audio-player-neon {
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

/* Audio player animations */
@keyframes audioGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 25px var(--audio-glow-color);
    }
}

.audio-glow-effect {
    animation: audioGlow 3s infinite;
}

/* ======================================
   3D CAROUSEL PLAYLIST - REBUILT
   ====================================== */

/* New 3D Carousel Implementation */
.ps-playlist-carousel {
    position: relative;
    width: 100%;
    height: 400px;
    perspective: 3500px;
    margin: 60px 0;
    overflow: visible;
    user-select: none;
    touch-action: pan-y;
}

.ps-carousel-container {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.2, 0.9, 0.1, 1);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    transform-origin: center center;
}

.ps-track-card {
    position: absolute;
    width: 300px;
    height: 220px;
    left: 50%;
    top: 50%;
    margin-left: -200px;
    margin-top: -110px;
    background: rgba(5, 15, 30, 0.975);
    border: 1px solid;
    border-color: #f9f900;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 0 25px rgba(0, 0, 0, 0.6),
        0 0 15px rgba(0, 255, 255, 0.3),
        0 0 5px rgba(255, 0, 255, 0.3);
    backface-visibility: hidden;
    cursor: grab;
    transform-style: preserve-3d;
    transform-origin: center center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    background: linear-gradient(135deg, rgba(5, 15, 30, 0.95) 0%, rgba(10, 25, 45, 0.95) 100%);
}

.ps-track-card:active {
    cursor: grabbing;
}

.ps-track-card:hover {
    box-shadow: 
        0 0 30px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(0, 255, 255, 0.4),
        0 0 10px rgba(255, 0, 255, 0.4);
    transform: scale(1.05);
    border-color: rgba(255, 0, 170, 0.539);
}

.ps-track-card.ps-track-active {
    border: 2px solid;
    border-color: #f9f900;
    box-shadow: 
        0 0 30px rgba(0, 0, 0, 0.7),
        0 0 25px rgba(0, 255, 255, 0.5),
        0 0 15px rgba(255, 0, 255, 0.5);
    background: linear-gradient(135deg, rgba(10, 25, 45, 0.95) 0%, rgba(15, 35, 60, 0.95) 100%);
}

.ps-card-content {
    padding: 20px;
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}

.ps-track-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    color: #ffffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
    margin-bottom: 10px;
    font-weight: 600;
    position: relative;
}

.ps-track-title {
    display: none;
}

.ps-track-equalizer {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 40px;
    width: 100%;
    margin-top: auto;
}

.ps-eq-bar {
    width: 14%;
    height: 4px;
    background: linear-gradient(to top, #00FFFF, #FF00FF);
    border-radius: 2px;
    transition: height 0.2s ease;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.7);
}

.ps-track-number::before,
.ps-track-active .ps-track-number::after {
    display: none;
}

.ps-track-active .ps-track-number::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 50%;
    animation: rotate-ring 10s linear infinite;
}

@keyframes rotate-ring {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.ps-track-active .ps-eq-bar {
    animation: eq-animation 1.2s ease-in-out infinite alternate;
}

.ps-eq-bar:nth-child(1) { 
    animation-delay: 0.0s; 
    background: linear-gradient(to top, #00FFFF, #39FF14);
}
.ps-eq-bar:nth-child(2) { 
    animation-delay: 0.2s;
    background: linear-gradient(to top, #00FFFF, #0088FF); 
}
.ps-eq-bar:nth-child(3) { 
    animation-delay: 0.4s;
    background: linear-gradient(to top, #00FFFF, #FF00FF); 
}
.ps-eq-bar:nth-child(4) { 
    animation-delay: 0.6s;
    background: linear-gradient(to top, #00FFFF, #BC13FE); 
}
.ps-eq-bar:nth-child(5) { 
    animation-delay: 0.8s;
    background: linear-gradient(to top, #00FFFF, #39FF14); 
}

@keyframes eq-animation {
    0% { height: 4px; }
    100% { height: 50px; }
}

.ps-card-glitch-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 255, 255, 0.15), rgba(255, 0, 255, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.ps-track-card:hover .ps-card-glitch-effect {
    opacity: 1;
    animation: glitch-effect 2s infinite alternate;
}

.ps-card-shine {
    position: absolute;
    top: -150%;
    left: -150%;
    width: 400%;
    height: 400%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    pointer-events: none;
    z-index: 1;
}

.ps-track-card:hover .ps-card-shine {
    animation: card-shine 1.5s ease-in-out infinite;
}

.ps-track-active::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #00FFFF, #0088FF, #FF00FF, #BC13FE, #39FF14);
    border-radius: 14px;
    z-index: -1;
    animation: border-pulse 3s linear infinite;
    opacity: 0.7;
}

@keyframes border-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.3; }
}

.ps-carousel-hint {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    text-align: center;
    color: #00FFFF;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.8;
    animation: pulse 2s infinite;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.7);
    letter-spacing: 1px;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; text-shadow: 0 0 5px rgba(0, 255, 255, 0.7); }
    50% { opacity: 0.4; text-shadow: 0 0 10px rgba(0, 255, 255, 0.9); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ps-playlist-carousel {
        height: 180px;
    }
    
    .ps-track-card {
        width: 150px;
        height: 150px;
        margin-left: -75px;
    }
    
    .ps-track-title {
        font-size: 14px;
    }
}

.ps-card-content::after {
    content: '';
    position: absolute;
    top: 60px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(to right, rgba(0, 255, 255, 0.5), rgba(0, 255, 255, 0), rgba(0, 255, 255, 0.5));
    opacity: 0.3;
}

/* Add scan lines effect */
.audio-controls::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1;
} 