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

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding-top: 80px;
    padding-bottom: 80px;
}

/* Fixed Header */
.navbar {
    background: rgba(26, 32, 44, 0.95);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #667eea;
}

/* Page Header */
.page-header {
    padding: 3rem 2rem;
    text-align: center;
    color: white;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.page-desc {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Tabs */
.tabs {
    display: flex;
    background: rgba(255,255,255,0.1);
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.tab {
    flex: 1;
    padding: 1.2rem 2rem;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: white;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.tab:hover {
    background: rgba(255,255,255,0.1);
}

.tab.active {
    background: rgba(255,255,255,0.2);
    border-bottom-color: #667eea;
}

/* Content Area */
.content-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    border-radius: 0 0 16px 16px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.settings-panel h3 {
    font-size: 1.3rem;
    color: #1a202c;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e2e8f0;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #cbd5e1;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8fafc;
    margin-bottom: 1.5rem;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #e8f0ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-text {
    color: #4a5568;
    font-size: 1.1rem;
    font-weight: 500;
}

.upload-hint {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-select {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #64748b;
    color: white;
}

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

/* Preview Panel */
.preview-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.preview-title {
    font-size: 1.3rem;
    color: #1a202c;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e2e8f0;
}

.preview-container {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%, #f0f0f0),
                linear-gradient(45deg, #f0f0f0 25%, transparent 25%, transparent 75%, #f0f0f0 75%, #f0f0f0);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    border-radius: 16px;
    padding: 1.5rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
}

.preview-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.preview-placeholder {
    color: #94a3b8;
    text-align: center;
    font-size: 1.1rem;
}

/* Info Cards */
.info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.info-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
}

.info-label {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.info-value {
    color: #1a202c;
    font-size: 1.3rem;
    font-weight: 700;
}

.compression-rate {
    color: #10b981;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    background: white;
    padding: 3rem 4rem;
    border-radius: 20px;
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a202c;
}

/* Notification */
.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s;
    z-index: 2000;
    font-weight: 600;
}

.notification.error {
    background: #ef4444;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: #1a202c;
}

/* Fixed Footer */
.footer {
    background: rgba(26, 32, 44, 0.95);
    color: white;
    text-align: center;
    padding: 1.5rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    backdrop-filter: blur(10px);
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

/* Content Pages (About, Contact, etc.) */
.content-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.content-page h1 {
    color: #1a202c;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.content-page h2 {
    color: #667eea;
    margin: 1.5rem 0 1rem;
    font-size: 1.5rem;
}

.content-page p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-page ul {
    color: #4a5568;
    line-height: 1.8;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

/* Contact Form */
.contact-form {
    margin-top: 2rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* Responsive Design */
@media (max-width: 968px) {
    .content-area {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 120px;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .btn-group {
        flex-direction: column;
    }
}

/* ==================== 安全保护CSS ==================== */

/* 禁用文本选择 */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* 防止拖拽 */
* {
    -webkit-user-drag: none;
    user-drag: none;
}

/* 禁用图片拖拽 */
img {
    pointer-events: auto;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 水印效果（可选） */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    /* 可添加水印文字 */
    /* background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text x="50" y="50" font-size="10" fill="rgba(102,126,234,0.05)">CONFIDENTIAL</text></svg>');
    background-size: 200px;
    background-repeat: repeat; */
}

/* 打印时隐藏内容 */
@media print {
    body {
        display: none !important;
    }
}
