/* 水印去除工具样式 - 延续 NavHub 清新简约设计 */

:root {
    /* NavHub 配色方案 */
    --primary-bg: #f8f9fa;
    --card-white: #ffffff;
    --text-black: #2c3e50;
    --text-gray: #6c757d;
    --border-color: #2c3e50;

    /* 功能色 */
    --blue-light: #E3F2FD;
    --blue-deep: #2196F3;
    --green-light: #E8F5E9;
    --green-deep: #4CAF50;
    --red-light: #FFEBEE;
    --red-deep: #F44336;
    --yellow-light: #FFF9C4;
    --yellow-deep: #FFC107;
    --purple-light: #F3E5F5;
    --purple-deep: #9C27B0;
    --cyan-light: #E0F7FA;
    --cyan-deep: #00BCD4;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-black);
    line-height: 1.6;
}

/* 顶部导航 */
.header {
    background-color: var(--card-white);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-btn {
    background: linear-gradient(135deg, var(--cyan-light), #B2EBF2);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-black);
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 var(--border-color);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.header-placeholder {
    width: 100px;
}

/* 主内容区 */
.main-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.remover-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* 卡片样式 */
.panel-card {
    background-color: var(--card-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 6px 6px 0 rgba(44, 62, 80, 0.1);
}

.panel-card h2 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-black);
}

.panel-card h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-black);
}

/* 上传区域 */
.upload-zone {
    border: 3px dashed var(--cyan-deep);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--cyan-light), #E0F7FA);
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    background: linear-gradient(135deg, #B2EBF2, var(--cyan-light));
    border-color: var(--border-color);
}

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

.upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-black);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.upload-btn {
    background: linear-gradient(135deg, var(--cyan-deep), #26C6DA);
    color: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 var(--border-color);
}

/* 图片预览 */
.preview-section {
    margin: 2rem 0;
}

.image-preview {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    max-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.image-info {
    background: linear-gradient(135deg, var(--yellow-light), #FFF59D);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.info-label {
    font-weight: 600;
    color: var(--text-black);
}

.info-value {
    color: var(--text-gray);
}

/* 处理设置 */
.process-settings {
    margin-top: 1.5rem;
}

.setting-item {
    margin: 1rem 0;
}

.setting-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-black);
}

.method-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--card-white);
    font-size: 1rem;
    cursor: pointer;
}

.setting-item input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.process-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--green-deep), #66BB6A);
    color: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.process-btn:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 var(--border-color);
}

.process-btn:disabled {
    background: linear-gradient(135deg, #BDBDBD, #9E9E9E);
    cursor: not-allowed;
    opacity: 0.6;
}

/* 状态占位符 */
.status-placeholder {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-gray);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* 进度条 */
.progress-container {
    padding: 2rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background-color: var(--cyan-light);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan-deep), #26C6DA);
    border-radius: 13px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-tip {
    text-align: center;
    color: var(--text-gray);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* 成功结果 */
.success-result {
    padding: 2rem;
}

.success-icon {
    font-size: 5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.success-result h3 {
    color: var(--green-deep);
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-image-container {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    max-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.result-image-container img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.download-btn,
.compare-btn,
.new-process-btn {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn {
    background: linear-gradient(135deg, var(--green-deep), #66BB6A);
    color: white;
    grid-column: 1 / -1;
}

.compare-btn {
    background: linear-gradient(135deg, var(--blue-light), #BBDEFB);
    color: var(--text-black);
}

.new-process-btn {
    background: linear-gradient(135deg, var(--purple-light), #E1BEE7);
    color: var(--text-black);
}

.download-btn:hover,
.compare-btn:hover,
.new-process-btn:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 var(--border-color);
}

/* 错误结果 */
.error-result {
    text-align: center;
    padding: 2rem;
}

.error-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.error-result h3 {
    color: var(--red-deep);
    margin-bottom: 1rem;
}

.error-message {
    background: linear-gradient(135deg, var(--red-light), #FFCDD2);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: var(--red-deep);
    font-weight: 600;
}

.retry-btn {
    background: linear-gradient(135deg, var(--yellow-deep), #FFD54F);
    color: var(--text-black);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 0 var(--border-color);
}

/* 处理历史 */
.history-card {
    margin-top: 2rem;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.no-history {
    text-align: center;
    color: var(--text-gray);
    padding: 2rem;
}

.history-item {
    background: linear-gradient(135deg, var(--cyan-light), #E0F7FA);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.history-filename {
    font-weight: 600;
    color: var(--text-black);
    margin-bottom: 0.25rem;
}

.history-time {
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* 对比模态框 */
.compare-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: var(--card-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--red-light);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
    background: var(--red-deep);
    color: white;
}

.compare-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.compare-item {
    text-align: center;
}

.compare-item h3 {
    margin-bottom: 1rem;
    color: var(--text-black);
}

.compare-item img {
    max-width: 100%;
    border: 2px solid var(--border-color);
    border-radius: 8px;
}

/* 响应式设计 */
@media (max-width: 968px) {
    .remover-container {
        grid-template-columns: 1fr;
    }

    .result-actions {
        grid-template-columns: 1fr;
    }

    .compare-container {
        grid-template-columns: 1fr;
    }

    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .header-placeholder {
        display: none;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 0 1rem;
    }

    .panel-card {
        padding: 1.5rem;
    }

    .page-title {
        font-size: 1.2rem;
    }
}
