/* YouTube Downloader Styles */
.yt1-GoBack-btn {
    background: #03b0ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.yt1-GoBack-btn:hover {
    background: #0288d1;
    color: white;
}

.yt1-downloader-container {
    background-color: #84d2f6;
    border-radius: 20px;
    min-height: 460px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.yt1-downloader-card {
    background: white;
    border-radius: 20px;
    box-shadow: rgba(0, 0, 0, 0.08) 0px 1px 20px;
    padding: 2.5rem;
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.yt1-title {
    color: #333;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.yt1-subtitle {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.yt1-search-container {
    margin: 0 auto 1.5rem;
    max-width: 600px;
    width: 100%;
}

.yt1-input-group {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 20px;
}

@media (max-width: 768px) {
    .yt1-input-group {
        flex-direction: column;
        gap: 10px;
    }

    svg.yt1-paste-icon {
        width: 46px;
        right: 15px;
    }

    svg.yt1-paste-icon {
        right: 0 !important;
        top: 0 !important;
        height: unset !important;
    }

    .yt1-download-more-btn {
        padding: 5px 30px !important;
    }
}

.yt1-search-input {
    padding: 1rem 3rem 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.yt1-formats-table svg {
    width: 15px;
}

.yt1-search-input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.yt1-input-icon {
    position: absolute;
    right: 65px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
    background: #f7f8f9;
}

.yt1-input-icon:hover {
    color: #4a90e2;
}

.yt1-search-button {
    background: #84d2f6;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: 50px;
}

@media (min-width: 769px) {
    .yt1-search-button {
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        border-radius: 0 50px 50px 0;
        width: auto;
    }
}

@media (max-width: 768px) {
    .yt1-search-button {
        width: 100%;
        margin-top: 10px;
    }
}

.yt1-search-button:hover {
    background: #3a7bc8;
}

.yt1-search-button i {
    font-size: 1.2rem;
}

.yt1-disclaimer {
    color: #888;
    font-size: 0.85rem;
    margin: 1.5rem 0 0;
}

.yt1-disclaimer i {
    color: #4a90e2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .yt1-downloader-card {
        padding: 1.5rem;
    }

    .yt1-title {
        font-size: 1.5rem;
    }

    .yt1-subtitle {
        font-size: 0.9rem;
    }
}

/* Add animation for the search button */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.yt1-search-button:active {
    animation: pulse 0.3s ease;
}


/* Video Container */
.yt1-video-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Video Info Section */
.yt1-video-info {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
}

.yt1-thumbnail {
    position: relative;
    width: 240px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.yt1-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.yt1-duration {
    padding: 3px 8px;
    font-size: 16px;
    font-weight: 500;
}

.yt1-details {
    flex-grow: 1;
}

.yt1-video-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.yt1-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

/* Formats Section */
.yt1-formats-section {
    margin-bottom: 30px;
}

.yt1-section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.yt1-formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

/* Format Card */
.yt1-format-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.yt1-format-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.yt1-format-quality {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.yt1-format-type {
    background: #f0f4ff;
    color: #4a6bff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.yt1-format-size {
    color: #666;
    font-size: 14px;
}

.yt1-download-btn:hover,
.yt1-download-more-btn:hover {
    background: #0288d1;
    color: white;
}

/* Error Message */
.yt1-error-message {
    text-align: center;
    padding: 30px;
    background: #fff8f8;
    border-radius: 8px;
    color: #e74c3c;
}

.yt1-error-message i {
    font-size: 36px;
    margin-bottom: 15px;
    display: block;
}

.yt1-error-message p {
    margin: 0;
    font-size: 16px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .yt1-video-info {
        flex-direction: column;
    }

    .yt1-thumbnail {
        width: 100%;
    }

    .yt1-formats-grid {
        grid-template-columns: 1fr;
    }
}

/* Two Column Layout */
.yt1-two-column-layout {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.yt1-formats-column {
    flex: 2;
}

.yt1-video-column {
    flex: 1;
    max-width: 400px;
}

/* Formats Table */
.yt1-formats-table {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0;
}

.yt1-formats-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0px;
}

.yt1-formats-table th,
.yt1-formats-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    text-align: center;
}

.yt1-formats-table th:last-child,
.yt1-formats-table td:last-child {
    border-right: none;
}

.yt1-formats-table tr:last-child td {
    border-bottom: none;
}

.yt1-formats-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.yt1-formats-table tr:last-child td {
    border-bottom: none;
}

.yt1-formats-table tr:hover {
    background-color: #f9f9f9;
}

/* Video Preview */
.yt1-video-preview {
    background: #fff;
    border-radius: 0;
    padding: 20px;
    position: sticky;
    top: 20px;
    /* border: 1px solid rgba(0, 0, 0, .1); */
}

.yt1-thumbnail {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.yt1-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.yt1-video-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.yt1-meta {
    font-size: 14px;
    color: #666;
}

/* Download Button */
.yt1-download-btn,
.yt1-download-more-btn {
    background: #03b0ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    transition: background-color 0.2s ease;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}

input.yt1-search-input {
    border-radius: 30px 30px 30px 30px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .yt1-two-column-layout {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .yt1-formats-column {
        order: 1;
    }

    .yt1-video-column {
        order: 2;
    }
}

/* Error Message */
.yt1-error-message {
    text-align: center;
    padding: 30px;
    background: #fff8f8;
    border-radius: 8px;
    color: #e74c3c;
    margin: 20px;
}

.yt1-error-message i {
    font-size: 36px;
    margin-bottom: 15px;
    display: block;
}

.yt1-error-message p {
    margin: 0;
    font-size: 16px;
}

.yt1-download-btn,
.yt1-download-more-btn {
    /* display: flex; */
    /* align-items: center; */
    gap: 4px;
}

p.yt1-disclaimer svg {
    width: 15px;
}

button.yt1-search-button svg {
    width: 20px;
}

svg.yt1-paste-icon {
    position: absolute;
    width: 47px;
    right: 60px;
    z-index: 1;
    top: 0;
    height: 100%;
    background: #f7f8f9;
    padding: 10px;
    cursor: pointer;
}

.yt1-formats-table .audio svg {
    vertical-align: middle;
}

@media (max-width: 500px) {
    .yt1-downloader-card {
        padding: 20px 5px;
    }

    .yt1-download-btn,
    .yt1-download-more-btn {
        flex-direction: column-reverse;
    }

    .yt1-downloader-container {
        padding: 15px;
    }

    .yt1-two-column-layout {
        padding: 0px;
    }

    .yt1-formats-table td {
        padding: 5px;
    }

    .yt1-search-button {
        padding: 15px;
        position: relative;
        width: 100%;
        margin-top: 10px;
        height: auto;
    }

    .yt1-input-group {
        flex-direction: column;
    }

    .yt1-search-input {
        padding-right: 15px;
    }

    div#content {
        padding: 10px;
    }
}

/* media for 320 very small */
@media (max-width: 350px) {
    .site.grid-container.container .inside-article {
        padding: 10px;
    }
}

/* =====================================================================
   YT Download — Apple-style processing modal
   Shown after user clicks Download. Cross button + outside-click are
   disabled while processing, enabled at 100%.
   ===================================================================== */

.yt-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    padding: 20px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif;
}

.yt-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.yt-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 28px 24px;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.22),
        0 8px 24px rgba(0, 0, 0, 0.08);
    transform: scale(0.92) translateY(10px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    position: relative;
    text-align: center;
    box-sizing: border-box;
}

.yt-modal-overlay.active .yt-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Close button — hidden while processing, shown when 100% */
.yt-modal-close {
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f2f2f7;
    border: none;
    color: #8e8e93;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, color 0.2s ease;
    z-index: 2;
}

.yt-modal-close.enabled {
    display: flex;
}

.yt-modal-close:hover {
    background: rgba(3, 176, 255, 0.12);
    color: #03b0ff;
}

.yt-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 28px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    padding: 0 16px;
    letter-spacing: -0.022em;
}

.yt-progress-percent {
    font-size: 15px;
    font-weight: 600;
    color: #03b0ff;
    margin: 0 0 10px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    font-feature-settings: 'tnum';
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}

.yt-progress-percent.done {
    color: #16a34a;
}

.yt-progress-wrap {
    background: #d2d2d7;
    border-radius: 999px;
    height: 8px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.yt-progress-bar {
    background: linear-gradient(90deg, #03b0ff 0%, #84d2f6 50%, #03b0ff 100%);
    background-size: 200% 100%;
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: yt-progress-flow 2.5s linear infinite;
}

.yt-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.55),
            transparent);
    animation: yt-progress-shine 2s infinite;
    border-radius: 999px;
}

.yt-progress-wrap.indeterminate {
    background: linear-gradient(90deg,
            #d2d2d7 0%,
            #d2d2d7 30%,
            #ffffff 50%,
            #d2d2d7 70%,
            #d2d2d7 100%);
    background-size: 220% 100%;
    animation: yt-grey-shimmer 1.6s ease-in-out infinite;
}

@keyframes yt-progress-flow {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 0%;
    }
}

@keyframes yt-progress-shine {
    0% {
        transform: translateX(-100%);
    }

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

@keyframes yt-grey-shimmer {
    0% {
        background-position: 110% 0%;
    }

    100% {
        background-position: -110% 0%;
    }
}

.yt-progress-error {
    display: none;
    font-size: 14px;
    font-weight: 500;
    color: #dc2626;
    line-height: 1.5;
    padding: 8px 0 4px;
}

.yt-progress-error.show {
    display: block;
}

.yt-final-btn {
    display: none;
    background: #03b0ff;
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 40px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    letter-spacing: -0.01em;
}

.yt-final-btn.show {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.yt-final-btn:hover {
    background: #0288d1;
    color: #ffffff !important;
    text-decoration: none !important;
}

.yt-final-btn:active {
    transform: translateY(0);
}

.yt-thankyou {
    display: none;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 14px;
    color: #8e8e93;
    line-height: 1.55;
    letter-spacing: -0.01em;
}

.yt-thankyou.show {
    display: block;
}

.yt-thankyou strong {
    background: linear-gradient(135deg, #03b0ff 0%, #84d2f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.yt-thankyou span {
    display: inline-block;
    margin-top: 4px;
    color: #c7c7cc;
    font-size: 13px;
}

@media (max-width: 480px) {
    .yt-modal {
        padding: 26px 20px 20px;
        border-radius: 14px;
    }

    .yt-modal-title {
        font-size: 15px;
        padding: 0 12px;
    }

    .yt-progress-percent {
        font-size: 14px;
    }

    .yt-final-btn {
        padding: 12px 40px;
        font-size: 16px;
    }
}