/* 
 * 北北科技图片处理工具专用样式
 * 版权所有，盗版必究
 * 技术支持QQ: 173680161
 */

/* 防止样式盗用 */
body::before {
    content: "北北科技图片处理工具";
    display: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

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

.main-content {
    display: flex;
    flex-wrap: wrap;
    padding: 25px;
}

.upload-section {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    border-right: 1px solid #eee;
}

.preview-section {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #182848;
    border-bottom: 2px solid #4b6cb7;
    padding-bottom: 8px;
}

.upload-area {
    border: 2px dashed #4b6cb7;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #f8faff;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    background-color: #eef2ff;
    transform: translateY(-3px);
}

.upload-area.dragover {
    background-color: #e0e7ff;
    border-color: #3a5795;
}

.upload-icon {
    font-size: 50px;
    color: #4b6cb7;
    margin-bottom: 15px;
}

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

.image-info {
    margin-top: 25px;
    background-color: #f8faff;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e7ff;
}

.info-label {
    font-weight: 600;
    color: #4b6cb7;
}

.processing-options {
    margin-top: 25px;
}

.option-group {
    margin-bottom: 20px;
}

.option-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #182848;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preset-btn {
    padding: 8px 15px;
    background-color: #eef2ff;
    border: 1px solid #c3cfe2;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    text-align: center;
}

.preset-btn:hover {
    background-color: #4b6cb7;
    color: white;
}

.preset-btn.active {
    background-color: #4b6cb7;
    color: white;
    border-color: #4b6cb7;
}

.custom-size {
    display: flex;
    gap: 10px;
}

.size-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #c3cfe2;
    border-radius: 5px;
}

.quality-slider {
    width: 100%;
    margin-top: 10px;
}

.preview-container {
    text-align: center;
    margin-bottom: 25px;
}

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

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
}

.btn-primary {
    background-color: #4b6cb7;
    color: white;
}

.btn-primary:hover {
    background-color: #3a5795;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #e0e7ff;
    color: #4b6cb7;
}

.btn-secondary:hover {
    background-color: #c3cfe2;
    transform: translateY(-2px);
}

.btn-success {
    background-color: #4caf50;
    color: white;
}

.btn-success:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

.result-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8faff;
    border-radius: 10px;
    display: none;
}

.result-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.result-info {
    margin-bottom: 20px;
}

.download-options {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.download-option {
    flex: 1;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.download-option.free {
    border: 2px solid #4caf50;
}

.download-option.paid {
    border: 2px solid #ff9800;
}

.price-tag {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff5722;
    margin: 10px 0;
}

.download-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4caf50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    border: none;
    cursor: pointer;
}

.download-btn.paid {
    background-color: #ff9800;
}

.download-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.download-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.watermark-notice {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

.paid-download-info {
    background-color: #fff8e1;
    padding: 8px;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #e65100;
}

.message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.message.info {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

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

.cardkey-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.cardkey-input {
    width: 100%;
    padding: 12px;
    margin: 15px 0;
    border: 2px solid #e0e7ff;
    border-radius: 5px;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 2px;
}

.cardkey-input:focus {
    border-color: #4b6cb7;
    outline: none;
}

.cardkey-info {
    background-color: #e3f2fd;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    font-size: 0.9rem;
    text-align: left;
}

.cardkey-processing {
    background-color: #fff3e0;
    color: #e65100;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    text-align: center;
    display: none;
}

.cardkey-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    text-align: center;
    display: none;
}

.cardkey-error {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    text-align: center;
    display: none;
}

.usage-info {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 0.9rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .upload-section, .preview-section {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .download-options {
        flex-direction: column;
    }
}