/* 抖音无水印解析网站样式 */

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

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;
    padding: 20px;
}

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

/* 头部样式 */
.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主内容区 */
.main-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.input-wrapper {
    display: flex;
    gap: 10px;
}

.input-wrapper input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.3s;
}

.input-wrapper input:focus {
    border-color: #667eea;
}

.input-wrapper button {
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.input-wrapper button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.hint {
    font-size: 0.85rem;
    color: #999;
    margin-top: 10px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 错误提示 */
.error-msg {
    padding: 15px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 10px;
    color: #c00;
    text-align: center;
    margin-bottom: 20px;
}

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

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

/* 视频卡片 */
.video-card {
    background: #fafafa;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}

.video-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #eee;
}

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

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-cover:hover .video-overlay {
    opacity: 1;
}

.btn-download {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-download:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.btn-download svg {
    width: 24px;
    height: 24px;
}

/* 视频详情 */
.video-details {
    padding: 20px;
}

.video-title {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* 作者信息 */
.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #e0e0e0;
}

.author-meta {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.video-time {
    font-size: 0.85rem;
    color: #999;
    margin-top: 2px;
}

/* 统计数据 */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.stat-item {
    background: white;
    padding: 12px 8px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #eee;
}

.btn-secondary svg {
    flex-shrink: 0;
}

/* 视频链接 */
.video-url-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.video-url-section label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.url-copy {
    display: flex;
    gap: 10px;
}

.url-copy input {
    flex: 1;
    padding: 12px 15px;
    font-size: 0.9rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
}

.url-copy button {
    padding: 12px 20px;
    font-size: 0.9rem;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.url-copy button:hover {
    background: #45a049;
}

.link-hint {
    font-size: 0.8rem;
    color: #999;
    margin-top: 8px;
}

/* 历史记录 */
.history {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.history h3 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 15px;
}

.history-list {
    display: grid;
    gap: 15px;
}

.history-item {
    display: flex;
    gap: 15px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s;
}

.history-item:hover {
    background: #f0f0f0;
}

.history-item img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.history-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.history-info h4 {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-info p {
    font-size: 0.8rem;
    color: #999;
}

/* 页脚 */
.footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    margin-top: 30px;
    font-size: 0.9rem;
}

/* 提示消息 */
.tip-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 9999;
    animation: tipIn 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

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

/* 工具类 */
.hidden {
    display: none !important;
}

/* 响应式 */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .url-copy {
        flex-direction: column;
    }
    
    .url-copy button {
        width: 100%;
    }
}
