/* ===================================
   Thumbnail / Preview Styles
   =================================== */

.igd-preview {
    position: relative;
    background: #000;
    min-height: 200px;
    overflow: hidden;
}

#igd-thumbnail {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 400px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Skeleton Loader */
.igd-thumb-skeleton {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.skeleton-animation {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.08) 50%,
            transparent 100%);
    animation: skeleton-wave 1.5s infinite;
}

@keyframes skeleton-wave {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.skeleton-icon {
    font-size: 48px;
    opacity: 0.4;
    animation: pulse-opacity 1.5s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse-opacity {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

/* No Thumbnail Placeholder */
.igd-no-thumb {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: white;
}

.igd-no-thumb svg {
    opacity: 0.7;
    color: white;
}

.igd-no-thumb p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin: 0;
}

.igd-preview-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ===================================
   Rest of existing styles below
   =================================== */

:root {
    --igd-primary: #E1306C;
    --igd-gradient: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
    --igd-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    --igd-radius: 20px;
    --igd-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.igd-wrapper {
    width: 100%;
    padding: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.igd-container {
    max-width: 680px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: var(--igd-radius);
    padding: 45px 40px;
    box-shadow: var(--igd-shadow);
    position: relative;
    overflow: hidden;
}

.igd-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--igd-gradient);
}

.igd-header {
    text-align: center;
    margin-bottom: 35px;
}

.igd-icon {
    display: inline-block;
    margin-bottom: 15px;
    animation: igd-float 3s ease-in-out infinite;
}

@keyframes igd-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.igd-title {
    font-size: 28px !important;
    font-weight: 800 !important;
    margin: 0 0 8px !important;
    background: var(--igd-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2 !important;
}

.igd-subtitle {
    color: #8e8e8e;
    font-size: 15px;
    margin: 0 !important;
}

.igd-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.igd-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border: 2px solid #e8e8e8;
    border-radius: 14px;
    padding: 4px 4px 4px 16px;
    transition: var(--igd-transition);
}

.igd-input-wrap:focus-within {
    border-color: var(--igd-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(225, 48, 108, 0.1);
}

.igd-input-prefix {
    color: #aaa;
    flex-shrink: 0;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.igd-url-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    font-size: 14px !important;
    color: #262626 !important;
    padding: 12px 0 !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: inherit !important;
}

.igd-url-input::placeholder {
    color: #bbb;
}

.igd-clear-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 8px;
    font-size: 14px;
    border-radius: 8px;
    flex-shrink: 0;
    transition: var(--igd-transition);
}

.igd-clear-btn:hover {
    background: #eee;
    color: #666;
}

.igd-submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--igd-gradient);
    color: white !important;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--igd-transition);
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(225, 48, 108, 0.3);
    background-size: 200% auto;
}

.igd-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(225, 48, 108, 0.4);
}

.igd-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.igd-url-tips {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin-bottom: 25px;
}

.igd-url-tips code {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin: 0 3px;
    color: #d62976;
}

.igd-progress {
    margin: 20px 0;
    text-align: center;
}

.igd-progress-bar {
    height: 5px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.igd-progress-fill {
    height: 100%;
    background: var(--igd-gradient);
    border-radius: 10px;
    width: 0%;
    transition: width 0.8s ease;
}

.igd-progress-text {
    color: #888;
    font-size: 13px;
}

.igd-alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 500;
    animation: igd-slide-in 0.3s ease;
}

@keyframes igd-slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.igd-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.igd-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.igd-media-card {
    background: #fafafa;
    border: 2px solid #efefef;
    border-radius: 18px;
    overflow: hidden;
    animation: igd-fade-up 0.4s ease;
}

@keyframes igd-fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.igd-meta {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.igd-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #262626;
    margin-bottom: 10px;
}

.igd-caption {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid var(--igd-primary);
}

.igd-downloads {
    padding: 24px;
}

.igd-downloads-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin: 0 0 16px;
}

.igd-btn-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.igd-dl-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 14px;
    text-decoration: none !important;
    color: white !important;
    transition: var(--igd-transition);
    font-weight: 600;
}

.igd-video-btn {
    background: linear-gradient(135deg, #0095f6, #0062cc);
    box-shadow: 0 4px 15px rgba(0, 149, 246, 0.25);
}

.igd-video-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 149, 246, 0.35);
}

.igd-photo-btn {
    background: linear-gradient(135deg, #20c997, #0d8c65);
    box-shadow: 0 4px 15px rgba(32, 201, 151, 0.25);
}

.igd-photo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(32, 201, 151, 0.35);
}

.igd-dl-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.igd-dl-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.igd-dl-label {
    font-size: 15px;
}

.igd-dl-quality {
    font-size: 11px;
    opacity: 0.8;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.2);
    padding: 1px 8px;
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
}

.igd-dl-arrow {
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.igd-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed #e8e8e8;
    text-align: center;
}

.igd-footer p {
    color: #aaa;
    font-size: 13px;
    margin: 0;
}

@media (max-width: 600px) {
    .igd-container {
        padding: 30px 20px;
    }

    .igd-input-group {
        flex-direction: column;
    }

    .igd-submit-btn {
        justify-content: center;
    }

    .igd-title {
        font-size: 22px !important;
    }
}


/* ===================================
   THUMBNAIL STYLES - FIXED
   =================================== */

.igd-preview-wrap {
    width: 100%;
    overflow: hidden;
    background: #000;
    position: relative;
    border-radius: 18px 18px 0 0;
}

.igd-thumb-container {
    position: relative;
    width: 100%;
    min-height: 220px;
    background: #111;
    overflow: hidden;
}

.igd-thumb-container img {
    width: 100%;
    height: auto;
    max-height: 420px;
    display: block;
    object-fit: cover;
}

/* Skeleton */
.igd-skeleton {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.igd-skeleton-shimmer {
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.06) 40%,
            rgba(255, 255, 255, 0.12) 50%,
            rgba(255, 255, 255, 0.06) 60%,
            transparent 100%);
    animation: shimmer 1.8s infinite;
}

@keyframes shimmer {
    0% {
        left: -150%;
    }

    100% {
        left: 150%;
    }
}

.igd-skeleton-icon {
    font-size: 52px;
    opacity: 0.35;
    z-index: 1;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.25;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* Type badge overlay */
.igd-type-badge-overlay {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10;
    letter-spacing: 0.3px;
}

/* No preview box */
.igd-no-preview {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.no-preview-icon {
    font-size: 52px;
    opacity: 0.75;
}

.igd-no-preview p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin: 0;
}

.igd-type-badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ===================================
   META / AUTHOR / CAPTION
   =================================== */

.igd-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px 0;
    font-size: 15px;
    font-weight: 700;
    color: #262626;
}

.igd-author-icon {
    font-size: 20px;
}

.igd-caption-box {
    margin: 14px 24px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 10px;
    border-left: 4px solid var(--igd-primary, #E1306C);
    color: #555;
    font-size: 13px;
    line-height: 1.65;
}

/* ===================================
   DOWNLOAD BUTTONS
   =================================== */

.igd-downloads-section {
    padding: 20px 24px 24px;
}

.igd-downloads-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #aaa;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.igd-btn-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.igd-dl-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px 22px;
    border-radius: 14px;
    text-decoration: none !important;
    color: #fff !important;
    font-weight: 600;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.igd-btn-video {
    background: linear-gradient(135deg, #0095f6 0%, #0062cc 100%);
    box-shadow: 0 4px 16px rgba(0, 149, 246, 0.28);
}

.igd-btn-video:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 149, 246, 0.4);
}

.igd-btn-photo {
    background: linear-gradient(135deg, #20c997 0%, #0d8c65 100%);
    box-shadow: 0 4px 16px rgba(32, 201, 151, 0.28);
}

.igd-btn-photo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(32, 201, 151, 0.4);
}

.dl-btn-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.dl-btn-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dl-btn-label {
    font-size: 15px;
    font-weight: 600;
}

.dl-btn-quality {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.22);
    padding: 2px 9px;
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
    letter-spacing: 0.5px;
}

.dl-btn-arrow {
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
    opacity: 0.9;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 600px) {
    .igd-container {
        padding: 28px 18px;
    }

    .igd-input-group {
        flex-direction: column;
    }

    .igd-submit-btn {
        width: 100%;
        justify-content: center;
    }

    .igd-title {
        font-size: 22px !important;
    }

    .igd-dl-btn {
        padding: 15px 18px;
    }

    .dl-btn-icon {
        font-size: 22px;
    }

    .dl-btn-label {
        font-size: 14px;
    }
}

/* ===================================
   AUDIO BUTTON - Special Styling
   =================================== */

/* Audio separator */
.igd-audio-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 4px;
    color: #aaa;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.igd-audio-separator::before,
.igd-audio-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

/* Audio Button */
.igd-btn-audio {
    background: linear-gradient(135deg, #6c5ce7 0%, #a855f7 100%) !important;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3) !important;
    border: none;
    position: relative;
    overflow: hidden;
}

.igd-btn-audio:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 28px rgba(108, 92, 231, 0.45) !important;
}

/* Audio button inner layout */
.audio-btn-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

/* Audio icon wrapper with animated waves */
.audio-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    flex-shrink: 0;
}

.audio-icon {
    font-size: 22px;
    z-index: 2;
    position: relative;
}

/* Animated sound waves */
.audio-waves {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 2px;
    bottom: 10px;
    right: -18px;
    z-index: 1;
}

.audio-waves span {
    display: inline-block;
    width: 3px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 3px;
    animation: wave-bounce 1.2s ease-in-out infinite;
}

.audio-waves span:nth-child(1) {
    height: 6px;
    animation-delay: 0.0s;
}

.audio-waves span:nth-child(2) {
    height: 10px;
    animation-delay: 0.1s;
}

.audio-waves span:nth-child(3) {
    height: 14px;
    animation-delay: 0.2s;
}

.audio-waves span:nth-child(4) {
    height: 10px;
    animation-delay: 0.3s;
}

.audio-waves span:nth-child(5) {
    height: 6px;
    animation-delay: 0.4s;
}

@keyframes wave-bounce {

    0%,
    100% {
        transform: scaleY(0.5);
        opacity: 0.5;
    }

    50% {
        transform: scaleY(1.0);
        opacity: 1.0;
    }
}

/* Audio quality badge */
.quality-audio {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
    font-size: 11px !important;
}

/* Audio arrow style */
.audio-arrow {
    background: rgba(255, 255, 255, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 18px !important;
    flex-shrink: 0;
}

/* ===================================
   VIDEO BUTTON
   =================================== */
.igd-btn-video {
    background: linear-gradient(135deg, #0095f6 0%, #0062cc 100%);
    box-shadow: 0 4px 16px rgba(0, 149, 246, 0.28);
}

.igd-btn-video:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 149, 246, 0.4);
}

/* ===================================
   PHOTO BUTTON
   =================================== */
.igd-btn-photo {
    background: linear-gradient(135deg, #20c997 0%, #0d8c65 100%);
    box-shadow: 0 4px 16px rgba(32, 201, 151, 0.28);
}

.igd-btn-photo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(32, 201, 151, 0.4);
}

/* ===================================
   COMMON BUTTON STYLES
   =================================== */
.igd-dl-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px 22px;
    border-radius: 14px;
    text-decoration: none !important;
    color: #fff !important;
    font-weight: 600;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.dl-btn-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.dl-btn-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dl-btn-label {
    font-size: 15px;
    font-weight: 600;
}

.dl-btn-quality {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.22);
    padding: 2px 9px;
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
}

.dl-btn-arrow {
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 18px !important;
}