/*
Theme Name: WatermarkAI
Theme URI: https://chinerawear.com
Description: AI-powered watermark removal membership site
Version: 1.0
Author: AI Empire
*/

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

.watermark-app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 配额显示 */
.quota-display {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.quota-display h3 {
    color: var(--primary);
    margin-bottom: 12px;
}

.quota-display p {
    font-size: 18px;
    margin-bottom: 16px;
}

.upgrade-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.upgrade-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* 上传区域 */
.upload-section {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.upload-section h2 {
    margin-bottom: 24px;
    color: var(--dark);
}

.upload-area {
    border: 2px dashed var(--gray);
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    transition: all 0.3s;
    background: var(--light);
    margin-bottom: 24px;
    cursor: pointer;
    display: block;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.upload-area input[type="file"] {
    opacity: 0;
    position: absolute;
    z-index: -1;
}

.upload-area label {
    cursor: pointer;
    display: block;
}

.upload-area label span {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.upload-area label small {
    color: var(--gray);
}

.upload-prompt {
    cursor: pointer;
}

.upload-prompt span {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.upload-prompt small {
    color: var(--gray);
    display: block;
}

.button-container {
    text-align: center;
    margin-top: 24px;
}

.btn-primary-large {
    display: inline-block;
    padding: 20px 48px;
    background: linear-gradient(135deg, var(--primary) 0%, #5568d3 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary-large:hover {
    background: linear-gradient(135deg, #5568d3 0%, var(--primary) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
}

.btn-primary-large:active {
    transform: translateY(-1px);
}

#process-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#process-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.image-preview-container {
    margin-top: 16px;
    text-align: center;
}

/* 处理状态 */
#processing-status {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* 结果显示 */
#result-section {
    margin-top: 32px;
}

#result-section h3 {
    margin-bottom: 24px;
}

/* Image Comparison Slider */
.comparison-container {
    width: 100%;
    max-width: 800px;
    margin: 30px auto;
}
.image-comparison {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    background: #eee;
    line-height: 0;
}
.image-comparison img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}
.img-comp-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    border-right: 2px solid var(--white);
}
.img-comp-slider {
    position: absolute;
    z-index: 9;
    cursor: ew-resize;
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    opacity: 0.9;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    margin-top: -20px;
    margin-left: -20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    color: white;
    font-weight: bold;
    user-select: none;
}
.result-actions {
    text-align: center;
    margin-top: 20px;
}
.upgrade-hint {
    margin-top: 15px;
    font-size: 14px;
    color: var(--gray);
}
.upgrade-hint a {
    color: var(--primary);
    font-weight: 600;
}

.image-box {
    text-align: center;
}

.image-box h4 {
    margin-bottom: 12px;
    color: var(--gray);
}

.image-box img {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 16px;
}

.download-btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--secondary);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.download-btn:hover {
    background: #7c3aed;
    transform: translateY(-2px);
}

/* 历史记录 */
.history-section {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.history-section h3 {
    margin-bottom: 24px;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.history-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.history-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.history-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.history-info {
    padding: 12px;
    background: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-info span {
    font-size: 14px;
    color: var(--gray);
}

.history-info a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

/* Hero Section (未登录用户) */
.hero-section {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    border-radius: 16px;
    margin-bottom: 60px;
}

.hero-section h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

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

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

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

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

/* 功能介绍 */
.features-section {
    padding: 60px 20px;
}

.features-section h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--white);
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.feature-card .icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray);
    line-height: 1.6;
}

/* 试用提示 */
.trial-notice {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 16px;
}

.trial-notice a {
    color: #ffd700;
    text-decoration: underline;
    font-weight: 600;
}

.trial-notice a:hover {
    color: #ffed4e;
}

.upgrade-notice {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: var(--white);
    border-radius: 12px;
    margin-top: 24px;
}

.upgrade-notice p {
    font-size: 18px;
    margin: 0;
}

.upgrade-notice a {
    color: #ffd700;
    text-decoration: underline;
    font-weight: 700;
}

.upgrade-notice a:hover {
    color: #ffed4e;
}

/* Hero按钮样式优化 */
.hero-section button.btn-primary {
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    background: var(--white);
    color: var(--primary);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.hero-section button.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* 左右对比布局 */
.comparison-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: start;
    margin-top: 30px;
}

.comparison-side {
    text-align: center;
}

.comparison-side h3 {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 16px;
    font-weight: 600;
}

.upload-box, .result-box {
    border: 2px dashed var(--gray);
    border-radius: 12px;
    padding: 40px 20px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--light);
    transition: all 0.3s;
    cursor: pointer;
}

.upload-box:hover {
    border-color: var(--primary);
    background: #f8f9ff;
}

.result-box {
    cursor: default;
    position: relative;
}

.upload-prompt {
    text-align: center;
}

.upload-prompt span {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.upload-prompt small {
    color: var(--gray);
    font-size: 14px;
}

.empty-state {
    text-align: center;
    color: var(--gray);
}

.empty-state span {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 16px;
}

.comparison-middle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 60px;
}

.btn-remove-watermark {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border: none;
    padding: 20px 40px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-remove-watermark:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-remove-watermark:active {
    transform: translateY(0);
}

.processing-indicator {
    text-align: center;
}

.processing-indicator .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

.processing-indicator p {
    color: var(--gray);
    font-size: 14px;
}

.download-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 32px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.upgrade-notice {
    margin-top: 24px;
    padding: 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 8px;
    text-align: center;
}

.upgrade-notice p {
    margin: 0;
    font-size: 16px;
    color: var(--dark);
}

.upgrade-notice a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.upgrade-notice a:hover {
    text-decoration: underline;
}

/* Pricing 页提示 */
.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
}
.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
}
.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* 游客配额徽章 */
.guest-quota-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #166534;
    margin-bottom: 16px;
}

.quota-upgrade-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}

.quota-upgrade-link:hover {
    text-decoration: underline;
}

.guest-limit-banner {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 16px;
    color: #991b1b;
    font-size: 14px;
    text-align: center;
}

.guest-limit-banner a {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
}

/* 画笔控件 */
#brush-controls {
    display: none;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 8px 12px;
    background: #f1f5ff;
    border-radius: 8px;
    border: 1px solid #d4d8f8;
}

.brush-label {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

.brush-tip {
    font-size: 12px;
    color: #e53e3e;
    font-weight: 500;
}

#brush-size {
    width: 80px;
    cursor: pointer;
    accent-color: #6366f1;
}

#clear-canvas-btn {
    font-size: 12px;
    padding: 4px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    background: #fff;
    color: #555;
    transition: all 0.2s;
}

#clear-canvas-btn:hover {
    background: #fee2e2;
    border-color: #e53e3e;
    color: #e53e3e;
}

#canvas-container {
    position: relative;
    line-height: 0;
    width: 100%;
}

#mask-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    cursor: crosshair;
    touch-action: none;
}

.upload-box {
    cursor: pointer;
}

.upload-box:has(#canvas-container[style*="block"]) {
    padding: 0;
    border-style: solid;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 32px;
    }

    .image-comparison {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .trial-notice {
        font-size: 14px;
        padding: 12px;
    }

    .comparison-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .comparison-middle {
        padding-top: 0;
    }

    .upload-box, .result-box {
        min-height: 300px;
    }
}

/* USDT 支付按钮与模态框 */
.usdt-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: #26a17b;
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    text-align: center;
}

.usdt-btn:hover {
    background: #1e8565;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(38, 161, 123, 0.3);
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: modalSlideDown 0.3s ease-out;
}

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

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    color: var(--gray);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--dark);
}

.crypto-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--light);
}

.crypto-header h2 {
    color: #26a17b;
    margin-bottom: 8px;
}

.address-box {
    background: var(--light);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.address-box label {
    display: block;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 8px;
    font-weight: 600;
}

.copy-input {
    display: flex;
    gap: 8px;
}

.copy-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    background: var(--white);
}

.copy-input button {
    padding: 0 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.crypto-instructions {
    font-size: 14px;
    color: var(--dark);
}

.crypto-instructions ol {
    margin: 16px 0;
    padding-left: 20px;
}

.crypto-instructions li {
    margin-bottom: 10px;
}

.crypto-notice {
    background: #fff9db;
    padding: 12px;
    border-left: 4px solid #fcc419;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 16px;
}

