/* 自定义高端大气样式 */

/* 基础样式增强 */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    transition: all 0.5s ease;
}

/* 页面加载完成状态 */
body.loaded {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* 鼠标跟随效果 */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.1s ease;
    mix-blend-mode: difference;
    opacity: 0.6;
}

body:hover .cursor {
    transform: scale(1.2);
    opacity: 0.8;
}

/* 点击时的脉冲效果 */
.cursor:active {
    transform: scale(0.8);
    opacity: 1;
}

/* 顶部导航栏 */
#page-topbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    border-bottom: none;
}

.navbar-brand-box {
    padding: 0 1.5rem;
}

/* 侧边栏样式已在 home.css 中完整定义，此处仅保留z-index确保层级 */
#sidebar {
    z-index: 1000;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.card-subtitle {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

/* 加载中的按钮样式 */
.btn:disabled {
    opacity: 0.7;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 图片上传区域 */
.dropify-wrapper {
    border-radius: 1rem;
    border: 2px dashed #e2e8f0;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
}

.dropify-wrapper:hover {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.dropify-wrapper.drag-active {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.dropify-message p {
    color: #718096;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.dropify-wrapper:hover .dropify-message p {
    color: #667eea;
}

/* 会员中心右侧：网站公告小贴士列表 */
.user-center-side-section .side-tip-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.side-tip-list li {
	display: flex;
	align-items: flex-start;
	font-size: 13px;
	color: #4a5568;
	margin-bottom: 6px;
}

.side-tip-icon {
	color: #6366f1;
	margin-right: 6px;
	line-height: 1.2;
}

.side-tip-text {
	flex: 1;
}

/* 上传的图片预览 */
.dropify-preview {
    border-radius: 0.8rem;
    overflow: hidden;
}

.dropify-render img {
    transition: transform 0.3s ease;
}

.dropify-wrapper:hover .dropify-render img {
    transform: scale(1.05);
}

/* 分类卡片 */
.category-card .avatar-md {
    width: 80px;
    height: 80px;
}

.category-card .avatar-title {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.category-card:hover .avatar-title {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 作品展示卡片 */
.card-img-top {
    border-radius: 0.5rem 0.5rem 0 0;
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* 搜索框样式 */
.input-group .form-control {
    border-radius: 0.5rem 0 0 0.5rem;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.input-group-append .btn {
    border-radius: 0 0.5rem 0.5rem 0;
}

/* 结果区域 */
#result-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

#result-card .card-title {
    color: white;
}

#prompt-result pre {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 0.5rem;
    padding: 1rem;
    color: white;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

/* 页脚 */
.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 2rem;
    padding: 1.5rem 0;
}

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

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

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

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

/* 卡片动画 */
.card {
    animation: fadeInUp 0.6s ease;
}

/* 交替动画效果 */
.row:nth-child(odd) .card {
    animation: slideInRight 0.6s ease;
}

.row:nth-child(even) .card {
    animation: slideInLeft 0.6s ease;
}

/* 悬停时的脉冲效果 */
.card:hover {
    animation: pulse 0.6s ease;
}

/* 搜索结果卡片的特殊动画 */
#search-results-list .card {
    animation: fadeInUp 0.4s ease forwards;
}

/* 结果卡片的特殊动画 */
#result-card {
    animation: fadeInUp 0.5s ease forwards, pulse 1s ease 0.5s;
}

/* 响应式调整 */

/* 平板设备 */
@media (max-width: 992px) {
    .card {
        margin-bottom: 1.5rem;
    }
    
    .col-lg-3 {
        margin-bottom: 1.5rem;
    }
    
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .col-lg-3, .col-md-6 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* 手机设备 - 768px以下 */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1.25rem;
        animation: fadeInUp 0.4s ease !important;
    }
    
    .navbar-brand-box {
        padding: 0 1rem;
    }
    
    /* 简化按钮大小 */
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    /* 调整卡片内容边距 */
    .card-body {
        padding: 1.25rem;
    }
    
    /* 图片上传区域高度调整 */
    .dropify-wrapper {
        height: 250px !important;
    }
    
    /* 简化搜索框 */
    .input-group .form-control {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    /* 隐藏鼠标跟随效果 */
    .cursor {
        display: none;
    }
}

/* 小手机设备 - 576px以下 */
@media (max-width: 576px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .card-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    /* 图片上传区域高度进一步调整 */
    .dropify-wrapper {
        height: 200px !important;
    }
    
    /* 按钮组垂直排列 */
    .text-center button {
        display: block;
        width: 100%;
        margin: 0.5rem 0 !important;
    }
    
    /* 调整页脚 */
    .footer {
        text-align: center;
        padding: 1rem 0;
    }
    
    .footer .col-sm-6 {
        margin-bottom: 0.5rem;
    }
    
    /* 调整提示词结果区域 */
    #prompt-result pre {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* =========================================
   User Center Beautification & Color Coding
   ========================================= */

/* 1. Metric Cards */
.user-center-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 0;
}

.metric-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 14px 16px 12px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.08);
}

.metric-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.metric-content {
    flex: 1;
    min-width: 0;
}

.metric-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 2px;
}

.metric-value {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    margin: 4px 0;
}

.metric-footer {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
}

/* Color Coding by Functionality */

/* Usage - Blue (Calm, Tech) */
.metric-card-usage .metric-icon-wrapper {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}
.metric-card-usage:hover .metric-icon-wrapper {
    background: #3b82f6;
    color: #ffffff;
    transform: scale(1.05) rotate(-5deg);
}

/* Money - Gold/Orange (Wealth, Attention) */
.metric-card-money .metric-icon-wrapper {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}
.metric-card-money:hover .metric-icon-wrapper {
    background: #f59e0b;
    color: #ffffff;
    transform: scale(1.05) rotate(5deg);
}
.metric-card-money .metric-value {
    color: #d97706; /* Darker orange for the value */
}

/* Trend - Purple (Growth, Analytics) */
.metric-card-trend .metric-icon-wrapper {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}
.metric-card-trend:hover .metric-icon-wrapper {
    background: #8b5cf6;
    color: #ffffff;
    transform: scale(1.05) rotate(-5deg);
}

/* Active - Green (Health, Status) */
.metric-card-active .metric-icon-wrapper {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.metric-card-active:hover .metric-icon-wrapper {
    background: #10b981;
    color: #ffffff;
    transform: scale(1.05) rotate(5deg);
}

/* 2. Sections & Cards General */
.user-center-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    padding: 16px 18px;
    transition: box-shadow 0.3s ease;
}

/* 嵌套 section 去除多余装饰，避免双重 padding */
.user-center-section .user-center-section {
    box-shadow: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.user-center-section-header h2 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    position: relative;
    padding-left: 12px;
    margin: 0;
}

.user-center-section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 14px;
    background: linear-gradient(to bottom, #6366f1, #8b5cf6);
    border-radius: 3px;
}

/* 3. Membership Card (Premium Feel) */
.membership-card-main-overview {
    background: linear-gradient(120deg, #1e1b4b 0%, #312e81 100%) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    padding: 24px !important;
}

/* Abstract Pattern Overlay */
.membership-card-main-overview::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.membership-card-main-overview .membership-label {
    color: rgba(255,255,255,0.7) !important;
}

.membership-card-main-overview .membership-level-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    padding: 4px 12px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.membership-card-main-overview .membership-line {
    color: rgba(255,255,255,0.9);
}

.membership-card-main-overview .membership-desc {
    color: rgba(255,255,255,0.6) !important;
}

.membership-actions .user-center-primary-btn {
    background: #ffffff;
    color: #312e81;
    font-weight: 600;
}
.membership-actions .user-center-primary-btn:hover {
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(255,255,255,0.3);
}

.membership-actions .user-center-ghost-btn {
    border-color: rgba(255,255,255,0.3);
    color: #ffffff;
    background: transparent;
}
.membership-actions .user-center-ghost-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* 4. Table Improvements */
.user-center-table-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.user-center-table thead {
    background: #f8fafc;
}

.user-center-table th {
    font-weight: 600;
    color: #64748b;
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    white-space: nowrap;
}

.user-center-table td {
    padding: 8px 10px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12px;
}

.user-center-table tr:hover td {
    background-color: #f8fafc;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .user-center-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    .user-center-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 576px) {
    .user-center-metric-grid {
        grid-template-columns: 1fr;
    }
    .metric-card {
        padding: 12px;
    }
}

/* 会员中心：积分套餐列表（宽度自适应 + 单独美化） */
.user-vip-packages-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    display: grid;
    gap: 12px;
}

@media (max-width: 768px) {
    .user-vip-packages-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}
