:root {
    --aud-primary: #6366f1;
    --aud-primary-dark: #4f46e5;
    --aud-primary-light: #a5b4fc;
    --aud-accent: #f43f5e;
    --aud-dark: #0f172a;
    --aud-dark-alt: #1e293b;
    --aud-gray: #64748b;
    --aud-light-gray: #f1f5f9;
    --aud-off-white: #f8fafc;
    --aud-white: #ffffff;
    --aud-text-gradient: linear-gradient(120deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --aud-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 10px -6px rgba(0, 0, 0, 0.05);
    --aud-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Premium Article Header */
.aud-article-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    border-radius: 16px;
    background: var(--aud-white);
    box-shadow: var(--aud-shadow-xl);
    position: relative;
}
/* If the header has exactly one direct child, collapse to one column */
.aud-article-header:has(> :only-child) {
  grid-template-columns: 1fr;
}

.aud-article-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.aud-article-header:hover .aud-article-hero-image {
    transform: scale(1.02);
}

/* Premium Audio Player */
.aud-player-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
    height: 100%;
    background: var(--aud-white);
    position: relative;
}

.aud-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.aud-player-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--aud-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.aud-player-title i {
    color: var(--aud-primary);
    font-size: 1.6rem;
}

.aud-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.aud-playback-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.aud-progress-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
}

.aud-progress-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.aud-speed-control {
    position: absolute;
    right: 0;
    top: -36px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.aud-speed-btn {
    background: rgba(99, 102, 241, 0.1);
    color: var(--aud-primary);
    border: none;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.aud-speed-btn:hover {
    background: rgba(99, 102, 241, 0.2);
}

.aud-progress-bar {
    flex-grow: 1;
    height: 6px;
    background: var(--aud-light-gray);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.aud-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--aud-light-gray);
    border-radius: 3px;
}

.aud-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 30%;
    background: var(--aud-text-gradient);
    border-radius: 3px;
    z-index: 1;
}

.aud-progress-knob {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--aud-white);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.aud-progress-bar:hover .aud-progress-knob {
    opacity: 1;
}

.aud-time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--aud-gray);
}

.aud-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.aud-play-pause-btn {
    width: 65px;
    height: 65px;
    background: var(--aud-primary);
    color: var(--aud-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    border: none;
}

.aud-play-pause-btn:hover {
    background: var(--aud-primary-dark);
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
}

.aud-play-pause-btn i {
    font-size: 1.6rem;
}

.aud-skip-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.aud-skip-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    color: var(--aud-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1.1rem;
    position: relative;
}

.aud-skip-btn:hover {
    color: var(--aud-primary-dark);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.1);
}

.aud-skip-label {
    font-size: 0.7rem;
    color: var(--aud-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    opacity: 0.8;
}

.aud-player-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.aud-player-action-btn {
    background: none;
    border: none;
    color: var(--aud-gray);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    position: relative;
    overflow: visible;

}

.aud-player-action-btn:hover {
    color: var(--aud-primary-dark);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.aud-player-action-btn i {
    font-size: 1.1rem;
}

.aud-player-action-btn.copied::after {
    content: '✓ Copied!';
    position: absolute;
    background: var(--aud-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    animation: fadeTooltip 2s ease;
    pointer-events: none;
    z-index: 10;
}

.aud-player-action-btn.downloading::after {
    content: '↓ Downloading...';
    position: absolute;
    background: var(--aud-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

@keyframes fadeTooltip {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }

    20% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
}


/* Article Body */
.aud-article-body {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: var(--aud-white);
    border-radius: 16px;
    box-shadow: var(--aud-shadow-lg);
}

.aud-article-body h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--aud-dark);
    font-weight: 700;
    font-family: 'DM Serif Display', serif;
}

.aud-article-body p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--aud-dark-alt);
    margin-bottom: 1.5rem;
}

/* Speed Control Dropdown */
.aud-speed-dropdown {
    position: absolute;
    right: 0;
    top: 30px;
    background: var(--aud-white);
    border-radius: 8px;
    box-shadow: var(--aud-shadow-lg);
    padding: 0.5rem 0;
    z-index: 10;
    display: none;
    min-width: 80px;
}

.aud-speed-dropdown.show {
    display: block;
}

.aud-speed-option {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.aud-speed-option:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--aud-primary-dark);
}

.aud-speed-option.active {
    background: rgba(99, 102, 241, 0.2);
    color: var(--aud-primary-dark);
    font-weight: 600;
}

.aud-mini-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    padding: 15px;
    z-index: 1000;
    display: none;
    transition: all 0.3s ease;
}

.aud-mini-player:not(.active) {
    display: none;
}

.aud-mini-player.active {
    display: block;
}

.aud-mini-player-content {
    display: flex;
    align-items: center;
    gap: 5px;
}

.aud-mini-player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
}

.aud-mini-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--aud-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aud-mini-close-btn {
    background: none;
    border: none;
    color: var(--aud-gray);
    cursor: pointer;
    margin-left: 0;
}

.aud-mini-progress {
    flex-grow: 1;
    height: 4px;
    background: var(--aud-light-gray);
    border-radius: 2px;
    position: relative;
}

.aud-mini-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--aud-primary);
    border-radius: 2px;
}

/* Mini Player Minimize Button */
.aud-mini-minimize-btn {
    background: none;
    border: none;
    color: var(--aud-gray);
    cursor: pointer;
    padding: 0 8px;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: all 0.2s ease;
    margin-right: 5px;
}

.aud-mini-minimize-btn:hover {
    opacity: 1;
    color: var(--aud-primary);
    transform: translateY(-1px);
}





@media (max-width: 768px) {
    .aud-mini-player {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .aud-article-header {
        height: auto;
        grid-template-columns: 1fr;
    }

    .aud-article-hero-image {
        height: 350px;
    }

    .aud-player-container {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .aud-article-header {
        height: auto;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .aud-article-hero-image {
        height: 170px;
        width: 100%;
        object-fit: cover;
    }

    .aud-player-container {
        padding: 1.5rem;
    }

    .aud-controls-row {
        gap: 1rem;
    }

    .aud-play-pause-btn {
        width: 55px;
        height: 55px;
    }

    .aud-article-body {
        padding: 1.8rem;
    }

    .aud-article-body h1 {
        font-size: 2rem;
    }



    .aud-speed-option {
        padding: 0.1rem 0.2rem;
    }
}

@media (max-width: 480px) {
    .aud-player-actions {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .aud-player-action-btn {
        padding: 5px 5px;
        font-size: 0.5rem;
    }

    .aud-skip-btn {
        width: 35px;
        height: 35px;
    }

    .aud-play-pause-btn {
        width: 50px;
        height: 50px;
    }

    .aud-skip-label {
        font-size: 0.6rem;
    }

    .aud-speed-btn {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    .aud-speed-dropdown {
        min-width: 70px;
    }
}

@media (orientation: landscape) and (max-width: 900px) {
    .aud-article-header {
        grid-template-columns: 1fr 1fr;
        height: 300px;
    }

    .aud-article-hero-image {
        height: 100%;
    }

    .aud-player-container {
        padding: 1.5rem;
    }

    .aud-play-pause-btn {
        width: 50px;
        height: 50px;
    }

    .aud-skip-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .aud-player-title {
        font-size: 1.1rem;
    }

    .aud-speed-control {
        top: -20px;
    }
}



/* Responsive Design */
