* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    padding: 20px;
    color: #1f2937;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

/* 返回主页按钮 */
.back-home {
    position: absolute;
    top: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 25px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.back-home:hover {
    background: #667eea;
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.back-home svg {
    transition: transform 0.3s ease;
}

.back-home:hover svg {
    transform: translateX(-3px);
}

header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    backdrop-filter: blur(10px);
    color: #1f2937;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1em;
    color: #6b7280;
    position: relative;
    z-index: 1;
}

main {
    padding: 30px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

/* 输入区域 */
.input-section {
    margin-bottom: 30px;
}

.input-wrapper {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.input-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.input-icon {
    color: #667eea;
}

.input-header label {
    font-weight: 600;
    color: #1f2937;
    font-size: 1em;
}

#videoUrl {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: white;
    color: #1f2937;
    margin-bottom: 16px;
}

#videoUrl:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#videoUrl::placeholder {
    color: #9ca3af;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-download {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    padding: 10px 20px;
    font-size: 0.9em;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
    width: 100%;
    margin-top: 20px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
}

/* 支持平台 */
.platforms {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.platforms h3 {
    font-size: 1em;
    color: #1f2937;
    margin-bottom: 16px;
    font-weight: 600;
}

.platform-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.platform-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    font-size: 0.9em;
    color: #374151;
}

.platform-item:hover {
    background: #eef2ff;
    border-color: #667eea;
    transform: translateY(-2px);
}

.platform-icon {
    font-size: 1.5em;
}

/* 加载状态 */
.loading-section {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    margin-bottom: 30px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-section p {
    color: #6b7280;
    font-size: 1em;
}

/* 结果展示 */
.result-section {
    margin-bottom: 30px;
}

.result-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.video-info {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.video-cover {
    position: relative;
    width: 200px;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-cover:hover .play-icon {
    background: rgba(102, 126, 234, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-details h3 {
    font-size: 1.3em;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 0.9em;
}

.meta-item svg {
    color: #9ca3af;
}

.video-description {
    color: #6b7280;
    line-height: 1.6;
    font-size: 0.95em;
}

/* 下载选项 */
.download-options h4 {
    font-size: 1.1em;
    color: #1f2937;
    margin-bottom: 16px;
    font-weight: 600;
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.download-item:hover {
    background: #f3f4f6;
    border-color: #667eea;
}

.download-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quality-badge {
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
}

.download-label {
    color: #374151;
    font-weight: 500;
}

/* 信息卡片 */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.info-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-bottom: 1px solid #e5e7eb;
}

.info-icon {
    font-size: 1.5em;
}

.info-header h3 {
    color: #1f2937;
    font-size: 1.1em;
    font-weight: 600;
}

.info-content {
    padding: 20px;
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-item {
    display: flex;
    gap: 16px;
}

.step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.step-text strong {
    display: block;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 4px;
}

.step-text p {
    color: #6b7280;
    font-size: 0.9em;
    line-height: 1.5;
}

.tips-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tips-list li {
    padding-left: 24px;
    position: relative;
    color: #6b7280;
    font-size: 0.9em;
    line-height: 1.6;
}

.tips-list li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #667eea;
    font-weight: bold;
    font-size: 1.2em;
}

/* 底部 */
footer {
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.8), rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(10px);
    color: #6b7280;
    padding: 24px;
    text-align: center;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.footer-content p {
    margin: 0;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 12px;
    }

    .back-home {
        position: static;
        margin: 15px;
        display: inline-flex;
    }

    header {
        padding: 30px 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    main {
        padding: 20px;
    }

    .input-wrapper {
        padding: 20px;
    }

    .video-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .video-cover {
        width: 100%;
        height: 400px;
    }

    .download-item {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .download-item .btn {
        width: 100%;
    }

    .info-section {
        grid-template-columns: 1fr;
    }

    .platform-list {
        grid-template-columns: repeat(2, 1fr);
    }
}