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

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #f093fb;
    --success: #4facfe;
    --warning: #f093fb;
    --danger: #ff6b9d;
    --dark: #2d3748;
    --light: #f8fafc;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow-x: hidden;
}

/* 动态背景粒子 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* 顶部状态栏 */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.logo i {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 24px;
}

.status-widgets {
    display: flex;
    gap: 15px;
}

.widget {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 8px 16px;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget i {
    font-size: 16px;
}

/* 主容器 */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 20px 40px;
    position: relative;
    z-index: 1;
}

/* 标题区域 */
.hero {
    text-align: center;
    margin-bottom: 50px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #f093fb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* 输入区域 */
.input-section {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

.input-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
    font-size: 20px;
    z-index: 2;
}

#urlInput {
    width: 100%;
    padding: 20px 140px 20px 60px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--dark);
    outline: none;
}

#urlInput::placeholder {
    color: #9ca3af;
}

.parse-button {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.parse-button:hover {
    transform: translateX(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.parse-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    display: none;
}

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

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

.loading-text {
    color: white;
    font-size: 18px;
    margin-bottom: 10px;
}

.loading-subtext {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* 内容卡片 */
.content-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.content-card.show {
    opacity: 1;
    transform: translateY(0);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.card-title {
    flex: 1;
}

.card-title h3 {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.card-title p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* 内容描述 */
.content-desc {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.6;
    word-wrap: break-word;
    position: relative;
}

.content-desc::before {
    content: '"';
    position: absolute;
    top: -5px;
    left: 10px;
    font-size: 40px;
    color: rgba(255, 255, 255, 0.3);
    font-family: serif;
}

.content-desc::after {
    content: '"';
    position: absolute;
    bottom: -15px;
    right: 10px;
    font-size: 40px;
    color: rgba(255, 255, 255, 0.3);
    font-family: serif;
}

/* 视频播放器 */
.video-player {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    background: black;
}

.video-player video {
    width: 100%;
    height: auto;
    display: block;
}

/* 图片画廊 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 1;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-index {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

/* 下载按钮 */
.download-section {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.download-btn {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 15px 30px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 160px;
    justify-content: center;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.4);
}

.download-btn.zip {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.download-btn.zip:hover {
    box-shadow: 0 10px 25px rgba(240, 147, 251, 0.4);
}

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

/* 全屏图片查看器 */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
    backdrop-filter: blur(10px);
}

.image-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* 通知消息 */
.notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 15px 25px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    max-width: 90%;
    animation: slideUp 0.3s ease;
}

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

/* 调试信息 */
.debug-info {
    position: fixed;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #4ade80;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    z-index: 9999;
    max-width: 300px;
    word-break: break-all;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .status-bar {
        padding: 0 15px;
    }

    .logo {
        font-size: 16px;
    }

    .status-widgets {
        gap: 10px;
    }

    .widget {
        padding: 6px 12px;
        font-size: 12px;
    }

    .container {
        padding: 70px 15px 30px;
    }

    .input-section {
        padding: 20px;
    }

    #urlInput {
        padding: 18px 120px 18px 50px;
        font-size: 16px;
    }

    .parse-button {
        min-width: 100px;
        padding: 0 20px;
    }

    .content-card {
        padding: 20px;
    }

    .content-desc {
        padding: 15px;
        font-size: 14px;
        margin-bottom: 20px;
    }

    .content-desc::before,
    .content-desc::after {
        font-size: 30px;
    }

    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .download-section {
        flex-direction: column;
    }
}