/* 用户首页样式 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.welcome-section {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    padding: 20px 0;
}

.welcome-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 120px;
    background: var(--primary-light);
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    opacity: 0.2;
}

.welcome-section h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.welcome-section p {
    color: var(--text-secondary);
    font-size: 18px;
    font-weight: 500;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    border: 2px solid var(--border-color);
}

/* .stat-card:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
 */
.stat-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f9;
    border-radius: 12px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.competition-grid {
    display: grid;
    /* grid-template-columns: repeat(2, 1fr); */
    grid-template-columns: 1fr;
    gap: 24px;
}

.competition-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
}

.competition-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.competition-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.competition-card .meta {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.competition-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.competition-card .status {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.work-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.work-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
}

.work-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.work-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-color);
}

.work-info {
    padding: 16px;
}

.work-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.work-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    /*max-width: 90vw;*/
    max-width: 1000px;
    max-height: calc(100vh - 40px);
    width: auto;
    height: auto;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease-out;
    box-sizing: border-box;
}

.modal-content #workDetailContent {
    width: 100%;
}

.modal-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 28px;
    font-weight: 300;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.work-detail-images {
    display: flex;
    gap: 16px;
    margin: 24px 0;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    min-height: 200px;
}

/* 单张图片：居中显示，最大宽度 */
.work-images-single {
    justify-content: center;
}

.work-images-single .work-image-wrapper {
    max-width: 100%;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.work-images-single .work-image-wrapper img {
    width: 100%;
    max-height: 600px;
}

/* 两张图片：并排显示 */
.work-images-double {
    justify-content: center;
}

.work-images-double .work-image-wrapper {
    flex: 1;
    min-width: 280px;
    max-width: 45%;
}

/* 三张图片：三列显示 */
.work-images-triple {
    justify-content: center;
}

.work-images-triple .work-image-wrapper {
    flex: 1;
    min-width: 200px;
    max-width: 30%;
}

.work-image-wrapper {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    background: var(--bg-color);
}

.work-image-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.work-image-wrapper img {
    width: 100%;
    height: auto;
    display: block !important;
    cursor: pointer;
    transition: var(--transition);
    object-fit: contain;
    min-height: 250px;
    max-height: 500px;
    background: var(--bg-color);
    border-radius: var(--radius);
    visibility: visible !important;
    opacity: 1 !important;
}

.work-image-wrapper img:hover {
    transform: scale(1.02);
}

.image-index {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

/* 图片查看器（全屏） */
.image-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 20000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.image-viewer.active {
    display: flex;
    opacity: 1;
}

.image-viewer-content {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: opacity 0.2s ease-out;
}

.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    z-index: 10;
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.image-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: white;
    cursor: pointer;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    border: none;
    user-select: none;
    z-index: 10;
}

.image-viewer-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.image-viewer-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.image-viewer-prev {
    left: 20px;
}

.image-viewer-next {
    right: 20px;
}

.image-viewer-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

/* 弹窗底部按钮布局 */
.work-detail-actions {
    margin-top: 24px;
    text-align: center;
}

.work-detail-actions .btn-primary {
    margin: 0 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .competition-grid {
        grid-template-columns: 1fr;
    }
    
    .work-images-double .work-image-wrapper,
    .work-images-triple .work-image-wrapper {
        max-width: 100%;
        min-width: 100%;
    }
    
    .work-images-triple {
        flex-direction: column;
    }
    
    .image-viewer-nav {
        width: 50px;
        height: 50px;
        font-size: 40px;
    }
    
    .image-viewer-prev {
        left: 10px;
    }
    
    .image-viewer-next {
        right: 10px;
    }
}

.work-detail-info {
    margin-top: 24px;
}

.work-detail-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.work-detail-info p {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.work-detail-info strong {
    color: var(--text-primary);
}