:root {
    --primary-color: #4361ee;
    --primary-light: #eef2ff;
    --secondary-color: #3f37c9;
    --download-color: #ffc107;
    --download-hover-color: #ffa000;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #94a3b8;
    --success-color: #10b981;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f1f5f9;
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    padding-top: 80px; /* 为固定导航栏留出空间 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 20px;
}

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

.navbar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.navbar-logo i {
    margin-right: 8px;
}

.navbar-menu {
    display: flex;
    list-style: none;
}

.navbar-item {
    margin-left: 25px;
}

.navbar-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
}

.navbar-link:hover {
    color: var(--primary-color);
}

.navbar-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar-link:hover::after {
    width: 100%;
}

.navbar-link.active {
    color: var(--primary-color);
}

.navbar-link.active::after {
    width: 100%;
}

/* 移动端菜单按钮 */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--dark-color);
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 15px 20px;
    }

    .navbar-item {
        margin-left: 0;
        margin-bottom: 15px;
    }

    .navbar-toggle {
        display: block;
    }

    .navbar-menu.active {
        display: flex;
    }
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 10px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--gray-color);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 25px;
}

.input-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
    transition: var(--transition);
}

.input-section.compact {
    padding: 10px;
    max-height: 150px;
    overflow: hidden;
}

.section-title {
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
}

.section-title i {
    margin-right: 10px;
    color: var(--primary-color);
}

.combined-input {
    background: var(--primary-light);
    border-radius: var(--border-radius);
    padding: 25px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.combined-input.compact {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.combined-input.compact .upload-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.combined-input.compact .upload-icon {
    margin-right: 10px;
}

.combined-input.compact .upload-details {
    text-align: left;
}

.combined-input.compact h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.combined-input.compact p {
    font-size: 0.85rem;
}

.combined-input:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.combined-input i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.combined-input.compact i {
    font-size: 2rem;
    margin-bottom: 0;
}

.combined-input h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.combined-input p {
    color: var(--gray-color);
    font-size: 0.95rem;
}

#upload {
    display: none;
}

.image-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .image-comparison {
        grid-template-columns: 1fr;
    }
}

.image-panel {
/*            background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAA…TYwABQSCglEENMxgYGAAynwRB8BEAgQAAAABJRU5ErkJggg==);*/
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-header {
    padding: 15px 20px;
    background: var(--primary-light);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.panel-header i {
    margin-right: 8px;
    color: var(--primary-color);
}

.image-container {
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.image-placeholder {
    text-align: center;
    color: var(--gray-color);
    padding: 30px;
}

.image-placeholder i {
    font-size: 4rem;
    margin-bottom: 15px;
    color: #cbd5e1;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: none;
    cursor: pointer;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 8px;
}

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

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

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

.btn-secondary:hover {
    background: var(--primary-light);
}

.btn-download {
    background: var(--download-color);
    color: black;
    border: 1px solid var(--download-color);
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.status-bar {
    text-align: center;
    padding: 15px;
    background: var(--primary-light);
    border-radius: var(--border-radius);
    margin: 20px 0;
    font-weight: 500;
    display: none;
}

.footer {
    text-align: center;
    padding: 20px;
    color: var(--gray-color);
    font-size: 0.95rem;
    margin-top: 40px;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 10px;
}

.footer a:hover {
    text-decoration: underline;
}

/* Loading animation */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(67, 97, 238, 0.2);
    border-radius: 50%;
    border-top: 5px solid var(--primary-color);
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

#paste-target {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    transition: var(--transition);
}

#paste-target.active {
    border-color: var(--primary-color);
    background: rgba(67, 97, 238, 0.05);
}

.drag-over {
    border-color: var(--primary-color) !important;
    background: rgba(67, 97, 238, 0.05) !important;
}

/* 弹窗样式 */
.image-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.popup-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.popup-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.popup-zoom {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.popup-zoom button {
    padding: 5px 10px;
    background-color: white;
    border: none;
    cursor: pointer;
}
