/*
   Logo增强设计 - Sora视频生成平台
   创建时间: 2026-01-20
   特性: 3D效果、动态光效、粒子系统
*/

/* ==================== Logo容器设计 ==================== */

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.brand-wrapper:hover .brand-logo {
    animation: logoFloat 2s ease-in-out infinite;
}

/* ==================== Logo主体 - 3D玻璃态设计 ==================== */

.brand-logo {
    position: relative;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #fb923c 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* 玻璃态效果 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    /* 多层阴影打造深度 */
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(249, 115, 22, 0.2),
        0 8px 16px rgba(249, 115, 22, 0.15),
        0 16px 32px rgba(249, 115, 22, 0.1);

    /* 3D效果 */
    transform: perspective(800px) rotateX(0deg) rotateY(0deg);

    /* 动画 */
    animation: logoGlow 3s ease-in-out infinite;
}

.brand-logo i {
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==================== Hover 3D交互效果 ==================== */

.brand-logo:hover {
    transform: perspective(800px) rotateX(-5deg) rotateY(10deg) scale(1.05);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.2) inset,
        0 4px 8px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(249, 115, 22, 0.3),
        0 16px 32px rgba(249, 115, 22, 0.25),
        0 32px 64px rgba(249, 115, 22, 0.15);
}

.brand-logo:hover i {
    transform: scale(1.1) rotate(5deg);
}

.brand-logo:active {
    transform: perspective(800px) rotateX(0deg) rotateY(0deg) scale(0.95);
}

/* ==================== 光晕效果层 ==================== */

.logo-glow {
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, #f97316, #ea580c, #fb923c, #f97316);
    background-size: 300% 300%;
    border-radius: 16px;
    filter: blur(12px);
    opacity: 0.4;
    z-index: -1;
    animation: gradientShift 4s ease infinite, pulseGlow 2s ease-in-out infinite;
    will-change: background-position, opacity;
}

.brand-logo:hover .logo-glow {
    opacity: 0.7;
    filter: blur(16px);
    animation: gradientShift 2s ease infinite, pulseGlow 1s ease-in-out infinite;
}

/* ==================== 内部高光效果 ==================== */

.brand-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    border-radius: 14px 14px 0 0;
    pointer-events: none;
    z-index: 1;
}

/* ==================== 外部光环 ==================== */

.brand-logo::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px solid rgba(249, 115, 22, 0.3);
    border-radius: 20px;
    opacity: 0;
    animation: ringPulse 2s ease-out infinite;
    pointer-events: none;
    z-index: -2;
}

.brand-logo:hover::after {
    animation: ringPulse 1.5s ease-out infinite;
}

/* ==================== 粒子效果系统 ==================== */

.brand-logo-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: visible;
}

.logo-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #fff 0%, #f97316 100%);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: logoParticle 1.5s ease-out forwards;
}

/* 不同方向的粒子 */
.logo-particle:nth-child(1) { --x: 30px; --y: -40px; animation-delay: 0s; }
.logo-particle:nth-child(2) { --x: -30px; --y: -35px; animation-delay: 0.1s; }
.logo-particle:nth-child(3) { --x: 35px; --y: -30px; animation-delay: 0.2s; }
.logo-particle:nth-child(4) { --x: -35px; --y: -40px; animation-delay: 0.3s; }
.logo-particle:nth-child(5) { --x: 20px; --y: -45px; animation-delay: 0.4s; }
.logo-particle:nth-child(6) { --x: -20px; --y: -30px; animation-delay: 0.5s; }

/* ==================== 品牌标题设计 ==================== */

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-title {
    font-size: 24px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: -0.03em !important;
    margin: 0 !important;

    /* 高级渐变文字效果 */
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #f0f0f0 30%,
        #ffffff 50%,
        #f0f0f0 70%,
        #ffffff 100%
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    /* 文字阴影增强立体感 */
    filter: drop-shadow(0 2px 8px rgba(249, 115, 22, 0.3));

    /* 动画 */
    animation: gradientShift 6s ease infinite;
    transition: all 0.3s ease;
}

.header-title span {
    color: #f97316;
    -webkit-text-fill-color: #f97316;
    font-weight: 900;
    margin-left: 2px;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.header-title span::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #f97316, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.brand-wrapper:hover .header-title span::after {
    opacity: 1;
}

/* ==================== 品牌副标题 ==================== */

.brand-tagline {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(249, 115, 22, 0.8);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.brand-wrapper:hover .brand-tagline {
    opacity: 1;
    color: #f97316;
    letter-spacing: 0.15em;
}

/* ==================== 响应式适配 ==================== */

@media (max-width: 768px) {
    .brand-logo {
        width: 42px;
        height: 42px;
        font-size: 20px;
        border-radius: 12px;
    }

    .header-title {
        font-size: 20px !important;
    }

    .brand-tagline {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .brand-logo {
        width: 38px;
        height: 38px;
        font-size: 18px;
        border-radius: 10px;
    }

    .header-title {
        font-size: 18px !important;
    }

    .brand-tagline {
        display: none;
    }
}

/* ==================== 加载动画Logo ==================== */

.loading-screen .brand-logo-pulse {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f97316, #ea580c, #fb923c);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    position: relative;
    margin: 0 auto;
    transform-style: preserve-3d;

    /* 强化阴影效果 */
    box-shadow:
        0 0 40px rgba(249, 115, 22, 0.5),
        0 0 80px rgba(249, 115, 22, 0.3),
        0 0 120px rgba(249, 115, 22, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.1);

    /* 动画 */
    animation: logoPulseAdvanced 2s ease-in-out infinite;
}

.brand-logo-pulse i {
    position: relative;
    z-index: 2;
    animation: logoFloat 2s ease-in-out infinite;
}

/* 加载Logo的光环 */
.brand-logo-pulse::before {
    content: '';
    position: absolute;
    inset: -15px;
    border: 2px solid rgba(249, 115, 22, 0.5);
    border-radius: 35px;
    opacity: 0;
    animation: ringPulseAdvanced 2s ease-out infinite;
}

@keyframes logoPulseAdvanced {
    0%, 100% {
        transform: scale(1) perspective(800px) rotateX(0deg) rotateY(0deg);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.08) perspective(800px) rotateX(5deg) rotateY(5deg);
        filter: brightness(1.2);
    }
}

@keyframes ringPulseAdvanced {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ==================== 特殊效果：旋转Logo ==================== */

.brand-logo.rotating {
    animation: logoRotate 2s ease-in-out;
}

/* ==================== 特殊效果：发射粒子 ==================== */

.brand-logo.emit-particles .logo-particle {
    opacity: 1;
}

/* ==================== 高性能模式 ==================== */

/* 减少不必要的重绘 */
.brand-logo,
.logo-glow,
.header-title,
.brand-logo::after {
    contain: layout style;
}

/* GPU加速提示 */
.brand-logo,
.logo-glow,
.header-title span {
    will-change: transform;
}

/* 动画结束后清除will-change */
.brand-logo:not(:hover) {
    will-change: auto;
}

/* ==================== 可访问性 ==================== */

/* 减少动画模式下的Logo */
@media (prefers-reduced-motion: reduce) {
    .brand-logo,
    .logo-glow,
    .header-title {
        animation: none !important;
    }

    .brand-logo::after {
        display: none;
    }

    .logo-particle {
        display: none;
    }
}

/* ==================== 打印样式 ==================== */

@media print {
    .logo-glow,
    .logo-particle,
    .brand-logo::after {
        display: none;
    }

    .brand-logo {
        box-shadow: none;
        animation: none;
    }
}
