/* ================= 爱秀系统 - 精简版 ================= */

/* 全局变量 */
:root {
    --aixiu-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --aixiu-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --aixiu-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --aixiu-border-radius: 12px;
    --aixiu-transition: all 0.3s ease;
    --aixiu-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 爱秀容器 */
.aixiu-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--aixiu-primary);
    overflow-y: auto;
}

.aixiu-container .container {
    position: relative;
    padding: 20px;
    min-height: 100vh;
    max-width: 1140px;
    margin: 0 auto;
    width: 90%;
}

/* 头部区域 */
.aixiu-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--aixiu-border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--aixiu-shadow);
}

.aixiu-header h1 {
    background: var(--aixiu-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.user-balance {
    background: var(--aixiu-success);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
}

/* 过滤器区域 */
.aixiu-filters {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--aixiu-border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--aixiu-shadow);
}

.aixiu-filters .form-control,
.aixiu-filters .btn {
    border-radius: 8px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: var(--aixiu-transition);
}

.aixiu-filters .btn-outline-primary {
    background: var(--aixiu-primary);
    border: none;
    color: white;
    font-weight: 600;
}

/* 商品网格 */
.aixiu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0 10px;
}

/* 确保在所有屏幕尺寸下都有合适的最小宽度 */
@media (max-width: 480px) {
    .aixiu-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr)) !important; /* 强制两列，最小140px */
        gap: 10px;
    }
    
    .aixiu-item {
        padding: 10px 6px;
        min-height: auto;
    }
    
    .aixiu-item img {
        width: 65px;
        height: 78px;
        margin-bottom: 8px;
    }
    
    .aixiu-item h5 {
        font-size: 0.85rem;
        margin-bottom: 5px;
        line-height: 1.2;
    }
    
    .aixiu-price {
        font-size: 0.95rem;
        margin-bottom: 5px;
    }
    
    .aixiu-meta {
        font-size: 0.75em;
        margin-bottom: 8px;
        padding: 2px 5px;
    }
    
    .aixiu-buttons .btn {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}

/* 商品卡片 */
.aixiu-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--aixiu-border-radius);
    padding: 20px;
    text-align: center;
    transition: var(--aixiu-transition);
    box-shadow: var(--aixiu-shadow);
    position: relative;
}

.aixiu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 已拥有的商品样式 */
.aixiu-item.owned {
    border: 2px solid #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.aixiu-item.owned::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(40, 167, 69, 0.1);
    border-radius: var(--aixiu-border-radius);
    pointer-events: none;
}

/* 已拥有徽章 */
.owned-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    z-index: 2;
}

.aixiu-item img {
    width: 100px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.aixiu-item h5 {
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.aixiu-price {
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--aixiu-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.aixiu-meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
    padding: 4px 8px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    display: inline-block;
}

.aixiu-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.aixiu-buttons .btn {
    border-radius: 20px;
    font-weight: 600;
    padding: 8px 16px;
    border: none;
    transition: var(--aixiu-transition);
}

.aixiu-buttons .btn-primary {
    background: var(--aixiu-primary);
}

.aixiu-buttons .btn-warning {
    background: var(--aixiu-secondary);
}

/* 已拥有商品的按钮样式 */
.aixiu-item.owned .btn-warning {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.aixiu-item.owned .btn-warning:hover {
    background: linear-gradient(135deg, #218838, #1e9b8a);
    transform: scale(1.05);
}

/* 库存网格 */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.inventory-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--aixiu-border-radius);
    padding: 20px;
    text-align: center;
    transition: var(--aixiu-transition);
    box-shadow: var(--aixiu-shadow);
}

.inventory-item:hover {
    transform: translateY(-5px);
}

.inventory-item.equipped {
    border: 2px solid #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.inventory-item img {
    width: 80px;
    height: 96px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* 统计卡片 */
.wardrobe-stats,
.aixiu-filters {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--aixiu-border-radius);
    padding: 20px;
    box-shadow: var(--aixiu-shadow);
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    transition: var(--aixiu-transition);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--aixiu-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 当前装备 */
.current-outfit {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--aixiu-border-radius);
    padding: 20px;
    box-shadow: var(--aixiu-shadow);
    margin-bottom: 20px;
}

.aixiu-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.outfit-avatar {
    width: 100px;
    height: 120px;
    border-radius: 8px;
    border: 2px solid #ffd700;
    object-fit: cover;
}

/* 个人中心样式 */
.user-info-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-main-info {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.user-info-content {
    flex: 1;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.user-welcome {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.user-welcome .username {
    color: #007bff;
    font-weight: 500;
}

.logout-link {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    padding: 2px 8px;
    border: 1px solid #007bff;
    border-radius: 4px;
    transition: var(--aixiu-transition);
}

.logout-link:hover {
    background: #007bff;
    color: white;
    text-decoration: none;
}

.user-id {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px 0;
}

.user-quick-actions {
    display: flex;
    gap: 10px;
}

.user-quick-actions a {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
}

.user-quick-actions a:hover {
    text-decoration: underline;
}

.user-section {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.6;
}

.user-section-title {
    color: #333;
    font-weight: 500;
    margin-right: 5px;
}

.user-section a {
    color: #007bff;
    text-decoration: none;
    margin-right: 5px;
}

.user-section a:hover {
    text-decoration: underline;
}

.user-section .separator {
    color: #999;
    margin: 0 5px;
}

.level-stars {
    display: inline-flex;
    gap: 2px;
    margin-left: 5px;
}

.level-stars .star-image {
    width: 16px;
    height: 16px;
}

/* 爱秀展示区 */
.aixiu-showcase {
    display: flex;
    cursor: pointer;
    transition: var(--aixiu-transition);
}

.aixiu-showcase:hover {
    transform: translateY(-2px);
}

.aixiu-figure {
    width: 100px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
    cursor: pointer;
    transition: var(--aixiu-transition);
}

.aixiu-figure:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .aixiu-grid {
        grid-template-columns: repeat(2, 1fr); /* 强制两列布局 */
        gap: 15px;
    }
    
    /* 商品卡片在移动端的优化 */
    .aixiu-item {
        padding: 15px 10px; /* 减少内边距以适应更小空间 */
    }
    
    .aixiu-item img {
        width: 80px;  /* 适当缩小图片 */
        height: 96px;
        margin-bottom: 12px;
    }
    
    .aixiu-item h5 {
        font-size: 0.95rem; /* 稍微缩小标题 */
        margin-bottom: 8px;
    }
    
    .aixiu-price {
        font-size: 1.1em; /* 稍微缩小价格字体 */
    }
    
    .aixiu-meta {
        font-size: 0.85em; /* 缩小性别标签 */
        margin-bottom: 12px;
    }
    
    .aixiu-buttons .btn {
        font-size: 0.85rem; /* 缩小按钮字体 */
        padding: 6px 12px; /* 减少按钮内边距 */
    }
    
    .aixiu-header h1 {
        font-size: 2rem;
    }
    
    /* 移动端过滤器优化 */
    .aixiu-filters .col-md-4 {
        margin-bottom: 15px;
    }
    
    .aixiu-filters .btn {
        font-size: 0.9rem;
    }
    
    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .aixiu-container .container {
        width: 95%;
        padding: 15px;
    }
    
    /* 更小屏幕下的两列布局优化 */
    .aixiu-grid {
        grid-template-columns: repeat(2, 1fr); /* 确保两列 */
        gap: 12px; /* 减小间距 */
        padding: 0 5px;
    }
    
    .aixiu-item {
        padding: 12px 8px; /* 进一步减少内边距 */
    }
    
    .aixiu-item img {
        width: 70px;  /* 进一步缩小图片 */
        height: 84px;
        margin-bottom: 10px;
    }
    
    .aixiu-item h5 {
        font-size: 0.9rem; /* 更小的标题 */
        margin-bottom: 6px;
        line-height: 1.3;
    }
    
    .aixiu-price {
        font-size: 1rem; /* 缩小价格字体 */
        margin-bottom: 6px;
    }
    
    .aixiu-meta {
        font-size: 0.8em; /* 更小的性别标签 */
        margin-bottom: 10px;
        padding: 3px 6px;
    }
    
    .aixiu-buttons {
        gap: 6px; /* 减小按钮间隔 */
        margin-top: 10px;
    }
    
    .aixiu-buttons .btn {
        font-size: 0.8rem; /* 更小的按钮字体 */
        padding: 5px 10px; /* 更小的按钮内边距 */
    }
    
    .user-main-info {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }
    
    .user-info-content {
        flex: 1;
        min-width: 0;
    }
    
    .user-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 8px;
    }
    
    .user-welcome {
        flex: 1;
        margin-right: 10px;
    }
    
    .logout-link {
        flex-shrink: 0;
        padding: 1px 6px;
    }
    
    .user-quick-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .aixiu-figure {
        width: 70px;
        height: 84px;
        flex-shrink: 0;
    }
    
    .aixiu-showcase {
        flex-shrink: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .aixiu-display {
        flex-direction: column;
        text-align: center;
    }
    
    .outfit-avatar {
        margin-bottom: 15px;
    }
}

/* 通用按钮和表单优化 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: var(--aixiu-transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= 爱秀有效期系统样式 ================= */

/* 有效期选择器 */
#buyDuration, #giftDuration {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8efff 100%);
    border: 2px solid #667eea;
    color: #333;
    font-weight: 600;
    transition: var(--aixiu-transition);
}

#buyDuration:focus, #giftDuration:focus {
    border-color: #764ba2;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
    background: white;
}

/* 价格明细卡片 */
.card.border-light.bg-light {
    border: 2px solid rgba(102, 126, 234, 0.2) !important;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8efff 100%) !important;
    border-radius: 10px;
    transition: var(--aixiu-transition);
}

.card.border-light.bg-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.card.border-light.bg-light .card-body {
    font-size: 0.9rem;
}

.card.border-light.bg-light .card-body > div {
    margin-bottom: 5px;
    transition: var(--aixiu-transition);
}

.card.border-light.bg-light .card-body > div:hover {
    color: #667eea;
}

/* 有效期提示文字 */
.form-text.text-muted {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 500;
    font-size: 0.85rem;
}

/* 价格明细中的重点项 */
.text-primary {
    background: var(--aixiu-secondary) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    font-weight: 700 !important;
}

/* 模态框增强 */
.modal-content {
    border-radius: var(--aixiu-border-radius);
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: var(--aixiu-primary);
    color: white;
    border-radius: var(--aixiu-border-radius) var(--aixiu-border-radius) 0 0;
    border-bottom: none;
}

.modal-header .aixiu-item-preview {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
    margin-left: 15px;
}

.modal-header .aixiu-item-preview img {
    width: 30px;
    height: 36px;
    border-radius: 4px;
}

.modal-footer {
    border-top: 2px solid rgba(102, 126, 234, 0.2);
    background: #f8f9fa;
    border-radius: 0 0 var(--aixiu-border-radius) var(--aixiu-border-radius);
}

/* 确认按钮增强 */
#confirmBuyBtn, #confirmGiftBtn {
    background: var(--aixiu-success);
    border: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 20px;
    transition: var(--aixiu-transition);
}

#confirmBuyBtn:hover, #confirmGiftBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

/* 有效期标签动画 */
@keyframes durationHighlight {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#buyDuration option:checked, #giftDuration option:checked {
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb);
    background-size: 300% 300%;
    animation: durationHighlight 3s ease infinite;
    color: white;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 10px;
    }
    
    .card.border-light.bg-light .card-body {
        font-size: 0.8rem;
    }
    
    .modal-header .aixiu-item-preview {
        margin-left: 10px;
        padding: 3px 8px;
    }
    
    .modal-header .aixiu-item-preview img {
        width: 25px;
        height: 30px;
    }
}

/* ================= 爱秀到期时间系统样式 ================= */

/* 到期信息卡片 */
.expiry-info {
    margin: 10px 0;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    transition: var(--aixiu-transition);
}

.expiry-label {
    font-weight: 600;
    margin-bottom: 2px;
}

.expiry-details {
    font-size: 0.75rem;
    opacity: 0.8;
}

.remaining-time {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 2px;
}

/* 不同状态的颜色 */
.expiry-permanent {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
    border: 1px solid #28a745;
    color: #155724;
}

.expiry-valid {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
    border: 1px solid #28a745;
    color: #155724;
}

.expiry-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #fefefe 100%);
    border: 1px solid #ffc107;
    color: #856404;
}

.expiry-urgent {
    background: linear-gradient(135deg, #f8d7da 0%, #fdf2f2 100%);
    border: 1px solid #dc3545;
    color: #721c24;
}

.expiry-expired {
    background: linear-gradient(135deg, #f8d7da 0%, #fdf2f2 100%);
    border: 1px solid #dc3545;
    color: #721c24;
}

/* 过期物品的特殊样式 */
.inventory-item.expired {
    opacity: 0.7;
    filter: grayscale(30%);
    border: 2px solid #dc3545;
}

.inventory-item.expired img {
    opacity: 0.6;
}

.inventory-item.expired .item-name {
    text-decoration: line-through;
    color: #6c757d;
}

/* 过期徽章 */
.expired-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 10;
}

/* 已装备徽章调整 */
.equipped-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 10;
}

/* 库存物品容器调整 */
.inventory-item {
    position: relative;
    overflow: visible;
}

/* 悬停效果增强 */
.expiry-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 闪烁动画（即将过期） */
@keyframes urgentBlink {
    0%, 50% { opacity: 1; }
    25%, 75% { opacity: 0.7; }
}

.expiry-urgent .remaining-time {
    animation: urgentBlink 2s infinite;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .expiry-info {
        margin: 8px 0;
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    
    .expiry-details {
        font-size: 0.7rem;
    }
    
    .remaining-time {
        font-size: 0.75rem;
    }
    
    .expired-badge, .equipped-badge {
        font-size: 0.6rem;
        padding: 1px 6px;
    }
} 