* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --success-color: #27ae60;
    --warning-color: #f59e0b;
    --danger-color: #dc2626;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    background-color: #f5f7fb;
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 40px;
}

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

/* 头部样式 */
header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.8rem;
}

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

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-login {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-register {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-login:hover {
    background-color: rgba(67, 97, 238, 0.1);
}

.btn-register:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

/* 新增：下载按钮样式 */
.btn-download {
    background-color: var(--success-color);
    color: white;
    padding: 10px 25px;
    font-size: 1rem;
    border-radius: 5px;
    display: inline-flex;
    align-items:center;
    gap:8px;
}

.btn-download:hover {
    background-color: #219653;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    flex-direction: column;
    align-items:center;
    padding-top: 40px;
}

.hero-section {
    text-align: center;
    max-width: 800px;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--gray-color);
    margin-bottom: 25px;
}

/* 网址输入区域 */
.url-input-section {
    width: 100%;
    max-width: 900px;
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary-color);
}

/* ========== 新增核心样式：下载类型选项卡 ========== */
.tab-group {
    display: flex;
    border-radius: 8px;
    background-color: #f1f3f5;
    padding: 4px;
    margin-bottom: 20px;
    width: 100%;
}
.tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: var(--gray-color);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    user-select: none;
    -webkit-user-select: none;
}
.tab-item i {
    font-size: 1.1rem;
}
.tab-item.active {
    background-color: var(--primary-color);
    color: #fff;
}
.tab-item:not(.active):hover {
    background-color: #e9ecef;
    color: var(--dark-color);
}

.url-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.url-input {
    flex: 1;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.url-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.btn-submit {
    background-color: var(--primary-color);
    color: white;
    padding: 0 30px;
    font-size: 1rem;
    border-radius: 5px;
}

.btn-submit:hover {
    background-color: var(--secondary-color);
}

.examples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.example-chip {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.example-chip:hover {
    background-color: rgba(67, 97, 238, 0.2);
}

/* ========== 进度条样式 必显+流畅 ========== */
.progress-container {
    width:100%;
    height:8px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin:15px 0;
    overflow:hidden;
    display:none;
    opacity: 1;
    visibility: visible;
}
.progress-bar {
    height:100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius:4px;
    width:0%;
    transition: width 0.2s ease-in-out;
    animation: progressMove 1.5s ease infinite;
}
@keyframes progressMove {
    0% { background-position: 0 0; }
    100% { background-position: 150px 0; }
}

/* ========== 下载地址展示区 ========== */
.download-area {
    width:100%;
    padding:18px;
    background-color: rgba(39, 174, 96, 0.08);
    border:1px solid rgba(39, 174, 96, 0.2);
    border-radius:6px;
    margin:15px 0;
    display:flex;
    justify-content: space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
    display:none;
}
.download-text {
    color:var(--success-color);
    font-weight:600;
    font-size:1rem;
    display:flex;
    align-items:center;
    gap:8px;
}
.download-link {
    color:var(--primary-color);
    text-decoration: none;
    font-size:0.95rem;
    word-break:break-all;
    flex:1;
    margin:0 10px;
}
.download-link:hover {
    text-decoration:underline;
}

/* 结果展示区域 */
.result-section {
    width: 100%;
    max-width: 900px;
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    display: none;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap:wrap;
    gap:10px;
}

.result-content {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
    background-color: #f9f9f9;
    display: none;
}

.result-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ========== 底部使用说明板块 ========== */
.guide-section {
    width: 100%;
    max-width: 900px;
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-top: 30px;
}
.guide-title {
    font-size:1.3rem;
    color:var(--dark-color);
    margin-bottom:18px;
    display:flex;
    align-items:center;
    gap:8px;
}
.guide-title i {
    color:var(--primary-color);
}
.guide-box {
    margin-bottom:20px;
}
.guide-subtitle {
    font-size:1.1rem;
    color:var(--primary-color);
    margin-bottom:10px;
    font-weight:600;
}
.guide-text {
    color:var(--gray-color);
    line-height:1.7;
    font-size:0.95rem;
}
.guide-text ul {
    padding-left:20px;
    margin-top:8px;
}
.guide-text li {
    margin-bottom:6px;
}
.guide-tips {
    background-color:rgba(245, 158, 11, 0.08);
    border-left:3px solid var(--warning-color);
    padding:12px 15px;
    border-radius:0 5px 5px 0;
    margin-top:10px;
    color:var(--dark-color);
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.modal {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: modalAppear 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    color: var(--dark-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-color);
}

.modal-body {
    padding: 30px;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.form-footer a:hover {
    text-decoration: underline;
}

.form-switcher {
    display: none;
}

/* 用户信息展示 */
.user-info {
    display: none;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.username {
    font-weight: 600;
    color: var(--dark-color);
}

.btn-logout {
    background-color: transparent;
    color: var(--gray-color);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
}

.btn-logout:hover {
    background-color: #f8f9fa;
}

.btn-user-center {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
}

.btn-user-center:hover {
    background-color: var(--secondary-color);
}
.footer{
    margin-top:20px;
    font-size:1em;
}
.footer .flink a{
   color:#212529;
   text-decoration:none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .url-form {
        flex-direction: column;
    }
    
    .btn-submit {
        padding: 15px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .auth-buttons {
        width: 100%;
        justify-content: center;
    }
    .download-area {
        flex-direction: column;
        align-items:flex-start;
    }
    .download-link {
        margin:10px 0;
    }
    .tab-item {
        font-size: 0.9rem;
        padding: 10px 0;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .url-input-section, .result-section, .guide-section {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    .tab-item {
        font-size: 0.85rem;
        gap: 5px;
    }
    .tab-item i {
        font-size: 1rem;
    }
}
