/* 新版首页样式 - Vue驱动的全屏轮播设计 */

/* 全屏轮播容器 */
.fullscreen-carousel {
    position: relative;
    width: 100%;
    height: calc(100vh - 80px); /* 减去header高度 */
    overflow: hidden;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fullscreen-carousel.upload-expanded {
    height: calc(100vh - 80px);
}

/* 轮播背景 */
.carousel-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    background-size: contain;
    background-position: left center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    transform: scale(1.0);
}

.carousel-slide-bg.active {
    opacity: 1;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.3) 0%,
        rgba(118, 75, 162, 0.4) 50%,
        rgba(0, 0, 0, 0.5) 100%
    );
    z-index: 2;
}

/* 轮播标题 */
.carousel-title {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 3;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    padding: 0.25rem 1rem;
    animation: fadeIn 0.8s ease-out;
}

.carousel-title h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 轮播控制按钮 */
.carousel-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.carousel-control {
    display: none;
}

.carousel-control svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    pointer-events: all;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.indicator.active {
    width: 32px;
    border-radius: 6px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 项目介绍蒙版 */
.project-intro {
    position: absolute;
    top: 0;
    right: 0;
    width: 30%;
    height: 100%;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-secondary);
    backdrop-filter: none;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateX(0);
}

.project-intro.hidden {
    opacity: 0;
    transform: translateX(100%);
}

.intro-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.intro-title {
    font-size: 2.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.intro-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    background: rgba(255, 255, 255, 0.8);
}

.feature-icon {
    font-size: 1.3rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--radius-md);
    color: white;
    flex-shrink: 0;
}

.feature-text h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.feature-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 上传触发按钮 */
.upload-trigger {
    margin-top: 1.5rem;
    text-align: center;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

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

.upload-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

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

.upload-btn .upload-icon {
    width: 20px;
    height: 20px;
}

.upload-trigger .upload-hint {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* 展开的上传区域 */
.upload-section-expanded {
    position: absolute;
    top: 0;
    right: 0;
    width: 30%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    z-index: 15;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-section-expanded.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.upload-header h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.close-upload {
    background: var(--bg-tertiary);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.close-upload:hover {
    background: var(--error-color);
    color: white;
    transform: scale(1.1);
}

/* 上传区域 */
.upload-area {
    flex: 1;
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    min-height: 200px;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.5s ease;
    pointer-events: none;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
    transform: scale(1.02);
}

.upload-area:hover::before {
    opacity: 0.05;
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.upload-area.dragover::before {
    opacity: 0.1;
}

.upload-content {
    text-align: center;
    pointer-events: none;
}

.upload-content .upload-icon {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.upload-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.upload-content .upload-hint {
    font-size: 1rem;
    color: var(--text-muted);
}

/* 文件列表 */
.file-list-container {
    max-height: 500px;
    overflow-y: auto;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.5s ease-out;
}

.file-list-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.file-list {
    list-style: none;
    margin: 0 0 1.5rem 0;
    padding: 0;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
}

.file-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.file-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.file-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.file-size {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.file-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.file-delete:hover {
    color: var(--error-color);
    background: rgba(245, 101, 101, 0.1);
    transform: scale(1.1);
}

.file-delete:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.file-delete:disabled:hover {
    color: var(--text-muted);
    background: none;
    transform: none;
}

/* 上传状态样式 */
.file-item.uploading {
    opacity: 0.7;
    background: linear-gradient(90deg, var(--bg-secondary) 0%, rgba(102, 126, 234, 0.1) 50%, var(--bg-secondary) 100%);
    background-size: 200% 100%;
    animation: uploadingPulse 2s ease-in-out infinite;
}

.file-item.uploading .file-checkbox {
    opacity: 0.5;
    cursor: not-allowed;
}

.upload-status {
    color: var(--primary-color);
    font-weight: 500;
    font-style: italic;
}

@keyframes uploadingPulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 文件操作按钮 */
.file-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.file-actions .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .project-intro {
        width: 35%;
        padding: 1.5rem;
    }
    
    .upload-section-expanded {
        width: 35%;
    }
    
    .intro-title {
        font-size: 2rem;
    }
    
    .feature-item {
        padding: 0.75rem;
    }
}

@media (max-width: 1024px) {
    .fullscreen-carousel {
        height: auto;
        min-height: calc(100vh - 80px);
    }
    
    .project-intro {
        position: relative;
        width: 100%;
        height: auto;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(30px);
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .carousel-background {
        height: 60vh;
    }
    
    .intro-title {
        font-size: 1.8rem;
    }
    
    .feature-list {
        gap: 1rem;
    }
    
    .upload-section-expanded {
        width: 35%;
        padding: 2rem;
    }
    
    .carousel-control.prev {
        left: 1rem;
    }
    
    .carousel-control.next {
        right: 1rem;
    }
}

@media (max-width: 768px) {
    .project-intro {
        padding: 1.5rem;
    }
    
    .intro-title {
        font-size: 1.5rem;
    }
    
    .intro-subtitle {
        font-size: 1rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .feature-icon {
        align-self: center;
    }
    
    .upload-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .upload-section-expanded {
        width: 100%;
        right: 0;
        padding: 1rem;
    }
    
    .upload-header h3 {
        font-size: 1.5rem;
    }
    
    
    .carousel-title {
        top: 1rem;
        left: 1rem;
        right: 1rem;
        padding: 0.75rem 1rem;
    }
    
    .carousel-title h3 {
        font-size: 1.1rem;
    }
    
    .file-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .file-actions .btn {
        width: 100%;
    }
}

/* 动画关键帧 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 滚动条优化 */
.file-list-container::-webkit-scrollbar {
    width: 6px;
}

.file-list-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.file-list-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.file-list-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 防止页面跳转时的闪烁 */
body.unloading * {
    transition: none !important;
}

body.unloading .login-modal-overlay {
    display: none !important;
}

/* 隐藏未初始化的Vue内容 */
[v-cloak] {
    display: none;
}

/* 页脚布局调整 - 支持语言切换器 */
.footer-content {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap;
    gap: 3rem !important;
    text-align: center !important;
}

.footer-left {
    flex: none;
}

.footer-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 2px;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-left,
    .footer-right {
        flex: none;
    }
}
