:root {
    --primary-color: #6f42c1;
    --secondary-color: #e9ecef;
    --accent-color: #20c997;
    --dark-color: #343a40;
}

body {
    /*background: linear-gradient(135deg, #f5f7fa, #e4e7eb);*/
    min-height: 100vh;
    /*padding-top: 20px;*/
    padding-bottom: 50px;
    /*font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;*/
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-color);
    position: relative;
}

.header h1 {
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

.header h1::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.card {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.card-header {
    background: linear-gradient(to right, var(--primary-color), #7c4dff);
    color: white;
    font-weight: 600;
    border: none;
    padding: 15px 20px;
}

.upload-area {
    border: 3px dashed var(--primary-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background-color: rgba(111, 66, 193, 0.03);
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover, .upload-area.dragover {
    background-color: rgba(111, 66, 193, 0.08);
    border-color: var(--accent-color);
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.btn-custom {
    background: linear-gradient(to right, var(--primary-color), #7c4dff);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-custom:hover {
    background: linear-gradient(to right, #5a32a3, #6a3bff);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(111, 66, 193, 0.3);
}

.btn-custom:active {
    transform: translateY(0);
}

.btn-custom::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-custom:hover::after {
    left: 100%;
}

.btn-secondary-custom {
    background: var(--secondary-color);
    color: #495057;
    border: none;
}

.btn-secondary-custom:hover {
    background: #dde0e3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.thumbnail {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.thumbnail:hover {
    transform: scale(1.05);
}

.thumbnail-container {
    position: relative;
    margin-bottom: 15px;
}

.remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.remove-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.result-container {
    display: none;
    margin-top: 30px;
    text-align: center;
}

#resultImage {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 1px solid #dee2e6;
}

.mode-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.mode-option {
    padding: 15px 25px;
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
    flex: 1;
    min-width: 120px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.mode-option:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(111, 66, 193, 0.1);
}

.mode-option.active {
    border-color: var(--primary-color);
    background: linear-gradient(to bottom right, rgba(111, 66, 193, 0.1), rgba(32, 201, 151, 0.1));
    box-shadow: 0 5px 15px rgba(111, 66, 193, 0.15);
}

.mode-option i {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.preview-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: var(--secondary-color);
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.preview-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 25px;
}

.instructions {
    background: #e9ecef;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    position: relative;
}

.instructions h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
}

.options-panel {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.options-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-group {
    margin-bottom: 20px;
}

.option-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.color-preview {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
    border: 1px solid #dee2e6;
}

footer {
    text-align: center;
    margin-top: 40px;
    color: #6c757d;
    font-size: 0.9rem;
    padding: 20px;
}

.progress-container {
    margin: 20px 0;
    display: none;
}

.progress-bar {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.feature-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--accent-color);
    color: white;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    z-index: 10;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .mode-option {
        min-width: 100px;
        padding: 12px 15px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }
}
