/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', 'YouTube Sans', 'Segoe UI', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #FF0000;
    font-weight: 700;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.logo:hover {
    color: #CC0000;
    transform: translateY(-1px);
}

.logo i {
    font-size: 2rem;
    margin-right: 10px;
}

.nav-right {
    display: flex;
    align-items: center;
}

/* Language Switcher - 增强版 */
.lang-switcher {
    position: relative;
}

.lang-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: none !important;
    border: 2px solid #FF0000 !important;
    color: #FF0000 !important;
    padding: 8px 16px !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.lang-toggle:hover {
    background: #FF0000 !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3) !important;
}

.lang-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    min-width: 200px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
    z-index: 1001 !important;
    margin-top: 5px !important;
}

.lang-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.lang-option {
    display: block !important;
    padding: 12px 16px !important;
    color: #333 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.lang-option:last-child {
    border-bottom: none !important;
}

.lang-option:hover {
    background: #FF0000 !important;
    color: white !important;
}

/* Main Content */
.main {
    margin-top: 70px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 50%, #990000 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    /*content: '';*/
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.95;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* Download Form */
.download-form {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.url-input {
    width: 100%;
    padding: 18px 60px 18px 20px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.url-input:focus {
    background: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.url-input::placeholder {
    color: #666;
}

.paste-btn, .clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #FF0000;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 2;
}

.paste-btn:hover, .clear-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.clear-btn {
    right: 50px;
}

.download-btn {
    width: 100%;
    padding: 18px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(45deg, #FF4444, #FF0000);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.download-btn:hover {
    background: linear-gradient(45deg, #FF0000, #CC0000);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 0, 0, 0.4);
}

.download-btn:active {
    transform: translateY(-1px);
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 30px;
    color: white;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    background: rgba(255, 255, 255, 0.95);
    color: #d32f2f;
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid #d32f2f;
    font-weight: 500;
}

/* Video Info */
.video-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    color: #333;
}

.video-preview {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.video-thumbnail {
    width: 200px;
    height: 112px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.video-details {
    flex: 1;
}

.video-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.video-meta {
    color: #666;
    font-size: 0.95rem;
}

.format-options {
    display: grid;
    gap: 15px;
}

.format-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.format-option:hover {
    border-color: #FF0000;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.1);
}

.format-info {
    flex: 1;
}

.format-quality {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.format-details {
    color: #666;
    font-size: 0.9rem;
}

.format-download-btn {
    background: linear-gradient(45deg, #FF0000, #CC0000);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.format-download-btn:hover {
    background: linear-gradient(45deg, #CC0000, #990000);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

/* Features Section */
.features {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.feature-card {
    text-align: center;
    padding: 40px 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FF0000, #CC0000);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.feature-description {
    color: #666;
    line-height: 1.6;
}

/* How To Section */
.how-to {
    padding: 80px 0;
    background: white;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.step-card {
    text-align: center;
    padding: 40px 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FF0000, #CC0000);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 25px;
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.3);
}

.step-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.step-description {
    color: #666;
    line-height: 1.6;
}

/* FAQ Section - 增强版 */
.faq {
    padding: 80px 0;
    background: white;
}

.faq-list {
    max-width: 800px;
    margin: 50px auto 0;
}

.faq-item {
    border: 2px solid #f0f0f0 !important;
    border-radius: 12px !important;
    margin-bottom: 15px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}

.faq-item:hover {
    border-color: rgba(255, 0, 0, 0.3) !important;
}

.faq-item.active {
    border-color: #FF0000 !important;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.1) !important;
}

.faq-question {
    width: 100% !important;
    padding: 20px 25px !important;
    background: none !important;
    border: none !important;
    text-align: left !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: all 0.3s ease !important;
}

.faq-question:hover {
    background: #f8f9fa !important;
}

.faq-question i {
    transition: transform 0.3s ease !important;
    color: #FF0000 !important;
    font-size: 1rem !important;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg) !important;
}

.faq-answer {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    background: #f8f9fa !important;
}

.faq-item.active .faq-answer {
    max-height: 300px !important; /* 增加最大高度以确保内容完全显示 */
}

.faq-answer p {
    padding: 20px 25px !important;
    color: #666 !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* Footer */
.footer {
    background: #212121;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #FF0000;
    margin-bottom: 20px;
}

.footer-logo i {
    font-size: 2rem;
    margin-right: 10px;
}

.footer-description {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #FF0000;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .download-form {
        max-width: 100%;
    }
    
    .video-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .video-thumbnail {
        width: 100%;
        max-width: 300px;
        height: auto;
        margin: 0 auto;
    }
    
    .format-option {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .lang-toggle {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }
    
    .lang-dropdown {
        min-width: 150px !important;
    }
}