/* 视频下载器 - 样式文件 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #10b981;
    --error-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

main {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

/* 输入区域 */
.input-section {
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--primary-color);
}

input[type="text"]::placeholder {
    color: var(--text-secondary);
}

/* 按钮样式 */
button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.btn-download {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.btn-download:hover {
    background: var(--primary-hover);
}

.btn-success {
    display: inline-block;
    background: var(--success-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* 视频信息区域 */
.video-info {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.info-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.thumbnail {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.info-details {
    flex: 1;
    min-width: 0;
}

.info-details h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.platform-tag {
    background: #e0f2fe;
    color: #0284c7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

/* 下载选项 */
.download-options {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
}

.option-group {
    margin-bottom: 1rem;
}

.option-group:last-of-type {
    margin-bottom: 0;
}

.option-group label:first-child {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 下拉菜单 */
select {
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

select:focus {
    border-color: var(--primary-color);
}

/* 进度条 */
.progress-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.progress-bar {
    height: 12px;
    background: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #3b82f6);
    border-radius: 6px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-detail {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.download-link {
    margin-top: 1rem;
    text-align: center;
}

/* 错误消息 */
.error-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: var(--error-color);
    font-size: 0.875rem;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 页脚 */
footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* 响应式 */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

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

    .input-group button {
        width: 100%;
    }

    .info-header {
        flex-direction: column;
    }

    .thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }

    .radio-group {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ClipPort: a focused, accessible free download flow. */
:root { --primary-color: #107b65; --primary-hover: #09604f; --bg-color: #f5f7f4; --text-primary: #182c29; --text-secondary: #576c66; --border-color: #dce5df; }
body { background: radial-gradient(ellipse at 50% 0%, #e3eee4 0, transparent 55%), var(--bg-color); }
.container { max-width: 1040px; padding: 0 32px 32px; }
.site-nav { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border-color); }
.wordmark { color: var(--text-primary); font-size: 25px; font-weight: 800; letter-spacing: -1px; text-decoration: none; }
.wordmark:first-letter { color: var(--primary-color); }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 13px; }
.nav-links a:hover { color: var(--primary-color); }
header { position: relative; padding: 66px 0 24px; margin-bottom: 26px; }
header h1 { font-size: clamp(28px, 4.5vw, 46px); letter-spacing: -1.8px; line-height: 1.25; margin-bottom: 18px; }
.eyebrow { color: var(--primary-color); font-size: 11px; letter-spacing: 2px; font-weight: 700; margin-bottom: 22px; }
.platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.platforms span { padding: 5px 14px; border: 1px solid var(--border-color); background: #ffffff80; border-radius: 30px; font-size: 12px; }
header .lang-switcher { top: 16px; right: 0; }
header .lang-switcher select { width: 120px; background: transparent; color: var(--text-secondary); border-color: var(--border-color); font-size: 12px; }
main { padding: 32px; border: 1px solid var(--border-color); border-radius: 20px; box-shadow: 0 16px 44px #1e3d2910; }
.input-label { display: block; font-size: 14px; font-weight: 650; margin-bottom: 12px; }
.trial-notice { margin-bottom: 18px; padding: 14px 18px; background: #fff6e4; color: #73521c; border: 1px solid #efdfbd; border-radius: 12px; font-size: 13px; }
.input-group { gap: 10px; }
.input-group input { min-width: 0; border-width: 1px; padding: 16px; background: #fafcf9; }
.input-hint { font-size: 12px; color: var(--text-secondary); margin-top: 12px; }
.input-section { margin-bottom: 0; }
.btn-primary { white-space: nowrap; }
.thumbnail { width: 76px; height: 76px; display: grid; place-items: center; background: #edf5ee; font-size: 26px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 42px 12px; }
.step-number { display: inline-block; color: var(--primary-color); font-size: 12px; font-weight: 700; margin-bottom: 12px; }
.steps h2 { font-size: 15px; margin-bottom: 8px; }
.steps p { font-size: 13px; color: var(--text-secondary); }
.faq { border-top: 1px solid var(--border-color); padding-top: 28px; }
.faq h2 { font-size: 20px; margin-bottom: 16px; }
.faq details { border-bottom: 1px solid var(--border-color); padding: 16px 0; font-size: 14px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--text-secondary); margin-top: 12px; max-width: 780px; }
footer { margin-top: 32px; font-size: 12px; }
.independent-note { margin-top: 8px; font-size: 11px; }
:focus-visible { outline: 3px solid #44b09c; outline-offset: 3px; }
button:disabled { opacity: .65; cursor: wait; }
@media (max-width: 640px) {
    .container { padding: 0 18px 24px; }
    .site-nav { min-height: 74px; gap: 12px; }
    .wordmark { font-size: 22px; }
    .nav-links { gap: 12px; }
    .nav-links a { font-size: 11px; }
    header { padding-top: 72px; }
    main { padding: 22px 18px; border-radius: 16px; }
    .steps { gap: 24px; grid-template-columns: 1fr; padding: 32px 4px; }
    .steps article { display: grid; grid-template-columns: 32px 1fr; column-gap: 10px; }
    .step-number { grid-row: span 2; padding-top: 2px; }
    .thumbnail { width: 64px; height: 64px; aspect-ratio: auto; }
    .info-header { flex-direction: row; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* Ad documents are isolated from downloader inputs and session tokens. */
.advertisement { margin: 28px 0; padding: 12px 0; text-align: center; border-top: 1px solid #dce5df; border-bottom: 1px solid #dce5df; }
.advertisement[hidden] { display: none; }
.ad-label { margin: 0 0 10px; font-size: 12px; color: #66756c; }
.ad-disclosure { margin: 10px 12px 0; font-size: 12px; color: #66756c; }
.ad-frame { display: block; border: 0; margin: 0 auto; max-width: 100%; }
.ad-frame-native { width: 100%; }
@media (max-width: 767px) {
    .advertisement { margin-left: -18px; margin-right: -18px; }
}
