/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 色彩系统 */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    --primary-color: #667eea;
    --primary-dark: #5a6fd8;
    --secondary-color: #f093fb;
    --accent-color: #ff6b6b;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-light: #a0aec0;
    --bg-white: #ffffff;
    --bg-light: #f7fafc;
    --bg-lighter: #edf2f7;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);
    
    /* 间距系统 */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* 字体大小 */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    min-width: 320px;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #ffb7c5 0%, #ffccd5 50%, #ffc0cb 100%);
    min-height: 100vh;
    font-size: var(--text-base);
    width: 100%;
    min-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

/* 樱花背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: bgShift 15s ease-in-out infinite;
}

@keyframes bgShift {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* 樱花花瓣容器 */
.sakura-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
}

/* 单个樱花花瓣 */
.sakura-petal {
    position: absolute;
    background: linear-gradient(135deg, #ffb7c5 0%, #ffc0cb 100%);
    border-radius: 100% 0 100% 0;
    opacity: 0.8;
    animation: sakura-fall linear infinite;
    pointer-events: none;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(255, 183, 197, 0.4);
}

@keyframes sakura-fall {
    0% {
        transform: translateY(-20px) rotate(0deg) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.9;
    }
    50% {
        opacity: 0.9;
    }
    90% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(110vh) rotate(720deg) translateX(100px);
        opacity: 0;
    }
}

/* 确保内容在樱花之上 */
header, main, footer {
    position: relative;
    z-index: 1;
}

/* 桌面端优化 (769px 以上) */
@media (min-width: 769px) {
    /* 全局布局优化 */
    body {
        background: linear-gradient(135deg, #ffb7c5 0%, #ffccd5 50%, #ffc0cb 100%);
    }
    
    /* 头部导航优化 */
    header {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(20px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    nav {
        max-width: 1200px;
        margin: 0 auto;
        padding: 1.25rem 2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        flex-shrink: 0;
    }
    
    .logo h1 {
        font-size: 1.75rem;
        font-weight: 700;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin: 0;
    }
    
    .nav-links {
        background: rgba(255, 255, 255, 0.5);
        border-radius: 16px;
        padding: 0.5rem 1.25rem;
        gap: 0.75rem;
        display: flex;
        align-items: center;
    }
    
    .nav-links a {
        padding: 0.75rem 1.5rem;
        border-radius: 10px;
        font-weight: 500;
        font-size: 0.95rem;
        transition: all 0.3s ease;
        background: transparent;
        color: #555;
        text-decoration: none;
        white-space: nowrap;
    }
    
    .nav-links a:hover {
        background: rgba(102, 126, 234, 0.1);
        color: #667eea;
        transform: translateY(-1px);
    }
    
    .nav-links a.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #fff;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    
    /* 主容器优化 */
    .container {
        max-width: 100%;
        margin: 0;
        padding: 2rem 1rem 4rem;
        min-height: calc(100vh - 200px);
    }
    
    /* 卡片优化 */
    .card {
        background: transparent !important;
        backdrop-filter: none;
        border-radius: 0;
        box-shadow: none;
        border: none;
        padding: 0;
        margin-bottom: 2rem;
        animation: none;
    }
    
    .card-header {
        text-align: center;
        margin-bottom: 2.5rem;
        background: transparent;
        padding: 1rem;
        border-radius: 0;
        box-shadow: none;
        max-width: 100%;
    }
    
    .card-header h2 {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 0.75rem;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .card-header .subtitle {
        font-size: 1rem;
        color: #666;
        line-height: 1.6;
    }
    
    /* 输入区域优化 */
    .link-input-wrapper {
        max-width: 100%;
        margin: 2rem 1rem;
        background: transparent;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
    }
    
    .link-input-container {
        display: flex;
        gap: 1rem;
        align-items: stretch;
        max-width: 100%;
    }
    
    .link-input-container {
        display: flex;
        gap: 1rem;
        align-items: stretch;
    }
    
    .link-input {
        flex: 1;
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
        min-height: 56px;
        border-radius: 14px;
        border: 2px solid rgba(255, 255, 255, 0.6);
        background: rgba(255, 255, 255, 0.5);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
        backdrop-filter: blur(5px);
    }
    
    .link-input:hover {
        border-color: rgba(255, 255, 255, 0.8);
        background: rgba(255, 255, 255, 0.6);
    }
    
    .link-input:focus {
        border-color: rgba(255, 255, 255, 0.95);
        background: rgba(255, 255, 255, 0.7);
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
        outline: none;
    }
    
    .link-input-container .btn {
        padding: 1.25rem 2.5rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 14px;
        min-width: 140px;
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
        transition: all 0.3s ease;
    }
    
    .link-input-container .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    
    .link-input-container .btn:active {
        transform: translateY(0);
    }
    
    .input-hint {
        font-size: 0.875rem;
        color: #999;
        margin-top: 1rem;
        text-align: center;
    }
    
    /* 按钮组优化 */
    .controls {
        display: flex;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 2rem;
    }
    
    .controls .btn {
        min-width: 120px;
        padding: 1rem 2rem;
        font-weight: 600;
        border-radius: 12px;
        transition: all 0.3s ease;
    }
    
    .controls .btn:hover {
        transform: translateY(-2px);
    }
    
    .btn-primary {
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    }
    
    .btn-primary:hover {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    
    .btn-secondary {
        box-shadow: 0 2px 8px rgba(150, 150, 150, 0.2);
    }
    
    .btn-outline {
        border: 2px solid #667eea;
        color: #667eea;
        background: transparent;
    }
    
    .btn-outline:hover {
        background: #667eea;
        color: #fff;
    }
    
    /* 结果区域优化 */
    .result-container {
        background: rgba(255, 255, 255, 0.4);
        border-radius: 16px;
        padding: 2rem;
        margin: 2rem 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.4);
        backdrop-filter: blur(5px);
        max-width: calc(100% - 2rem);
    }
    
    .result-container h3 {
        font-size: 1.5rem;
        font-weight: 600;
        margin-bottom: 1.5rem;
        color: #333;
    }
    
    /* 视频预览优化 */
    .video-preview {
        max-width: 800px;
        margin: 0 auto;
    }
    
    .video-preview video {
        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        max-height: 500px;
    }
    
    /* 图片网格优化 */
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.5rem;
    }
    
    .image-item {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }
    
    .image-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
    
    .image-item img {
        height: 180px;
        object-fit: cover;
    }
    
    /* 上传区域优化 */
    .upload-area {
        border-radius: 16px;
        border: 2px dashed rgba(255, 255, 255, 0.8);
        background: rgba(255, 255, 255, 0.3);
        transition: all 0.3s ease;
        cursor: pointer;
        padding: 3rem 2rem;
        backdrop-filter: blur(5px);
        max-width: 100%;
        margin: 0 1rem;
    }
    
    .upload-area:hover {
        border-color: rgba(255, 255, 255, 0.95);
        background: rgba(255, 255, 255, 0.4);
    }
    
    .upload-area.dragover {
        border-color: rgba(255, 255, 255, 1);
        background: rgba(255, 255, 255, 0.5);
        transform: scale(1.01);
        box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
    }
    
    .upload-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .upload-icon {
        font-size: 4rem;
        margin-bottom: 0.5rem;
    }
    
    .upload-area h3 {
        font-size: 1.5rem;
        font-weight: 600;
        color: #333;
        margin: 0;
    }
    
    .upload-area p {
        color: #888;
        margin: 0;
        font-size: 1rem;
    }
    
    /* 页脚优化 */
    footer {
        display: none;
    }
}

/* 移动端全局优化 */
@media (max-width: 768px) {
    body {
        background: linear-gradient(135deg, #ffb7c5 0%, #ffccd5 50%, #ffc0cb 100%);
    }
    
    .card {
        background: transparent !important;
        backdrop-filter: none;
        box-shadow: none;
        border: none;
    }
    
    .nav-links {
        background: rgba(255, 255, 255, 0.2) !important;
    }
    
    .nav-links a {
        background: rgba(255, 255, 255, 0.9);
        color: #667eea;
    }
    
    .nav-links a.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #fff;
    }
    
    .link-input {
        background: #fff !important;
    }
    
    .result-container {
        background: rgba(255, 255, 255, 0.95) !important;
    }
    
    .image-item {
        background: rgba(255, 255, 255, 0.8) !important;
    }
}

/* 布局容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    width: 100%;
    box-sizing: border-box;
}

/* 头部导航 */
header {
    background: linear-gradient(135deg, #ffb7c5 0%, #ffccd5 50%, #ffc0cb 100%) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.site-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo h1 {
    font-size: var(--text-xl);
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    position: relative;
    font-size: var(--text-sm);
    background: rgba(255, 255, 255, 0.15);
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.25);
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* 主要内容区域 */
main {
    flex: 1;
    padding: var(--space-2xl) 0;
}

/* 卡片组件 */
.card {
    background: transparent !important;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin-bottom: var(--space-xl);
    border: none;
    backdrop-filter: none;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.card-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.card-header h2 {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.card-header .subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* 上传区域 */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-light);
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.8;
}

.upload-content h3 {
    font-size: var(--text-xl);
    color: var(--text-primary);
    font-weight: 600;
}

.upload-content p {
    color: var(--text-secondary);
    font-size: var(--text-base);
}

/* 链接输入区域 */
.link-input-wrapper {
    width: 100%;
    max-width: 600px;
    margin: var(--space-lg) auto;
}

.link-input-container {
    display: flex;
    gap: var(--space-md);
    align-items: stretch;
    width: 100%;
}

.link-input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    transition: all 0.3s ease;
    background: var(--bg-white);
    min-height: 50px;
    box-sizing: border-box;
    font-family: inherit;
    width: 100%;
}

.link-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.link-input::placeholder {
    color: var(--text-light);
}

.input-hint {
    color: var(--text-light);
    font-size: var(--text-sm);
    margin-top: var(--space-md);
    text-align: center;
    line-height: 1.6;
}

.upload-hint {
    color: var(--text-light);
    font-size: var(--text-sm);
    margin-top: var(--space-md);
    font-style: italic;
}

/* 预览区域 */
.preview-section {
    margin: 2rem 1rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
    max-width: calc(100% - 2rem);
}

.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.preview-item {
    text-align: center;
}

.preview-item h3 {
    font-size: var(--text-lg);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.image-container {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.image-container:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.image-container img,
.image-container canvas {
    max-width: 100%;
    max-height: 250px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 文件信息显示 */
.file-info {
    margin: 2rem 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
    max-width: calc(100% - 2rem);
}

.file-info p {
    margin: 0.5rem 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.file-info strong {
    color: #667eea;
    font-weight: 600;
    margin-right: 0.5rem;
}

.file-info span {
    color: #333;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
}

/* 控制按钮 */
.controls {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-xl);
}

/* 按钮样式 */
.btn {
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-height: 50px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
        background: rgba(255, 255, 255, 0.9);
        color: #667eea;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    }
    
    .btn-primary:hover {
        background: rgba(255, 255, 255, 1);
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
        transform: translateY(-2px);
    }

.btn-secondary {
    background: rgba(255, 255, 255, 0.5);
    color: #555;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-small {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    min-height: 40px;
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* 结果展示区域 */
.result-container {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-top: var(--space-lg);
    border: 1px solid var(--border-color);
}

.result-item h4 {
    font-size: var(--text-lg);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

/* 结果展示区域 */
.result-container {
    margin-top: var(--space-xl);
    padding: var(--space-xl);
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    width: 100%;
    box-sizing: border-box;
}

.result-container h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.video-preview {
    text-align: center;
    width: 100%;
}

.video-preview video {
    width: 100%;
    max-width: 800px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-md);
    background: #000;
    max-height: 60vh;
    object-fit: contain;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.video-preview .btn {
    margin-top: var(--space-md);
}

.cover-image {
    text-align: center;
    margin-bottom: var(--space-lg);
    width: 100%;
}

.cover-image img {
    max-width: 100%;
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.images-section h4,
.video-section h4 {
    font-size: var(--text-lg);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    font-weight: 600;
    width: 100%;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    width: 100%;
}

.image-item {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.image-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.image-item img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
}

.image-item a {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s ease;
}

.image-item a:hover {
    background: var(--primary-dark);
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: var(--space-xl);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-md);
}

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

.error {
    background: #fed7d7;
    color: #c53030;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid #feb2b2;
}

/* 页脚 */
footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    text-align: center;
    padding: var(--space-xl) 0;
    margin-top: var(--space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

footer p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: var(--space-md);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: var(--text-2xl);
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.modal-body {
    padding: var(--space-xl);
}

.modal-body .step {
    margin-bottom: var(--space-lg);
}

.modal-body .step:last-child {
    margin-bottom: 0;
}

/* 使用说明步骤样式 */
.instruction-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.step {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.step:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: var(--text-lg);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.step p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: var(--text-base);
}

/* 平板和移动端样式 (768px 以下) */
@media (max-width: 768px) {
    header {
        padding: var(--space-md) 0;
        background: linear-gradient(135deg, #ffb7c5 0%, #ffccd5 50%, #ffc0cb 100%) !important;
    }
    
    .container {
        padding: 0 var(--space-md);
    }
    
    /* 导航栏优化 */
    .logo {
        gap: 0.5rem;
    }
    
    .site-logo {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        padding: 3px;
    }
    
    .logo h1 {
        font-size: var(--text-lg);
    }
    
    .nav-links {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        margin: 0.5rem 0;
    }
    
    .nav-links a {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
        border-radius: 10px;
        font-weight: 500;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.2);
        color: #fff;
    }
    
    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.3);
    }
    
    .nav-links a.active {
        background: rgba(255, 255, 255, 0.4);
        color: #fff;
    }
    
    /* 卡片优化 */
    .card {
        padding: 1.25rem;
        margin-bottom: var(--space-lg);
        width: 100%;
        box-sizing: border-box;
        border-radius: 0;
        box-shadow: none;
        background: transparent !important;
    }
    
    .card-header {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .card-header h2 {
        font-size: 1.5rem;
        word-break: break-word;
        line-height: 1.4;
        margin-bottom: 0.5rem;
        font-weight: 700;
    }
    
    .card-header .subtitle {
        font-size: 0.875rem;
        word-break: break-word;
        line-height: 1.5;
        opacity: 0.8;
    }
    
    /* 输入区域优化 */
    .link-input-wrapper {
        margin: 1.5rem auto;
        max-width: 500px;
        padding: 0 0.5rem;
    }
    
    .link-input-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .link-input {
        padding: 1rem 1.25rem;
        font-size: 16px;
        min-height: 54px;
        border-radius: 12px;
        border: 2px solid #e0e0e0;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    
    .link-input:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    }
    
    .link-input-container .btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    
    .input-hint {
        font-size: 12px;
        margin-top: 0.75rem;
        padding: 0 0.5rem;
        line-height: 1.5;
        color: #999;
    }
    
    /* 上传区域 */
    .upload-area {
        padding: var(--space-lg);
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        box-sizing: border-box;
        border-radius: 12px;
    }
    
    /* 视频预览优化 */
    .video-preview video {
        width: 100%;
        max-height: 50vh;
        object-fit: contain;
        background: #000;
        border-radius: 12px;
        max-width: 100%;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    }
    
    .video-section {
        display: block !important;
        visibility: visible !important;
    }
    
    .video-section h4 {
        font-size: 1rem;
        margin-bottom: 0.875rem;
        font-weight: 600;
    }
    
    .video-preview .btn {
        width: 100%;
        max-width: 100%;
        display: inline-block !important;
        margin-bottom: 0.5rem;
    }
    
    /* 图片网格优化 */
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 0.75rem;
        width: 100%;
    }
    
    .image-item {
        padding: 0.5rem;
        border-radius: 8px;
        background: rgba(255,255,255,0.5);
    }
    
    .image-item img {
        height: 120px;
        width: 100%;
        object-fit: cover;
        border-radius: 8px;
    }
    
    .image-item .btn-small {
        width: 100%;
        padding: 0.5rem;
        font-size: 0.875rem;
        margin-top: 0.5rem;
    }
    
    /* 结果容器优化 */
    .result-container {
        padding: 1.25rem;
        margin-top: 1.25rem;
        width: 100%;
        box-sizing: border-box;
        border-radius: 12px;
        background: rgba(255,255,255,0.6);
        box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    }
    
    .result-container h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
        word-break: break-word;
        font-weight: 600;
    }
    
    .result-item h4 {
        font-size: 1rem;
        word-break: break-word;
        margin-bottom: 0.75rem;
    }
    
    .images-section h4,
    .video-section h4 {
        font-size: 1rem;
        margin-bottom: 0.875rem;
    }
    
    /* 控制按钮优化 */
    .controls {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 0.75rem;
        margin-top: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .btn-primary {
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }
    
    .btn-secondary {
        box-shadow: 0 2px 8px rgba(150,150,150,0.3);
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    .container {
        padding: 0 0.75rem;
        width: 100%;
    }
    
    .card {
        padding: 1rem;
        width: 100%;
        border-radius: 0;
        background: transparent !important;
    }
    
    .card-header h2 {
        font-size: 1.375rem;
        word-break: break-word;
        line-height: 1.3;
    }
    
    .card-header .subtitle {
        font-size: 0.875rem;
        word-break: break-word;
        line-height: 1.4;
    }
    
    .upload-area {
        padding: 1.25rem;
        width: 100%;
    }
    
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        width: 100%;
    }
    
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
        max-width: 100%;
        width: 100%;
    }
    
    .link-input {
        font-size: 16px;
        padding: var(--space-md);
        width: 100%;
    }
    
    .result-container {
        padding: var(--space-md);
        width: 100%;
    }
    
    .nav-links a {
        font-size: 12px;
        padding: 0.3rem 0.5rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: var(--text-base);
    }
}

/* 极小屏幕优化 (320px - 375px) */
@media (max-width: 375px) {
    html {
        font-size: 12px;
    }
    
    .container {
        padding: 0 8px;
    }
    
    .card {
        padding: 1rem;
        background: transparent !important;
    }
    
    .nav-links {
        gap: 0.2rem;
    }
    
    .nav-links a {
        font-size: 11px;
        padding: 0.25rem 0.4rem;
    }
    
    .link-input-wrapper {
        margin: 1.5rem 0;
        max-width: 100%;
        padding: 0 0.5rem;
    }
    
    .link-input-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .link-input {
        padding: 1rem 1.25rem;
        font-size: 16px;
        min-height: 54px;
        border-radius: 12px;
    }
    
    .link-input-container .btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 12px;
    }
    
    .input-hint {
        font-size: 12px;
        margin-top: 0.75rem;
        padding: 0 0.5rem;
        line-height: 1.5;
    }
}