/* 抖音无水印视频解析下载工具 - 样式文件 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 30px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    color: #FF0050; /* 抖音红 */
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

header h1 i {
    font-size: 2.2rem;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* 输入区域 */
.input-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

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

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
    font-size: 1.1rem;
}

.input-group label i {
    color: #FF0050;
    margin-right: 8px;
}

#url-input {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

#url-input:focus {
    outline: none;
    border-color: #FF0050;
    box-shadow: 0 0 0 3px rgba(255, 0, 80, 0.1);
}

.input-hint {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-hint i {
    color: #FFC107;
}

/* 按钮样式 */
.btn-primary, .btn-secondary, .btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #FF0050, #FF4081);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 80, 0.3);
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-download {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

/* 直接下载按钮特殊样式 */
.direct-download-btn {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

.direct-download-btn:hover {
    background: linear-gradient(135deg, #218838, #1ba87e) !important;
}

/* 输入区域按钮容器 */
.input-action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* 状态显示 */
.status-section {
    margin-bottom: 30px;
}

.status {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
}

.status i {
    font-size: 1.2rem;
}

.status-ready {
    background: #e3f2fd;
    color: #1976d2;
    border-left: 5px solid #1976d2;
}

.status-processing {
    background: #fff3e0;
    color: #f57c00;
    border-left: 5px solid #f57c00;
}

.status-success {
    background: #e8f5e9;
    color: #388e3c;
    border-left: 5px solid #388e3c;
}

.status-error {
    background: #ffebee;
    color: #d32f2f;
    border-left: 5px solid #d32f2f;
}

.progress-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF0050, #FF4081);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 5px;
}

/* 视频信息卡片 */
.video-info {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.video-info h2 {
    color: #343a40;
    margin-bottom: 25px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.video-card {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.cover-container {
    flex: 0 0 300px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cover-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.cover-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;
}

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

.cover-overlay i {
    font-size: 3rem;
    color: white;
}

.video-details {
    flex: 1;
    min-width: 300px;
}

.video-title {
    color: #212529;
    font-size: 1.5rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.meta-item i {
    color: #FF0050;
}

.status-success {
    color: #28a745;
    font-weight: 600;
}

/* 下载链接区域 */
.download-url-container {
    margin-bottom: 25px;
}

.download-url-container label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
}

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

#download-url {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
}

#download-url:focus {
    outline: none;
    border-color: #FF0050;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* 使用说明 */
.instructions {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.instructions h2 {
    color: #343a40;
    margin-bottom: 25px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.steps {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.step {
    flex: 1;
    min-width: 250px;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FF0050, #FF4081);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.step-content h3 {
    color: #212529;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.step-content p {
    color: #6c757d;
    line-height: 1.5;
}

/* 页脚 */
footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.disclaimer h3 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.disclaimer p {
    color: #856404;
    line-height: 1.5;
}

.footer-info {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    padding: 20px 0;
}

/* 响应式设计 - 移动端优化 */
@media (max-width: 768px) {
    /* 基础调整 */
    body {
        padding: 10px;
        font-size: 14px;
        -webkit-text-size-adjust: 100%;
    }

    .container {
        padding: 15px;
        border-radius: 15px;
    }

    /* 头部调整 */
    header {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }

    header h1 {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    header h1 i {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.95rem;
        margin-top: 8px;
    }

    /* 输入区域调整 */
    .input-section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .input-group label {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    #url-input {
        min-height: 100px;
        padding: 12px;
        font-size: 0.95rem;
    }

    .input-hint {
        font-size: 0.85rem;
    }

    /* 按钮调整 */
    .action-buttons, .input-action-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .btn-primary, .btn-download, .btn-secondary {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
        justify-content: center;
    }

    .btn-primary {
        margin-bottom: 0;
    }

    .direct-download-btn {
        background-color: #28a745 !important;
    }

    /* 状态显示调整 */
    .status {
        padding: 12px 15px;
        font-size: 0.95rem;
        line-height: 1.4;
        align-items: flex-start;
    }

    .status i {
        font-size: 1rem;
        flex-shrink: 0;
        margin-top: 2px;
    }

    .status-text {
        flex: 1;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .progress-bar {
        height: 8px;
    }

    /* 视频信息卡片调整 */
    .video-info {
        padding: 20px;
        margin-bottom: 20px;
    }

    .video-info h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }

    .video-card {
        flex-direction: column;
        gap: 20px;
    }

    .cover-container {
        flex: 0 0 auto;
        max-width: 100%;
        border-radius: 10px;
    }

    .cover-image {
        height: 180px;
    }

    .cover-overlay i {
        font-size: 2.5rem;
    }

    .video-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
        line-height: 1.4;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .video-meta {
        gap: 10px;
    }

    .meta-item {
        padding: 8px 12px;
        font-size: 0.9rem;
        flex: 1 1 calc(50% - 5px);
        min-width: calc(50% - 5px);
        justify-content: center;
        text-align: center;
    }

    .meta-item span {
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* 下载链接区域 */
    .download-url-container {
        margin-bottom: 15px;
    }

    .url-input-group {
        flex-direction: column;
        gap: 8px;
    }

    #download-url {
        padding: 10px 12px;
        font-size: 0.9rem;
        min-height: 44px; /* 提高触摸目标大小 */
        border-width: 1px;
        width: 100%;
    }

    #download-url:focus {
        border-width: 2px;
        box-shadow: 0 0 0 2px rgba(255, 0, 80, 0.1);
    }

    #copy-btn {
        min-height: 44px; /* 提高触摸目标大小 */
        width: 100%;
        padding: 12px 20px;
    }

    /* 使用说明调整 */
    .instructions {
        padding: 20px;
        margin-bottom: 20px;
    }

    .instructions h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }

    .steps {
        flex-direction: column;
        gap: 15px;
    }

    .step {
        padding: 20px;
        min-width: auto;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .step-content h3 {
        font-size: 1.1rem;
    }

    .step-content p {
        font-size: 0.9rem;
    }

    /* 页脚调整 */
    footer {
        margin-top: 25px;
        padding-top: 20px;
    }

    .disclaimer {
        padding: 15px;
    }

    .disclaimer h3 {
        font-size: 1.1rem;
    }

    .disclaimer p {
        font-size: 0.9rem;
    }

    .footer-info {
        font-size: 0.8rem;
        padding: 15px 0;
    }
}

/* 超小屏幕手机优化 */
@media (max-width: 480px) {
    body {
        padding: 8px;
        font-size: 13px;
    }

    .container {
        padding: 12px;
        border-radius: 12px;
    }

    header h1 {
        font-size: 1.3rem;
        gap: 6px;
    }

    header h1 i {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.85rem;
        margin-top: 6px;
    }

    .input-section {
        padding: 12px;
    }

    #url-input {
        min-height: 90px;
        padding: 10px;
        font-size: 0.9rem;
    }

    .input-hint {
        font-size: 0.8rem;
    }

    .btn-primary, .btn-download, .btn-secondary {
        padding: 11px 16px;
        font-size: 0.9rem;
        min-height: 46px;
    }

    .video-info, .instructions {
        padding: 15px;
    }

    .video-info h2, .instructions h2 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .video-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .cover-image {
        height: 150px;
    }

    .cover-overlay i {
        font-size: 2rem;
    }

    .meta-item {
        flex: 1 1 100%;
        min-width: 100%;
        font-size: 0.85rem;
        padding: 7px 10px;
        margin-bottom: 5px;
    }

    .status {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .status i {
        font-size: 0.9rem;
    }

    #download-url {
        padding: 8px 10px;
        font-size: 0.85rem;
        min-height: 42px;
    }

    #copy-btn {
        padding: 10px 16px;
        min-height: 42px;
    }

    .step {
        padding: 15px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .step-content h3 {
        font-size: 1rem;
    }

    .step-content p {
        font-size: 0.85rem;
    }

    .disclaimer {
        padding: 12px;
    }

    .disclaimer h3 {
        font-size: 1rem;
    }

    .disclaimer p {
        font-size: 0.85rem;
    }

    .footer-info {
        font-size: 0.75rem;
        padding: 12px 0;
    }
}

/* 平板设备优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 25px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .video-card {
        flex-direction: row;
    }

    .cover-container {
        flex: 0 0 250px;
    }
}

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

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

.video-info {
    animation: fadeIn 0.5s ease-out;
}