* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f7f9fc;
    min-height: 100vh;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 15px 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.top-nav a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 600;
}

.top-nav a:hover {
    color: #4f46e5;
    text-decoration: none;
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 20px;
}

.lang-btn {
    background: #fff;
    color: #333;
    padding: 8px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.lang-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.lang-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 400px;
    /* Wider for 2 columns */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    z-index: 1000;
    border: 1px solid #e2e8f0;
    flex-direction: row;
    /* Allow columns side by side */
}

.lang-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lang-content a {
    color: #475569;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 0.85rem;
    white-space: nowrap;
    border-bottom: 1px solid #f1f5f9;
}

.lang-content a:last-child {
    border-bottom: none;
}

.lang-content a:hover {
    background-color: #f8fafc;
    text-decoration: none;
    color: #4f46e5;
}

/* .lang-dropdown:hover .lang-content {
    display: flex;
} */

.lang-content.show {
    display: flex;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 50px;
    padding-top: 60px;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    background-clip: text;
    /* Fix lint */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    font-weight: 400;
    color: #64748b;
}

.download-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    margin-bottom: 50px;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
    /* Ensure stacking context */
}

.input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 6.5rem 1rem 1.5rem;
    border: 2px solid #6366f1;
    /* Strong Border */
    border-radius: 12px;
    background: #f1f5f9;
    /* Soft Gray */
    color: #1e293b;
    font-size: 1.1rem;
    /* Larger Text */
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Glow + Shadow */
}

.input-wrapper input:focus {
    border-color: #4338ca;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25), 0 8px 20px rgba(0, 0, 0, 0.1);
}

.paste-btn {
    position: absolute;
    right: 8px;
    /* Slightly closer to edge */
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #667eea;
    cursor: pointer;
    /* width: 36px; Removed fixed width */
    height: 36px;
    padding: 0 12px;
    /* Horizontal padding for text */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* Space between icon and text */
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    /* Bold text */
    font-family: inherit;
    /* Use site font */
    font-size: 0.9rem;
}

.paste-btn span {
    display: inline-block;
}

.paste-btn:hover {
    background: #ffffff;
    color: #764ba2;
    transform: translateY(-50%) scale(1.05);
    /* Slightly less zoom */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.input-group input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

#videoUrl {
    flex: 1;
    padding: 18px 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    color: #333;
    transition: all 0.3s;
}

#videoUrl:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.btn-primary {
    padding: 18px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.loading-state {
    text-align: center;
    padding: 30px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.video-info {
    padding: 20px 0;
}

.video-preview {
    display: flex;
    flex-direction: column;
    /* Stack vertically */
    gap: 20px;
    align-items: center;
    margin-bottom: 25px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

#videoThumbnail {
    width: 100%;
    max-width: 480px;
    /* Larger Thumbnail */
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.video-details h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: #334155;
    /* Dark Text */
    font-weight: 700;
}

.video-details p {
    color: #64748b;
    font-size: 1rem;
}

.quality-selector {
    margin-bottom: 15px;
}

.quality-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 16px;
}

#qualitySelect {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 16px;
    cursor: pointer;
}

.error-msg {
    padding: 15px 20px;
    background: rgba(239, 68, 68, 0.9);
    border-radius: 10px;
    margin-top: 15px;
    font-weight: 500;
}

.hidden {
    display: none !important;
}

.supported-platforms {
    text-align: center;
    margin: 60px 0;
}

.supported-platforms h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.platform-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    transition: all 0.3s;
    cursor: default;
}

.platform-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
}

.platform-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
}

.platform-icon.youtube {
    background: #FF0000;
}

.platform-icon.tiktok {
    background: #000000;
}

.platform-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.platform-icon.facebook {
    background: #1877F2;
}

.platform-icon.twitter {
    background: #000000;
}

.platform-icon.vimeo {
    background: #1ab7ea;
}

.platform-item span {
    display: block;
    font-weight: 600;
    font-size: 16px;
}

.platform-icon.twitch {
    background: #9146FF;
}

.platform-icon.dailymotion {
    background: #0066DC;
}

.platform-icon.bilibili {
    background: #00A1D6;
}

.platform-icon.niconico {
    background: #231815;
}

.platform-icon.netflix {
    background: #E50914;
}

.platform-icon.douyin {
    background: linear-gradient(45deg, #000000 0%, #242424 100%);
    border: 1px solid #333;
}

.platform-icon.reddit {
    background: #FF5700;
}

.platform-icon.soundcloud {
    background: #ff5500;
}

.platform-icon.spotify {
    background: #1DB954;
}

.platform-icon.bandcamp {
    background: #629aa9;
}

.platform-icon.applemusic {
    background: #FA243C;
}

footer {
    text-align: center;
    padding: 40px 0;
    opacity: 0.8;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .input-group {
        flex-direction: column;
    }

    .download-card {
        padding: 25px;
    }

    .video-preview {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Disclaimer & Tooltip */
.disclaimer-text {
    font-size: 0.8rem;
    color: #222;
    /* Black color as requested */
    font-weight: 500;
    /* Slightly bolder to be readable */
    text-align: center;
    margin-top: -1.5rem;
    /* Pull closer to input */
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0.8;
    position: relative;
    /* Create stacking context */
    z-index: 1000;
    /* Ensure it sits above input group */
}

.tooltip-container {
    position: relative;
    display: flex;
    align-items: center;
}

.info-icon {
    cursor: help;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.info-icon:hover {
    opacity: 1;
}

/* App Promo Section */
.app-promo-section {
    margin: 2rem auto;
    text-align: center;
    padding: 1.5rem;
    background: #eef2ff;
    border-radius: 12px;
    border: 1px solid #c7d2fe;
    max-width: 600px;
}

.btn-app-promo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    text-decoration: none;
    margin-bottom: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-app-promo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5);
    color: white;
    text-decoration: none;
}

.app-promo-note {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}

.app-promo-note strong {
    color: #4338ca;
}

/* Footer SEO Links */
.seo-link {
    color: #475569;
    text-decoration: none;
    transition: color 0.2s;
}

.seo-link:hover {
    color: #6366f1;
    text-decoration: underline;
}

/* Ad Placeholders (Temporarily Hidden) */
.ad-placeholder {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 728px;
    height: 90px;
    background-color: #f8fafc;
    border: 2px dashed #e2e8f0;
    margin: 2rem auto;
    color: #94a3b8;
    font-size: 0.85rem;
    border-radius: 8px;
}

.tooltip-content {
    visibility: hidden;
    opacity: 0;
    width: 300px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 12px;
    position: absolute;
    z-index: 100;
    bottom: 45px;
    /* Position to cover the element above */
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    font-size: 0.75rem;
    line-height: 1.4;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
    /* Prevent flickering */
}

/* Tooltip Arrow */
.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    /* At the bottom of the tooltip */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Show Tooltip on Hover */

/* Blog Typography */
.blog-container h2 {
    font-size: 1.8rem;
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.blog-container h3 {
    font-size: 1.4rem;
    color: #334155;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.blog-container p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 1.5rem;
}

.blog-container ul, .blog-container ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-container li {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
    color: #334155;
}

.blog-container a {
    color: #6366f1;
    text-decoration: underline;
}

.blog-container a:hover {
    color: #4f46e5;
}