/* Base Styles */
:root {
    --primary-color: #4A6BFF;
    --primary-color-rgb: 74, 107, 255;
    --primary-color-dark: #3a55cc;
    --secondary-color: #f8f9fa;
    --accent-color: #FF6B6B;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --text-color: #333;
    --light-text: #666;
    --border-color: #e0e0e0;
    --card-bg: #fff;
    --card-header-background: #f9fafc;
    --background-color: #f5f7fa;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --animation-speed: 0.3s;
}

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

body {
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

/* Header Styles */
header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    position: relative;
}

/* Language Toggle Styles */
.language-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.title-chinese {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.title-english {
    font-size: 1.2rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    color: #666;
    letter-spacing: 1px;
}

/* Workflow Steps */
.workflow-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 100;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
}

.step:hover {
    transform: translateY(-3px);
    background-color: rgba(74, 107, 255, 0.05);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all var(--animation-speed);
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.step.active .step-number {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(74, 107, 255, 0.5);
}

.step.completed .step-number {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.step.completed .step-number:after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
}

.step-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--light-text);
    transition: color var(--animation-speed);
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.step.completed .step-label {
    color: var(--success-color);
}

.step-connector {
    flex-grow: 1;
    height: 3px;
    background-color: var(--border-color);
    margin: 0 10px;
    position: relative;
    top: -20px;
    transition: background-color var(--animation-speed);
}

.step.completed + .step-connector {
    background-color: var(--success-color);
}

/* Card Styles */
.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    position: relative;
    animation: fadeIn 0.5s ease forwards;
}

.card.hidden {
    opacity: 0;
    transform: translateY(20px);
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background-color: var(--card-header-background);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.card-header i {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--primary-color);
}

.card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.card-body {
    padding: 1.5rem;
    position: relative;
}

/* Step indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    gap: 0.3rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
}

.step-indicator i {
    margin-right: 0.3rem;
    font-size: 0.7rem;
}

.step-indicator span {
    display: inline-block;
    text-align: center;
}

/* File Upload Styles */
.file-upload {
    position: relative;
    width: 100%;
}

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

.file-upload-placeholder {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--animation-speed), background-color var(--animation-speed);
}

.file-upload-placeholder:hover {
    border-color: var(--primary-color);
    background-color: rgba(74, 107, 255, 0.03);
}

.file-upload-placeholder.dragover {
    border-color: var(--primary-color);
    background-color: rgba(74, 107, 255, 0.05);
    transform: scale(1.01);
}

.file-upload-placeholder i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.file-upload-placeholder p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.file-format-hint {
    font-size: 0.9rem;
    color: var(--light-text);
}

.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.file-details {
    display: flex;
    align-items: center;
}

.file-details i {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(74, 107, 255, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

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

.loading-text {
    color: var(--light-text);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.animate-pulse {
    animation: pulse 1s ease infinite;
}

.animate-slideIn {
    animation: slideIn 0.3s ease forwards;
}

/* Improved Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    gap: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Download button styles */
.btn-large {
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-large:hover {
    transform: none;
}

.download-options .btn {
    position: relative;
}

.download-options .btn:hover {
    transform: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.btn i {
    font-size: 0.9rem;
}

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

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

.btn-secondary {
    background-color: #e9ecef;
    color: #495057;
}

.btn-secondary:hover {
    background-color: #dee2e6;
}

.buttons-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Image Preview Styles */
.image-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#image-preview-wrapper {
    max-width: 100%;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#image-preview-wrapper:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

#image-preview {
    max-width: 100%;
    height: auto;
    display: block;
}

.image-info {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

/* EXIF Info Styles */
.exif-info {
    padding: 0.5rem;
}

.exif-data-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.exif-item {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    background-color: #f9fafc;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* EXIF Info Styles */
.exif-info {
    padding: 0.5rem;
}

.exif-data-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.exif-item {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    background-color: #f9fafc;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.exif-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.exif-item label {
    font-weight: 500;
    margin-right: 0.5rem;
    color: var(--light-text);
}

.exif-note {
    background-color: rgba(74, 107, 255, 0.05);
    border-left: 3px solid var(--primary-color);
    padding: 0.8rem 1rem;
    border-radius: 0 6px 6px 0;
    margin-top: 1rem;
}

.exif-note i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Border Controls Styles */
.border-mode-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.8rem;
    background-color: #f9fafc;
    border-radius: 6px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 1rem;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-weight: 500;
}

.border-controls {
    padding: 0.5rem;
}

.control-group {
    margin-bottom: 1.2rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.range-with-value {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider {
    flex-grow: 1;
    height: 6px;
    background: #e0e0e0;
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(74, 107, 255, 0.5);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(74, 107, 255, 0.5);
}

.vertical-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Color controls layout */
.color-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.color-controls .control-group {
    flex: 1 1 calc(50% - 1.5rem);
    min-width: 200px;
}

/* Camera info options layout */
.camera-info-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.camera-info-options .control-group {
    flex: 1 1 calc(50% - 1.5rem);
    min-width: 200px;
    margin-bottom: 0.8rem;
}

/* Adding horizontal controls layout */
.horizontal-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.horizontal-controls .control-group {
    flex: 1 1 calc(50% - 1.5rem);
    min-width: 200px;
}

/* Adding horizontal controls layout */
.horizontal-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.horizontal-controls .control-group {
    flex: 1 1 calc(50% - 1.5rem);
    min-width: 200px;
}


.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.range-with-value {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider {
    flex-grow: 1;
    height: 6px;
    background: #e0e0e0;
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(74, 107, 255, 0.5);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(74, 107, 255, 0.5);
}

.vertical-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Color controls layout */
.color-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.color-controls .control-group {
    flex: 1 1 calc(50% - 1.5rem);
    min-width: 200px;
}

/* Camera info options layout */
.camera-info-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.camera-info-options .control-group {
    flex: 1 1 calc(50% - 1.5rem);
    min-width: 200px;
    margin-bottom: 0.8rem;
}

/* Adding horizontal controls layout */
.horizontal-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.horizontal-controls .control-group {
    flex: 1 1 calc(50% - 1.5rem);
    min-width: 200px;
}

/* Result Styles */
.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#result-image-wrapper {
    max-width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#result-image-wrapper:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

#result-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.download-options {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    position: relative;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    color: var(--light-text);
    border-top: 1px solid var(--border-color);
    background-color: #f9fafc;
}

/* Notification Styles */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.notification {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: white;
    margin-bottom: 10px;
    transform: translateX(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
}

.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-error {
    border-left: 4px solid var(--error-color);
}

.notification-warning {
    border-left: 4px solid var(--warning-color);
}

.notification-info {
    border-left: 4px solid var(--primary-color);
}

.notification i {
    font-size: 1.2rem;
    margin-right: 10px;
}

.notification-success i {
    color: var(--success-color);
}

.notification-error i {
    color: var(--error-color);
}

.notification-warning i {
    color: var(--warning-color);
}

.notification-info i {
    color: var(--primary-color);
}

.notification-message {
    flex-grow: 1;
    font-size: 0.9rem;
}

.notification-close {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    margin-left: 10px;
    transition: color 0.2s ease;
}

.notification-close:hover {
    color: #666;
}

.notification-hiding {
    transform: translateX(120%);
    opacity: 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .workflow-steps {
        padding: 0.8rem;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .step-label {
        font-size: 0.8rem;
    }
    
    .exif-data-container {
        grid-template-columns: 1fr;
    }
    
    .buttons-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .title-chinese {
        font-size: 2rem;
    }
    
    .title-english {
        font-size: 1rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    
    .card-header i {
        margin-bottom: 0.5rem;
    }
    
    .step-indicator {
        position: static;
        margin-top: 0.5rem;
        align-self: flex-start;
    }
    
    .file-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .workflow-steps {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 1rem;
    }
    
    .step {
        min-width: 80px;
    }
}