@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent: #f093fb;
    --bg-light: #f7fafc;
    --text-dark: #1a202c;
    --text-muted: #718096;
    --border: #e2e8f0;
    --success: #48bb78;
    --warning: #ed8936;
    --error: #fc8181;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #8b5cf6 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.home-body {
    position: relative;
}

.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    animation: float 20s ease-in-out infinite;
}

.bg-circle-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.bg-circle-2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.bg-circle-3 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -30px) scale(1.02); }
    50% { transform: translate(-10px, 20px) scale(0.98); }
    75% { transform: translate(30px, 10px) scale(1.01); }
}

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

.header {
    position: relative;
    z-index: 100;
    padding: 20px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 12px 24px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: var(--shadow-lg);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
}

.logo-text span {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.nav-tabs {
    display: flex;
    gap: 8px;
}

.nav-tabs a {
    padding: 8px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s;
}

.nav-tabs a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.nav-tabs a.active {
    background: rgba(255,255,255,0.2);
    color: var(--white);
}

.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--white);
    color: var(--primary);
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
}

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

.main-wrapper {
    position: relative;
    z-index: 1;
    padding: 40px 0 60px;
}

.hero-section {
    text-align: center;
    margin-bottom: 48px;
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    letter-spacing: -1px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.hero-desc {
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    max-width: 500px;
    margin: 0 auto;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
}

.main-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.upload-card {
    background: var(--white);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow-xl);
}

.upload-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.upload-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.upload-card-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.upload-zone {
    position: relative;
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8fafc;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(102,126,234,0.05), rgba(118,75,162,0.05));
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    transform: scale(1.01);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upload-text {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.upload-text .highlight {
    color: var(--primary);
    font-weight: 600;
}

.upload-tip {
    font-size: 13px;
    color: var(--text-muted);
}

.upload-progress {
    margin-top: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    display: none;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s;
}

.files-card {
    background: var(--white);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow-xl);
}

.files-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.files-card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.btn-link {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.btn-link:hover {
    color: var(--primary-dark);
}

.file-list {
    min-height: 200px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.empty-state span {
    font-size: 13px;
    color: var(--text-muted);
}

.main-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-card {
    background: var(--white);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow-xl);
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    gap: 16px;
}

.feature-num {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.feature-content p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.feature-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.format-card {
    background: var(--white);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow-xl);
}

.format-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.format-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: #f8fafc;
    border-radius: 12px;
    transition: all 0.2s;
}

.format-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.format-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
}

.format-icon.icon-word { background: linear-gradient(135deg, #2b6cb0, #3182ce); }
.format-icon.icon-excel { background: linear-gradient(135deg, #217346, #2e7d32); }
.format-icon.icon-pdf { background: linear-gradient(135deg, #e53e3e, #c53030); }
.format-icon.icon-ppt { background: linear-gradient(135deg, #d44d00, #ed8936); }
.format-icon.icon-wps { background: linear-gradient(135deg, #2b6cb0, #3182ce); }
.format-icon.icon-txt { background: linear-gradient(135deg, #718096, #4a5568); }
.format-icon.icon-zip { background: linear-gradient(135deg, #805ad5, #9f7aea); }
.format-icon.icon-rar { background: linear-gradient(135deg, #dd6b20, #ed8936); }
.format-icon.icon-img { background: linear-gradient(135deg, #38a169, #48bb78); }

.format-item span:last-child {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.footer {
    position: relative;
    z-index: 1;
    padding: 24px 0;
    text-align: center;
}

.footer p {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.footer a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--white);
}

.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.login-modal.show {
    display: flex;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    background: var(--white);
    border-radius: 28px;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s;
}

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

.modal-header {
    padding: 28px 28px 24px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #999;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #eee;
    color: #666;
}

.modal-body {
    padding: 32px;
}

.qrcode-area {
    text-align: center;
}

.qrcode-box {
    width: 200px;
    height: 200px;
    background: #f8fafc;
    margin: 0 auto 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #e2e8f0;
}

.qrcode-box img {
    width: 180px;
    height: 180px;
    border-radius: 8px;
}

.qrcode-loading {
    color: var(--text-muted);
    font-size: 14px;
}

.scan-status {
    margin-bottom: 12px;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    display: inline-block;
}

.scan-status.scanning {
    background: #fef3cd;
    color: #856404;
}

.scan-status.confirmed {
    background: #d4edda;
    color: #155724;
}

.scan-hint {
    font-size: 14px;
    color: var(--text-muted);
}

.scan-hint strong {
    color: var(--primary);
}

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

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-action.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.btn-action.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.btn-action.secondary {
    background: #f5f5f5;
    color: var(--text-dark);
}

.btn-action.secondary:hover {
    background: #ebebeb;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 14px;
    transition: all 0.2s;
}

.file-item:hover {
    background: #f0f4f8;
    transform: translateX(4px);
}

.file-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 14px;
    flex-shrink: 0;
}

.file-icon.doc, .file-icon.docx { background: linear-gradient(135deg, #2b6cb0, #3182ce); }
.file-icon.xls, .file-icon.xlsx { background: linear-gradient(135deg, #217346, #2e7d32); }
.file-icon.pdf { background: linear-gradient(135deg, #e53e3e, #c53030); }
.file-icon.ppt, .file-icon.pptx { background: linear-gradient(135deg, #d44d00, #ed8936); }
.file-icon.wps { background: linear-gradient(135deg, #2b6cb0, #3182ce); }
.file-icon.txt { background: linear-gradient(135deg, #718096, #4a5568); }
.file-icon.zip, .file-icon.rar { background: linear-gradient(135deg, #805ad5, #9f7aea); }

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.file-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.file-actions {
    display: flex;
    gap: 8px;
}

.file-actions button {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.btn-copy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.btn-delete {
    background: #fee;
    color: #c53030;
}

.btn-delete:hover {
    background: #ffd7d7;
}

@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .main-right {
        order: -1;
    }

    .format-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 12px;
    }

    .nav-tabs {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-desc {
        font-size: 15px;
    }

    .upload-zone {
        padding: 32px 16px;
    }

    .upload-icon {
        font-size: 36px;
    }

    .format-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .format-item {
        padding: 12px 4px;
    }

    .format-icon {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .format-item span:last-child {
        font-size: 10px;
    }
}

.tutorial-section {
    background: var(--white);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-xl);
}

.tutorial-header {
    margin-bottom: 32px;
}

.tutorial-num {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 12px;
}

.tutorial-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.tutorial-header h3 .badge-recommend {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: var(--white);
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.tutorial-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.tutorial-steps {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.step-card {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.step-image {
    margin-bottom: 16px;
}

.step-image svg {
    width: 64px;
    height: 64px;
}

.step-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.step-content p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.step-arrow {
    font-size: 24px;
    color: var(--text-muted);
    padding-top: 20px;
    flex-shrink: 0;
}

.tutorial-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 24px;
    padding: 16px 20px;
    background: #fef3cd;
    border-radius: 12px;
    font-size: 14px;
    color: #856404;
}

.tutorial-tip svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.third-editor-tips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.editor-tip-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    transition: all 0.2s;
}

.editor-tip-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.editor-icon {
    font-size: 32px;
}

.editor-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.editor-info p {
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .tutorial-steps {
        flex-direction: column;
        align-items: stretch;
    }

    .step-arrow {
        text-align: center;
        padding: 8px 0;
        transform: rotate(90deg);
    }

    .third-editor-tips {
        grid-template-columns: 1fr;
    }
}

.faq-section {
    background: var(--white);
    border-radius: 24px;
    padding: 8px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-xl);
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    cursor: pointer;
    transition: color 0.2s;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question h4 {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    flex: 1;
    padding-right: 16px;
}

.faq-arrow {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, padding 0.3s;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding-bottom: 20px;
}

.faq-answer p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.help-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 24px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-xl);
}

.help-icon {
    font-size: 40px;
}

.help-content {
    flex: 1;
}

.help-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.help-content p {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

.btn-help {
    padding: 12px 24px;
    background: var(--white);
    color: var(--primary);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-help:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

@media (max-width: 480px) {
    .help-card {
        flex-direction: column;
        text-align: center;
    }

    .btn-help {
        width: 100%;
    }

    .container {
        padding: 0 16px;
    }

    .nav-tabs a {
        padding: 6px 12px;
        font-size: 13px;
    }

    .btn-login {
        padding: 8px 14px;
        font-size: 13px;
    }

    .btn-login span {
        display: none;
    }

    .upload-card, .files-card, .feature-card, .format-card {
        padding: 20px;
        border-radius: 20px;
    }

    .feature-tip {
        flex-direction: column;
        text-align: center;
    }
}
