/* ==================== 短视频去水印 ==================== */

/* --- Hero 区域 --- */
.wm-hero {
    position: relative;
    min-height: 56vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: calc(var(--navbar-height) + var(--space-lg)) var(--space-sm) var(--space-lg);
    background: var(--bg-dark);
}

.wm-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.wm-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: wmOrbFloat 8s ease-in-out infinite;
}

.wm-gradient-orb.orb-1 {
    width: 420px;
    height: 420px;
    background: var(--primary);
    top: -120px;
    right: -100px;
    animation-delay: 0s;
}

.wm-gradient-orb.orb-2 {
    width: 320px;
    height: 320px;
    background: var(--secondary);
    bottom: -90px;
    left: -80px;
    animation-delay: -3s;
}

.wm-gradient-orb.orb-3 {
    width: 260px;
    height: 260px;
    background: var(--accent);
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -6s;
    opacity: 0.1;
}

@keyframes wmOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.wm-hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.wm-hero-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.wm-hero-title .title-line {
    color: var(--text-primary);
    opacity: 0.9;
}

.wm-hero-title .title-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wm-hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.wm-hero-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    opacity: 0.85;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.8;
}

/* --- 主界面 --- */
.wm-main {
    padding: var(--space-lg) 0 var(--space-xl);
    min-height: 50vh;
}

.wm-generator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: start;
}

.wm-input-section,
.wm-preview-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
}

.wm-input-section .section-title,
.wm-preview-section .section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
}

/* --- 表单 --- */
.wm-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.wm-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wm-form .form-group label {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.wm-form .form-group label .required {
    color: #F85149;
}

.wm-url-input {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 12px 14px;
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color var(--transition-fast);
}

.wm-url-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.15);
}

.form-hint {
    font-size: 0.78rem;
    color: var(--text-secondary);
    opacity: 0.7;
    line-height: 1.4;
}

/* --- 示例 chips --- */
.wm-example-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.wm-chip-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.wm-chip {
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-dark);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.wm-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* --- 解析按钮 --- */
.wm-parse-btn {
    width: 100%;
    justify-content: center;
    gap: 8px;
    padding: 14px 0;
    font-size: 1rem;
}

.wm-parse-btn svg {
    width: 20px;
    height: 20px;
}

.wm-parse-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wm-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 0.78rem;
    color: var(--text-secondary);
    opacity: 0.8;
    line-height: 1.6;
    background: rgba(79, 142, 247, 0.06);
    border: 1px solid rgba(79, 142, 247, 0.18);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.wm-note svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary);
}

/* --- 步骤 --- */
.wm-steps {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.wm-block-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.wm-step-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wm-step-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.wm-step-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(79, 142, 247, 0.15);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 600;
}

/* --- 预览区域 --- */
.wm-preview-card {
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.wm-preview-empty {
    text-align: center;
    padding: var(--space-lg);
}

.wm-empty-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto var(--space-sm);
    color: var(--text-secondary);
    opacity: 0.5;
}

.wm-empty-icon svg {
    width: 100%;
    height: 100%;
}

.wm-preview-empty p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* 加载 */
.wm-preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: wmSpin 0.8s linear infinite;
}

@keyframes wmSpin {
    to { transform: rotate(360deg); }
}

/* 错误 */
.wm-preview-error {
    text-align: center;
    padding: var(--space-lg);
}

.wm-error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-sm);
    color: #F85149;
    opacity: 0.85;
}

.wm-error-icon svg {
    width: 100%;
    height: 100%;
}

.wm-error-msg {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 300px;
}

/* 结果 */
.wm-preview-result {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.wm-result-cover {
    width: 100%;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    line-height: 0;
    box-shadow: var(--shadow-md);
}

.wm-video {
    width: 100%;
    max-height: 420px;
    display: block;
    background: #000;
}

/* --- 内容类型标签 --- */
.wm-type-tag {
    align-self: flex-start;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: #fff;
    margin-bottom: -4px;
}

/* --- 图集 --- */
.wm-images {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.wm-image-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-dark);
    line-height: 0;
}

.wm-image-item a {
    display: block;
}

.wm-image-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-fast);
}

.wm-image-item:hover img {
    transform: scale(1.04);
}

/* --- 音乐播放器 --- */
.wm-audio-wrap {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    box-sizing: border-box;
}

.wm-audio {
    width: 100%;
    display: block;
    outline: none;
}

.wm-result-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.wm-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wm-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    background: var(--bg-dark);
}

.wm-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wm-author-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.wm-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wm-platform-tag {
    font-size: 0.72rem;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    background: rgba(79, 142, 247, 0.15);
    color: var(--primary);
    font-weight: 500;
}

.wm-like {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.wm-result-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.6;
    word-break: break-word;
}

.wm-time-row,
.wm-music-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.wm-time-row svg,
.wm-music-row svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.8;
}

.wm-music-row strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 操作按钮 */
.wm-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
}

.wm-actions .btn {
    gap: 6px;
}

.wm-actions .btn svg {
    width: 16px;
    height: 16px;
}

/* --- Toast --- */
.wm-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    z-index: 9999;
    opacity: 0;
    transition: all var(--transition-normal);
    max-width: 90vw;
}

.wm-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.wm-toast.success {
    border-color: #2EA043;
}

.wm-toast.success::before {
    content: '✓ ';
    color: #2EA043;
}

.wm-toast.error {
    border-color: #F85149;
}

.wm-toast.error::before {
    content: '✕ ';
    color: #F85149;
}

/* --- 支持平台 --- */
.wm-platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: var(--space-sm);
}

.wm-platform-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: var(--space-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.wm-platform-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.wm-platform-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

.wm-platform-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* --- 常见问题 --- */
.wm-faq-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    max-width: 980px;
    margin: 0 auto;
}

.wm-faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.wm-faq-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.wm-faq-item p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- 响应式：平板及以下 --- */
@media (max-width: 768px) {
    .wm-generator-layout {
        grid-template-columns: 1fr;
    }

    .wm-hero {
        min-height: 30vh;
        padding: calc(var(--navbar-height) + var(--space-sm)) var(--space-xs) var(--space-sm);
    }

    .wm-hero-title {
        font-size: clamp(1.4rem, 5vw, 1.8rem);
    }

    .wm-hero-subtitle {
        font-size: 0.95rem;
    }

    .wm-hero-desc {
        font-size: 0.8rem;
        max-width: 340px;
        line-height: 1.6;
    }

    .wm-main {
        padding: var(--space-sm) 0 var(--space-md);
    }

    .wm-input-section,
    .wm-preview-section {
        padding: 10px;
        border-radius: var(--radius-sm);
    }

    .wm-input-section .section-title,
    .wm-preview-section .section-title {
        font-size: 1rem;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    .wm-url-input {
        padding: 9px 11px;
        font-size: 0.85rem;
    }

    .wm-example-chips {
        gap: 5px;
    }

    .wm-chip {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .wm-parse-btn {
        padding: 11px 0;
        font-size: 0.92rem;
    }

    .wm-preview-card {
        min-height: 220px;
    }

    .wm-preview-empty {
        padding: var(--space-sm);
    }

    .wm-empty-icon {
        width: 52px;
        height: 52px;
    }

    .wm-preview-empty p {
        font-size: 0.8rem;
    }

    .wm-video {
        max-height: 300px;
    }

    .wm-images {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
        gap: 8px;
    }

    .wm-faq-list {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .wm-platforms-grid {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    }

    .wm-platform-logo {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }

    .wm-platform-name {
        font-size: 0.82rem;
    }
}

/* --- 手机端进一步压缩 --- */
@media (max-width: 480px) {
    .wm-hero {
        min-height: 24vh;
        padding: calc(var(--navbar-height) + 10px) 8px 8px;
    }

    .wm-hero-title {
        font-size: 1.3rem;
        gap: 2px;
    }

    .wm-hero-subtitle {
        font-size: 0.85rem;
    }

    .wm-hero-desc {
        display: none;
    }

    .wm-main {
        padding: 6px 0 var(--space-sm);
    }

    .wm-generator-layout {
        gap: 8px;
    }

    .wm-input-section,
    .wm-preview-section {
        padding: 8px;
        border-radius: 8px;
    }

    .wm-input-section .section-title,
    .wm-preview-section .section-title {
        font-size: 0.92rem;
        margin-bottom: 6px;
        padding-bottom: 4px;
    }

    .wm-url-input {
        padding: 7px 9px;
        font-size: 0.82rem;
        rows: 3;
    }

    .wm-form .form-group label {
        font-size: 0.82rem;
    }

    .form-hint {
        font-size: 0.7rem;
    }

    .wm-chip {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    .wm-parse-btn {
        padding: 9px 0;
        font-size: 0.86rem;
    }

    .wm-parse-btn svg {
        width: 16px;
        height: 16px;
    }

    .wm-note {
        font-size: 0.7rem;
        padding: 8px 10px;
    }

    .wm-step-list li {
        font-size: 0.8rem;
    }

    .wm-preview-card {
        min-height: 160px;
    }

    .wm-empty-icon {
        width: 38px;
        height: 38px;
    }

    .wm-preview-empty p {
        font-size: 0.72rem;
    }

    .wm-video {
        max-height: 240px;
    }

    .wm-author-name {
        font-size: 0.85rem;
    }

    .wm-author-avatar {
        width: 34px;
        height: 34px;
    }

    .wm-result-title {
        font-size: 0.85rem;
    }

    .wm-time-row,
    .wm-music-row {
        font-size: 0.76rem;
    }

    .wm-actions {
        flex-direction: column;
        width: 100%;
    }

    .wm-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 9px 0;
        font-size: 0.82rem;
    }

    .wm-platforms-grid {
        grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
        gap: 6px;
    }

    .wm-platform-logo {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .wm-platform-name {
        font-size: 0.75rem;
    }

    .wm-faq-item {
        padding: 10px;
    }

    .wm-faq-item h3 {
        font-size: 0.9rem;
    }

    .wm-faq-item p {
        font-size: 0.8rem;
    }

    .wm-toast {
        bottom: 16px;
        padding: 8px 16px;
        font-size: 0.8rem;
        text-align: center;
    }
}
