/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: #333;
    text-decoration: none;
}

/* 头部 */
.header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.user-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-nav a, .user-nav button {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-login {
    background: #fff;
    border: 1px solid #333;
    color: #333;
}

.btn-register {
    background: #333;
    border: 1px solid #333;
    color: #fff;
}

.btn-login:hover {
    background: #f5f5f5;
}

.btn-register:hover {
    background: #555;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-size: 14px;
}

.user-badge {
    background: #333;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.btn-logout {
    background: none;
    border: 1px solid #ddd;
    color: #666;
    font-size: 13px;
}

/* 主容器 */
.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

/* 解析区域 */
.parse-section {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.parse-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #333;
}

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

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #333;
}

.input-group input::placeholder {
    color: #999;
}

.btn-parse {
    width: 100%;
    padding: 14px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.btn-parse:hover {
    background: #555;
}

.btn-parse:disabled {
    background: #999;
    cursor: not-allowed;
}

.btn-parse .loading {
    display: none;
}

.btn-parse.is-loading .text {
    display: none;
}

.btn-parse.is-loading .loading {
    display: inline;
}

/* 消息提示 */
.message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    display: none;
}

.message.error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
}

.message.success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
}

.message.info {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #096dd9;
}

/* 文件列表 */
.file-list {
    margin-top: 30px;
    display: none;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.file-list-title {
    font-size: 16px;
    font-weight: 500;
}

.btn-back {
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: none;
}

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

.file-table {
    width: 100%;
    border-collapse: collapse;
}

.file-table th,
.file-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.file-table th {
    background: #fafafa;
    font-weight: 500;
    font-size: 13px;
    color: #666;
}

.file-table td {
    font-size: 14px;
}

.file-name {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-icon {
    margin-right: 8px;
}

.btn-enter,
.btn-get-link {
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-enter {
    background: #fff;
    border: 1px solid #333;
    color: #333;
}

.btn-enter:hover {
    background: #333;
    color: #fff;
}

.btn-get-link {
    background: #333;
    border: 1px solid #333;
    color: #fff;
}

.btn-get-link:hover {
    background: #555;
}

.btn-get-link:disabled {
    background: #999;
    border-color: #999;
    cursor: not-allowed;
}

/* 结果区域 */
.result-section {
    margin-top: 30px;
    padding: 20px;
    background: #fafafa;
    border-radius: 6px;
    display: none;
}

.result-item {
    margin-bottom: 15px;
}

.result-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.result-value {
    font-size: 15px;
    color: #333;
}

.result-link {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
}

.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-copy, .btn-download {
    flex: 1;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}

.btn-copy {
    background: #fff;
    border: 1px solid #333;
    color: #333;
}

.btn-download {
    background: #333;
    border: 1px solid #333;
    color: #fff;
    text-decoration: none;
}

/* 说明区域 */
.info-section {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.info-block {
    margin-bottom: 25px;
}

.info-block:last-child {
    margin-bottom: 0;
}

.info-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.info-content {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.info-content p {
    margin-bottom: 8px;
}

.warning-text {
    color: #cf1322;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #333;
}

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

.captcha-group input {
    flex: 1;
}

.captcha-img {
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
}

.form-submit {
    width: 100%;
    padding: 12px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 10px;
}

.form-submit:hover {
    background: #555;
}

.form-switch {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

.form-switch a {
    color: #333;
    text-decoration: underline;
}

/* 协议弹窗 */
.agreement-content {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 15px;
}

.agreement-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.agreement-check input {
    width: 18px;
    height: 18px;
}

.agreement-check label {
    font-size: 14px;
    color: #333;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: #999;
    font-size: 13px;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        margin: 20px auto;
    }
    
    .parse-section {
        padding: 25px 20px;
    }
    
    .parse-title {
        font-size: 20px;
    }
    
    .file-table th,
    .file-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .file-name {
        max-width: 150px;
    }
    
    .result-actions {
        flex-direction: column;
    }
}
