body {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.7), rgba(59, 130, 246, 0.7)), url('../img/bg.jpg') center/cover no-repeat fixed;
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    will-change: scroll-position;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
}

.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.96);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    margin-bottom: 1.75rem;
}

.card:hover {
    transform: translate3d(0, -5px, 0);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 导航栏样式 */
.navbar {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    border-radius: 8px;
}

.nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.progress {
    height: 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.1);
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    transition: width 0.5s ease;
}

.copy-url {
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-url:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    color: white;
    transform: scale(1.05);
}

.image-card {
    transition: transform 0.2s;
}

.image-card:hover {
    transform: translateY(-2px);
}

/* 上传区域样式 */
.upload-area {
    border: 3px dashed rgba(14, 165, 233, 0.3);
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.05);
    transform: translate3d(0, -2px, 0);
}

.upload-area.dragover {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.1);
    transform: scale(1.02);
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.upload-area:hover::before {
    left: 100%;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    border: none;
    border-radius: 14px;
    padding: 0.875rem 2.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    transform: translate3d(0, -3px, 0);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

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

/* 表单样式 */
.form-control {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25);
    background: white;
}

.form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

/* 卡片头部样式 */
.card-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    color: white;
    border-bottom: none;
    padding: 1.75rem;
}

.card-header h3, .card-header h4 {
    margin: 0;
    font-weight: 700;
    font-size: 1.5rem;
}

.card-body {
    padding: 2rem;
    letter-spacing: -0.02em;
}

/* 上传结果区域样式 */
#uploadResult {
    border: 2px solid #28a745;
    animation: pulse 2s infinite;
}

#uploadResult .card-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-weight: 600;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* 上传结果图片样式 */
#uploadedImageContainer img {
    border: 3px solid #28a745;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .display-4 {
        font-size: 2.25rem;
        line-height: 1.2;
    }
    
    .card {
        border-radius: 16px;
        margin: 0 0.5rem 1.5rem;
    }
    
    .card-body {
        padding: 1.75rem;
    }
    
    .upload-area {
        padding: 3rem 1rem;
    }
    
    .btn-lg {
        padding: 0.875rem 2rem;
        font-size: 1rem;
        width: 100%;
    }
    
    .navbar-brand {
        font-size: 1.35rem;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-header h3 {
        font-size: 1.25rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* 页面加载动画 */
body {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
}

/* 文本选择样式 */
::selection {
    background: rgba(14, 165, 233, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(14, 165, 233, 0.3);
    color: white;
}

/* 焦点样式改进 */
.btn:focus,
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(14, 165, 233, 0.25) !important;
    outline: none;
}

/* 加载状态 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 成功状态 */
.success {
    border-color: #28a745 !important;
    background: rgba(40, 167, 69, 0.1) !important;
}

/* 错误状态 */
.error {
    border-color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.1) !important;
}

#uploadedImageContainer img:hover {
    transform: scale(1.02);
}

/* 链接输入框样式 */
#imageUrlInput {
    background-color: #f8f9fa;
    border: 2px solid #28a745;
    font-weight: 500;
    color: #28a745;
    border-radius: 12px;
    padding: 0.75rem 1rem;
}

#imageUrlInput:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    border-color: #28a745;
}

/* 警告框样式 */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    color: white;
}

/* 徽章样式 */
.badge {
    font-size: 0.75em;
    border-radius: 12px;
    padding: 0.35em 0.65em;
    font-weight: 600;
}

/* 图片卡片样式 */
.image-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    border-radius: 16px;
    overflow: hidden;
}

.image-card:hover {
    transform: translate3d(0, -5px, 0);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* 可访问性改进 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .btn,
    #uploadForm,
    #uploadProgress {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}