/* ========================================
   视觉小说工作室官网 - Hero视频背景重构样式
   ======================================== */

/* --------------------
   Hero视频区域
   -------------------- */
.hero-video-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0a0a1a;
}

/* --------------------
   视频容器
   -------------------- */
.hero-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100vw;
    min-height: 100vh;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-video.loaded {
    opacity: 1;
}

/* --------------------
   视频加载器
   -------------------- */
.video-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 5;
    transition: opacity 0.5s ease;
}

.video-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 183, 197, 0.3);
    border-top-color: var(--color-sakura);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --------------------
   多层遮罩系统
   -------------------- */
.video-mask-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 暗色遮罩 */
.mask-dark {
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* 渐变遮罩 */
.mask-gradient {
    background: linear-gradient(
        135deg,
        rgba(255, 183, 197, 0.15) 0%,
        rgba(47, 79, 79, 0.3) 50%,
        rgba(10, 10, 26, 0.5) 100%
    );
    z-index: 2;
}

/* 暗角遮罩 */
.mask-vignette {
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 3;
}

/* 纹理遮罩 */
.mask-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 4;
}

/* --------------------
   视频控制条
   -------------------- */
.video-controls {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.video-control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-control-btn:hover {
    background: var(--color-sakura);
    border-color: var(--color-sakura);
    transform: scale(1.1);
}

/* --------------------
   视频进度条
   -------------------- */
.video-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-sakura), var(--color-gold));
    width: 0%;
    transition: width 0.1s linear;
}

/* --------------------
   Hero内容包装器
   -------------------- */
.hero-content-wrapper {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 40px 80px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

/* --------------------
   Hero文本区域
   -------------------- */
.hero-text {
    color: white;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 183, 197, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 183, 197, 0.3);
    padding: 10px 20px;
    border-radius: 50px;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease;
}

.badge-icon {
    font-size: 20px;
}

.badge-text {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1em;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 72px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.title-line {
    display: block;
    position: relative;
}

.title-line.highlight {
    color: var(--color-sakura);
    text-shadow: 0 0 40px rgba(255, 183, 197, 0.5);
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.2em;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-description {
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    max-width: 480px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-actions {
    display: flex;
    gap: 20px;
    animation: fadeInUp 0.8s ease 0.8s both;
}

.btn-glow {
    position: relative;
    overflow: visible;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--color-sakura), var(--color-gold), var(--color-sakura));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(10px);
}

.btn-glow:hover::before {
    opacity: 0.6;
}

/* --------------------
   Hero展示区域
   -------------------- */
.hero-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInUp 0.8s ease 1s both;
}

.showcase-character {
    position: relative;
    width: 280px;
    height: 280px;
    margin-bottom: 30px;
}

.character-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 183, 197, 0.3);
    border-radius: 50%;
    animation: pulse-ring 3s ease-in-out infinite;
}

.character-ring::before,
.character-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 183, 197, 0.2);
    border-radius: 50%;
}

.character-ring::before {
    width: 120%;
    height: 120%;
    animation: pulse-ring 3s ease-in-out infinite 0.5s;
}

.character-ring::after {
    width: 140%;
    height: 140%;
    animation: pulse-ring 3s ease-in-out infinite 1s;
}

@keyframes pulse-ring {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.8; }
}

.character-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 120px;
    filter: drop-shadow(0 10px 30px rgba(255, 183, 197, 0.3));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-15px); }
}

.character-float {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.float-item {
    position: absolute;
    font-size: 24px;
    animation: float-around 6s ease-in-out infinite;
    animation-delay: var(--delay);
}

.float-item:nth-child(1) { top: 10%; left: 10%; }
.float-item:nth-child(2) { top: 20%; right: 15%; }
.float-item:nth-child(3) { bottom: 20%; left: 20%; }
.float-item:nth-child(4) { bottom: 10%; right: 10%; }

@keyframes float-around {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -10px) rotate(5deg); }
    50% { transform: translate(0, -15px) rotate(0deg); }
    75% { transform: translate(-10px, -10px) rotate(-5deg); }
}

.showcase-quote {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 30px;
    border-radius: 20px;
    text-align: center;
}

.showcase-quote p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-style: italic;
    margin: 0;
}

/* --------------------
   滚动提示
   -------------------- */
.hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 5;
    animation: fadeInUp 1s ease 1.5s both;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-sakura), transparent);
    animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.5; }
}

.scroll-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* --------------------
   入场动画
   -------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------
   响应式适配
   -------------------- */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 56px;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-showcase {
        display: none;
    }
    
    .video-controls {
        bottom: 80px;
    }
}

@media (max-width: 768px) {
    .hero-content-wrapper {
        padding: 100px 20px 60px;
    }
    
    .hero-title {
        font-size: 42px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .video-controls {
        right: 15px;
        bottom: 70px;
    }
    
    .video-control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-badge {
        padding: 8px 15px;
    }
    
    .badge-text {
        font-size: 12px;
    }
}
