/* static/css/style.css */
:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    background-color: #f8f9fa;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    font-weight: 500;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

.preview-image {
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
    border: 2px solid #dee2e6;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.preview-image:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.image-display {
    background-color: white;
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: all 0.3s ease;
}

.image-display:hover {
    border-color: var(--primary-color);
}

.generated-image {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.reference-item {
    position: relative;
    display: inline-block;
    margin: 0.5rem;
    transition: all 0.3s ease;
}

.reference-item:hover {
    transform: translateY(-2px);
}

.remove-reference {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
}

.reference-item:hover .remove-reference {
    opacity: 1;
}

.remove-reference:hover {
    background: #bb2d3b;
    transform: scale(1.1);
}

.sensitive-warning {
    color: var(--danger-color);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 4px;
}

.status-message {
    font-weight: bold;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.status-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
}

.status-info {
    background-color: #cfe2ff;
    color: #084298;
    border: 1px solid #9ec5fe;
}

.status-warning {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

.progress {
    height: 8px;
    border-radius: 4px;
    margin: 1rem 0;
}

.progress-bar {
    border-radius: 4px;
}

.alert {
    border: none;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

/* 个人中心页面美化样式 */
.bg-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%) !important;
}

.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

.avatar-container {
    position: relative;
    display: inline-block;
}

.avatar-container::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg, #0d6efd, #0dcaf0);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.1;
}

.info-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.75rem;
    border-left: 4px solid #0dcaf0;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.info-icon {
    width: 40px;
    height: 40px;
    background: rgba(13, 202, 240, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.balance-section {
    position: relative;
    overflow: hidden;
}

.balance-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d6efd, #0dcaf0);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 0.75rem;
    font-weight: 600;
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* 账户管理按钮美化 */
.btn-outline-primary, .btn-outline-warning, .btn-outline-info, .btn-outline-danger {
    border-width: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    border-color: #0d6efd;
    transform: translateY(-2px);
}

.btn-outline-warning:hover {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    border-color: #ffc107;
    transform: translateY(-2px);
}

.btn-outline-info:hover {
    background: linear-gradient(135deg, #0dcaf0, #0bb6d4);
    border-color: #0dcaf0;
    transform: translateY(-2px);
}

.btn-outline-danger:hover {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-color: #dc3545;
    transform: translateY(-2px);
}

.btn-outline-success:hover {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* 账户管理卡片样式 */
.account-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.account-card::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.6s ease;
}

.account-card:hover::before {
    left: 100%;
}

.account-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.account-card-primary {
    border-left: 4px solid #007bff;
}

.account-card-warning {
    border-left: 4px solid #ffc107;
}

.account-card-info {
    border-left: 4px solid #17a2b8;
}

.account-card-danger {
    border-left: 4px solid #dc3545;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.account-card-primary .card-icon {
    background: linear-gradient(135deg, #007bff, #0056b3);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.account-card-warning .card-icon {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.account-card-info .card-icon {
    background: linear-gradient(135deg, #17a2b8, #138496);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.account-card-danger .card-icon {
    background: linear-gradient(135deg, #dc3545, #c82333);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.card-icon i {
    font-size: 1.5rem;
    color: white;
    z-index: 2;
}

.card-content {
    flex-grow: 1;
    margin-right: 1rem;
}

.card-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.card-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.4;
}

.account-btn {
    border-width: 2px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 80px;
}

.account-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .account-card {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
    }
    
    .card-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .card-content {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .account-btn {
        width: 100%;
    }
}
    border: 1px solid #badbcc;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* 导航链接样式 */
.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

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

/* 首页特色卡片 */
.feature-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    border-color: var(--primary-color);
}

/* 按钮组样式 */
.btn-group-vertical .btn {
    margin-bottom: 0.5rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .image-display {
        min-height: 300px;
        padding: 1rem;
    }
    
    .generated-image {
        max-height: 300px;
    }
    
    .preview-image {
        max-width: 80px;
        max-height: 80px;
    }
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto;
}

/* 图片缩略图容器 */
.image-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

/* 操作按钮容器 */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 工具提示样式 */
.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
}

/* 导航指示器 */
.nav-indicator {
    position: relative;
}

.nav-indicator::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-indicator.active::after {
    width: 100%;
}

/* 敏感词提示样式 */
.sensitive-hint {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 8px 12px;
    color: #856404;
    font-size: 14px;
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    animation: slideIn 0.3s ease-out;
}

.sensitive-hint i {
    margin-right: 8px;
}

.sensitive-warning-alert {
    border-left: 4px solid #ffc107;
    animation: slideIn 0.3s ease-out;
    margin-bottom: 1rem;
}

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

/* 敏感词标签样式 */
.badge.bg-warning.text-dark {
}

/* 渐变背景样式 */
.bg-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 50%, #0a58ca 100%) !important;
    border: none !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #198754 0%, #157347 50%, #146c43 100%) !important;
    border: none !important;
}

/* 账户管理主卡片样式 */
.account-management-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.account-management-body {
    background: #ffffff;
}
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* 表单文本样式 */
.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 卡片内边距调整 */
.card-body {
    padding: 1.5rem;
}

/* 按钮间距调整 */
.btn {
    margin-bottom: 0.5rem;
}

/* 图片容器样式 */
.img-fluid {
    max-width: 100%;
    height: auto;
}

/* 进度条动画 */
.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 1rem 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* 图标间距调整 */
.fas, .fab {
    margin-right: 0.5rem;
}

/* 文本居中辅助类 */
.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d !important;
}

/* 边框样式 */
.border {
    border: 1px solid #dee2e6 !important;
}

.border-rounded {
    border-radius: 0.375rem;
}

/* 阴影效果 */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* 间距工具类 */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.ms-1 { margin-left: 0.25rem; }
.ms-2 { margin-left: 0.5rem; }
.ms-3 { margin-left: 1rem; }

.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.me-3 { margin-right: 1rem; }

/* 弹性布局辅助类 */
.d-flex {
    display: flex !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

/* 网格间距 */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* 显示隐藏辅助类 */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }

/* 浮动清除 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* 文本截断 */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 响应式图片 */
.img-fluid {
    max-width: 100%;
    height: auto;
}

/* 小文本样式 */
.small { font-size: 0.875rem; }

/* 字体粗细 */
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-normal { font-weight: 400 !important; }

/* 光标指针 */
.cursor-pointer { cursor: pointer; }

/* 禁用状态 */
.disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* 过渡效果 */
.transition { transition: all 0.3s ease; }

/* 焦点样式 */
:focus {
    outline: none;
}

.btn:focus, .form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
}
