/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #fe2c55;
    --secondary-color: #25f4ee;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* 主要内容区域 */
.main-content {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 20px;
}

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

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.url-input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.1);
}

.parse-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(45deg, var(--primary-color), #ff6b6b);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}

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

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

.parse-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 错误提示 */
.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #c33;
    margin-bottom: 20px;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* 结果区域 */
.result-section {
    animation: fadeIn 0.5s ease-in;
}

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

/* 视频信息 */
.video-info {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.author-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid var(--primary-color);
}

.author-name {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 5px;
}

.author-id {
    font-size: 0.9rem;
    color: var(--text-light);
}

.video-title {
    font-size: 1.3rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.video-desc {
    color: var(--text-light);
    line-height: 1.5;
}

/* 内容类型 */
.content-type {
    margin-bottom: 30px;
}

.content-type h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

/* 视频内容 */
.cover-wrapper {
    margin-bottom: 20px;
    text-align: center;
}

.video-cover {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.download-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.download-section h3 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
    font-weight: 500;
}

.download-link:hover {
    background: #e0264a;
}

.download-link.primary {
    background: linear-gradient(45deg, var(--primary-color), #ff6b6b);
}

.backup-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.backup-links .download-link {
    background: #6c757d;
    font-size: 0.9rem;
    padding: 10px 15px;
}

/* 图集内容 */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.images-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    cursor: pointer;
}

.images-grid img:hover {
    transform: scale(1.05);
}

.download-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--secondary-color);
    color: #333;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #1dd9e2;
}

/* 实况内容 */
.live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.live-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.live-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.live-item .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

/* 音乐信息 */
.music-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.music-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.music-cover {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.music-details {
    flex: 1;
}

.music-title {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 5px;
    font-weight: 600;
}

.music-author {
    color: var(--text-light);
    margin-bottom: 10px;
}

.music-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.music-link:hover {
    background: #e0264a;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px;
    color: white;
    font-size: 0.9rem;
}

.disclaimer {
    margin-top: 10px;
    opacity: 0.8;
    font-size: 0.85rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .main-content {
        padding: 20px;
    }

    .header {
        padding: 30px 15px;
    }

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

    .live-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .music-info {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .images-grid img {
        height: 150px;
    }

    .author-info {
        flex-direction: column;
        text-align: center;
    }

    .author-avatar {
        margin-right: 0;
        margin-bottom: 10px;
    }
}