/* Audio Modal Styles - Minimalist Chic Redesign */

/* Modal Overlay - Dark glass effect */
.audio-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

/* Modal Content - Compact, Floating Panel */
.audio-modal-content {
    background: rgba(22, 24, 35, 0.95);
    /* Deep dark blue-grey */
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    /* Much smaller width */
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    /* Subtle border ring */
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* Elegant spring */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close Button - Minimalist */
.audio-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Header - Clean */
.audio-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.audio-modal-header i {
    font-size: 1.5rem !important;
    /* Smaller icon */
    margin-bottom: 12px !important;
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.audio-modal-header h2 {
    font-size: 1.25rem !important;
    font-weight: 600;
    margin-bottom: 6px !important;
    letter-spacing: -0.02em;
}

.audio-modal-header p {
    font-size: 0.9rem !important;
    opacity: 0.7;
}

/* Languages Grid - Compact Pills/Tabs style */
.audio-languages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns */
    gap: 10px;
    margin-bottom: 24px;
}

/* Language Card - Minimalist Button Style */
.audio-language-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Icon left, text center, play right */
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.audio-language-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.audio-language-card.playing {
    background: rgba(246, 131, 109, 0.15);
    /* Accent tint */
    border-color: rgba(246, 131, 109, 0.4);
}

.language-icon {
    font-size: 1.2rem;
    /* Small flags */
    margin-bottom: 0;
    line-height: 1;
}

.language-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #eee;
    margin-bottom: 0;
    flex-grow: 1;
}

.play-indicator {
    font-size: 0.8rem;
    color: var(--accent-orange);
    opacity: 0;
    /* Hidden by default for cleaner look */
    width: 20px;
    display: flex;
    justify-content: center;
}

.audio-language-card:hover .play-indicator,
.audio-language-card.playing .play-indicator {
    opacity: 1;
}

.audio-language-card.playing .play-indicator i:before {
    content: "\f04c";
    /* Pause icon */
}

/* Now Playing Bar - Floating at bottom */
.now-playing {
    background: rgba(246, 131, 109, 0.08);
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    animation: fadeIn 0.3s ease;
}

.audio-visualizer {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 16px;
    /* Smaller */
}

.audio-visualizer span {
    width: 2px;
    height: 100%;
    background: var(--accent-orange);
    border-radius: 2px;
    animation: audioWave 1s ease-in-out infinite;
}

.audio-visualizer span:nth-child(1) {
    animation-delay: 0s;
}

.audio-visualizer span:nth-child(2) {
    animation-delay: 0.1s;
}

.audio-visualizer span:nth-child(3) {
    animation-delay: 0.2s;
}

.audio-visualizer span:nth-child(4) {
    animation-delay: 0.3s;
}

.audio-visualizer span:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes audioWave {

    0%,
    100% {
        height: 30%;
        opacity: 0.5;
    }

    50% {
        height: 100%;
        opacity: 1;
    }
}

#nowPlayingText {
    color: var(--accent-orange);
    font-weight: 500;
    font-size: 0.9rem;
}