/* ========================================
   端智AI - 创作中心入口页面样式
   深色科技感主题
   ======================================== */

/* ========================================
   基础布局
   ======================================== */
.hub-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hub-gradient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hub-gradient-bg .gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: orbFloat 20s ease-in-out infinite;
}

.hub-gradient-bg .orb-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.35) 0%, transparent 70%);
    top: -300px;
    left: -200px;
    animation-delay: 0s;
}

.hub-gradient-bg .orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.3) 0%, transparent 70%);
    bottom: -200px;
    right: -200px;
    animation-delay: -7s;
}

.hub-gradient-bg .orb-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(40px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-30px, 40px) scale(0.95);
    }
    75% {
        transform: translate(-40px, -20px) scale(1.02);
    }
}

.hub-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 60px;
}

.hub-container {
    max-width: 1100px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
}

/* ========================================
   顶部导航
   ======================================== */
.hub-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-navbar);
    padding: 12px 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.hub-navbar .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-divider {
    display: inline-block;
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 12px;
}

.nav-page-title {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 用户信息区 */
.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.user-balance svg {
    color: var(--accent-orange);
}

.user-balance .balance-label {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-glass);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-avatar:hover {
    border-color: var(--primary-purple);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.user-avatar img.loaded {
    display: block;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.user-avatar img.loaded + .avatar-placeholder {
    display: none;
}

/* ========================================
   标题区
   ======================================== */
.hub-header {
    text-align: center;
    animation: fadeInUp 0.8s ease forwards;
}

.hub-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    color: var(--primary-cyan);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.hub-badge svg {
    color: var(--accent-orange);
}

.badge-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.15), transparent);
    animation: shimmerBadge 3s infinite;
    background-size: 200% 100%;
}

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

.hub-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.title-line {
    display: block;
}

.title-gradient {
    background: var(--primary-gradient);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 4s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hub-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

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

/* ========================================
   场景卡片区
   ======================================== */
.scene-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.scene-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: cardFadeIn 0.6s ease forwards;
    animation-delay: var(--delay, 0.1s);
    opacity: 0;
}

.scene-card:nth-child(1) { --delay: 0.1s; }
.scene-card:nth-child(2) { --delay: 0.15s; }
.scene-card:nth-child(3) { --delay: 0.2s; }
.scene-card:nth-child(4) { --delay: 0.25s; }
.scene-card:nth-child(5) { --delay: 0.3s; }
.scene-card:nth-child(6) { --delay: 0.35s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 卡片发光效果 */
.card-glow {
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: var(--primary-gradient);
    opacity: 0;
    filter: blur(20px);
    z-index: -1;
    transition: opacity 0.4s ease;
}

/* 卡片边框 */
.card-border {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
    pointer-events: none;
}

.scene-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 16px 40px rgba(124, 58, 237, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.2);
}

.scene-card:hover .card-glow {
    opacity: 0.4;
}

.scene-card:hover .card-border {
    border-color: rgba(124, 58, 237, 0.5);
}

/* 点击效果 */
.scene-card:active {
    transform: translateY(-4px) scale(0.98);
    transition: transform 0.1s ease;
}

/* 卡片内容 */
.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 卡片图标 */
.card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.card-icon svg {
    width: 32px;
    height: 32px;
}

.scene-card:hover .card-icon {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
    transform: scale(1.05);
}

/* 卡片信息 */
.card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    transition: all 0.3s ease;
}

.scene-card:hover .card-title {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 卡片特性列表（紧凑模式隐藏） */
.card-features {
    display: none;
}

/* 卡片操作按钮 */
.card-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    width: fit-content;
    transition: all 0.3s ease;
    margin-top: 4px;
}

.action-text {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.card-action svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.scene-card:hover .card-action {
    background: var(--primary-gradient);
    border-color: transparent;
}

.scene-card:hover .action-text {
    color: white;
}

.scene-card:hover .card-action svg {
    color: white;
    transform: translateX(3px);
}

/* 卡片粒子装饰 */
.card-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
}

.card-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary-gradient);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scene-card:hover .card-particles span {
    opacity: 0.6;
    animation: particleDrift 3s ease-in-out infinite;
}

.card-particles span:nth-child(1) {
    top: 15%;
    right: 10%;
    animation-delay: 0s;
}

.card-particles span:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 0.5s;
}

.card-particles span:nth-child(3) {
    bottom: 20%;
    right: 25%;
    animation-delay: 1s;
}

@keyframes particleDrift {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-15px) scale(1.3);
        opacity: 1;
    }
}

/* ========================================
   底部提示
   ======================================== */
.hub-footer {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.coming-soon {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.coming-soon-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-cyan);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 991.98px) {
    .scene-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .hub-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 767.98px) {
    .hub-main {
        padding: 80px 16px 40px;
    }

    .hub-navbar .nav-container {
        flex-wrap: wrap;
        gap: 12px;
    }

    .nav-divider,
    .nav-page-title {
        display: none;
    }

    .hub-container {
        gap: 32px;
    }

    .hub-title {
        font-size: 2rem;
    }

    .hub-subtitle {
        font-size: 1rem;
    }

    .hub-badge {
        font-size: 0.8125rem;
        padding: 8px 16px;
    }

    .scene-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .scene-card {
        padding: 20px;
    }

    .coming-soon {
        padding: 12px 20px;
        font-size: 0.875rem;
    }
}

@media (max-width: 575.98px) {
    .hub-title {
        font-size: 1.75rem;
    }
}

/* ========================================
   卡片 3D 倾斜效果（JavaScript 增强）
   ======================================== */
.scene-card.tilt-active {
    transition: transform 0.1s ease-out, box-shadow 0.4s ease;
}
