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

:root {
    --primary-color: #1890ff;
    --primary-hover: #40a9ff;
    --secondary-color: #722ed1;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --error-color: #ff4d4f;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-primary: #262626;
    --text-secondary: #595959;
    --border-color: #e8e8e8;
    --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-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 16px 0;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border-radius: 0 0 12px 12px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* 主内容区 */
.main-content {
    padding-bottom: 40px;
}

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

.input-container {
    max-width: 900px;
    margin: 0 auto;
}

.input-box {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.url-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

.parse-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    white-space: nowrap;
}

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

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

.parse-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.parse-icon {
    font-size: 18px;
}

.input-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 8px;
}

.platform-tag {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

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

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.result-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.clear-btn {
    padding: 8px 16px;
    background-color: var(--bg-color);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background-color: #e6f7ff;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.result-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

/* 结果卡片 */
.result-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.platform-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.platform-info {
    flex: 1;
}

.platform-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.platform-url {
    font-size: 13px;
    color: var(--text-secondary);
    word-break: break-all;
    text-decoration: none;
}

.platform-url:hover {
    color: var(--primary-color);
}

/* 预览区域 */
.preview-area {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image {
    max-width: 100%;
    max-height: 600px;
    display: block;
}

.preview-video {
    width: 100%;
    max-height: 600px;
    display: block;
}

.preview-placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    text-align: center;
    padding: 40px;
}

/* 下载按钮区域 */
.download-area {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.download-btn {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--success-color), #73d13d);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: var(--shadow);
}

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

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

.download-icon {
    font-size: 18px;
}

.error-message {
    padding: 16px;
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 8px;
    color: var(--error-color);
    font-size: 14px;
    line-height: 1.6;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    max-width: 700px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.empty-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 32px;
}

.empty-examples {
    text-align: left;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 24px;
}

.examples-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.examples-list {
    list-style: none;
    padding: 0;
}

.examples-list li {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    word-break: break-all;
}

.examples-list li:last-child {
    border-bottom: none;
}

/* 加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(24, 144, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
}

.loading-text {
    color: white;
    font-size: 16px;
    margin-left: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

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

    .header {
        margin-bottom: 20px;
        border-radius: 0;
    }

    .logo {
        font-size: 20px;
    }

    .input-box {
        flex-direction: column;
        padding: 16px;
    }

    .url-input {
        width: 100%;
    }

    .parse-btn {
        width: 100%;
        justify-content: center;
    }

    .result-container {
        padding: 16px;
    }

    .result-info {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .download-btn {
        width: 100%;
        min-width: auto;
    }

    .result-title {
        font-size: 20px;
    }
}

