﻿/* ===== Chinese Theme для Zhu Bi кейса ===== */

/* Китайская цветовая палитра */
:root {
    --chinese-red: #C8102E;
    --chinese-gold: #FFD700;
    --chinese-dark: #1a0f0a;
    --chinese-cream: #FFF8E7;
    --chinese-brown: #5C3317;
    --chinese-light-gold: #FFEAA7;
    --chinese-accent: #D4AF37;
}

/* Фон страницы с текстурой бумаги */
body {
    overflow-x: hidden;
}

.project-header,
.project-main {
    background: linear-gradient(135deg, var(--chinese-cream) 0%, #FFF5E1 100%);
    position: relative;
    overflow-x: hidden;
}

/* Добавляем текстуру рисовой бумаги */
.project-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(200, 16, 46, 0.02) 2px, rgba(200, 16, 46, 0.02) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(200, 16, 46, 0.02) 2px, rgba(200, 16, 46, 0.02) 4px);
    opacity: 0.3;
    pointer-events: none;
}

/* Заголовки с китайским стилем */
.project-hero-title {
    color: var(--chinese-red);
    text-shadow: 2px 2px 4px rgba(200, 16, 46, 0.2);
    position: relative;
    display: inline-block;
}

/* Декоративная красная печать под заголовком */
.project-hero-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--chinese-red), transparent);
    border-radius: 2px;
}

/* Категория проекта */
.project-category {
    background: linear-gradient(135deg, var(--chinese-red), #A0102E);
    color: var(--chinese-gold);
    padding: 8px 20px;
    border-radius: 20px;
    border: 2px solid var(--chinese-gold);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
}

/* Статистика hero */
.hero-stat-value {
    color: var(--chinese-red);
    font-weight: 800;
}

.hero-stat-label {
    color: var(--chinese-brown);
}

/* Секции с традиционными китайскими рамками */
.section-title {
    color: var(--chinese-red);
    text-align: center;
    position: relative;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.section-title::before,
.section-title::after {
    content: '◆';
    color: var(--chinese-gold);
    font-size: 1.5rem;
    margin: 0 15px;
}

/* Problem-Solution boxes в китайском стиле */
.problem-box {
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.08), rgba(200, 16, 46, 0.03));
    border: 2px solid var(--chinese-red);
    border-radius: 12px;
    position: relative;
}

.problem-box::before {
    content: '⚠';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    opacity: 0.2;
}

.solution-box {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.04));
    border: 2px solid var(--chinese-gold);
    border-radius: 12px;
    position: relative;
}

.solution-box::before {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    color: var(--chinese-gold);
    opacity: 0.3;
}

/* Feature cards с золотыми акцентами */
.feature-card {
    background: white;
    border: 2px solid var(--chinese-light-gold);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--chinese-red), var(--chinese-gold));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 16px;
}

.feature-card:hover::before {
    opacity: 0.1;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--chinese-red);
    box-shadow: 0 12px 32px rgba(200, 16, 46, 0.25);
}

.feature-icon {
    background: linear-gradient(135deg, var(--chinese-red) 0%, #A0102E 100%);
    color: var(--chinese-gold);
    font-size: 2.5rem;
    box-shadow: 0 6px 16px rgba(200, 16, 46, 0.3);
}

/* Icon images inside feature-icon and result-icon */
.feature-icon .emoji-icon,
.result-icon .emoji-icon,
.workflow-step h3 .emoji-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.feature-card h3 {
    color: var(--chinese-red);
}

/* Workflow steps */
.workflow-step {
    background: white;
    border: 2px solid var(--chinese-light-gold);
    position: relative;
}

.workflow-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 80%;
    background: linear-gradient(180deg, var(--chinese-red), var(--chinese-gold));
    border-radius: 0 4px 4px 0;
}

.workflow-step:hover {
    border-color: var(--chinese-red);
    box-shadow: 0 8px 24px rgba(200, 16, 46, 0.2);
}

.step-number {
    background: linear-gradient(135deg, var(--chinese-red), #A0102E);
    color: var(--chinese-gold);
    border: 3px solid var(--chinese-gold);
    font-weight: 900;
}

/* Tech tags */
.tech-tag {
    background: white;
    border: 2px solid var(--chinese-light-gold);
    color: var(--chinese-brown);
    font-weight: 600;
}

.tech-tag:hover {
    border-color: var(--chinese-red);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    color: var(--chinese-red);
}

/* Comparison table */
.comparison-ours {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border-left: 4px solid var(--chinese-gold);
    color: var(--chinese-red);
    font-weight: 600;
}

.comparison-theirs {
    color: var(--chinese-brown);
    opacity: 0.7;
}

/* Comparison cards (mobile) */
.comparison-card {
    background: white;
    border: 2px solid var(--chinese-light-gold);
}

.comparison-side.ours {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border-color: var(--chinese-gold);
}

.comparison-side.ours .side-value {
    color: var(--chinese-red);
}

.comparison-side.theirs .side-value {
    color: var(--chinese-brown);
}

.vs-divider {
    color: var(--chinese-red);
    font-weight: 800;
}

/* Result cards */
.result-card {
    background: white;
    border: 2px solid var(--chinese-light-gold);
}

.result-card:hover {
    border-color: var(--chinese-red);
    box-shadow: 0 12px 32px rgba(200, 16, 46, 0.2);
}

.result-icon {
    background: linear-gradient(135deg, var(--chinese-red) 0%, #A0102E 100%);
    color: var(--chinese-gold);
    font-size: 2.5rem;
    box-shadow: 0 6px 16px rgba(200, 16, 46, 0.3);
}

.result-card h3 {
    color: var(--chinese-red);
}

/* CTA Section */
.project-cta {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    border: 3px solid var(--chinese-gold);
    box-shadow: 0 8px 24px rgba(200, 16, 46, 0.15);
}

.project-cta h2 {
    color: var(--chinese-red);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--chinese-red), #A0102E);
    color: var(--chinese-gold);
    border: 2px solid var(--chinese-gold);
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #A0102E, var(--chinese-red));
    box-shadow: 0 8px 20px rgba(200, 16, 46, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--chinese-red);
    border: 2px solid var(--chinese-red);
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--chinese-red);
    color: var(--chinese-gold);
    box-shadow: 0 8px 20px rgba(200, 16, 46, 0.4);
    transform: translateY(-2px);
}

/* Back link */
.back-link {
    color: var(--chinese-red);
    font-weight: 600;
}

.back-link:hover {
    color: var(--chinese-gold);
    background: var(--chinese-red);
    padding: 8px 16px;
    border-radius: 8px;
}

/* Декоративные китайские узоры по краям */
.project-main::before,
.project-main::after {
    content: '';
    position: fixed;
    width: 80px;
    height: 100vh;
    background-image:
        repeating-linear-gradient(0deg,
            transparent,
            transparent 40px,
            rgba(200, 16, 46, 0.05) 40px,
            rgba(200, 16, 46, 0.05) 80px
        );
    pointer-events: none;
    z-index: 1;
}

.project-main::before {
    left: 0;
    top: 0;
}

.project-main::after {
    right: 0;
    top: 0;
}

/* ===== Gallery Swipe Indicator ===== */
.swipe-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

/* Animated Hand Gesture - Swipe Left */
.swipe-hand {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    animation: swipeLeftMotion 2.5s ease-in-out infinite !important;
    will-change: transform, opacity;
}

.swipe-hand img {
    width: 100%;
    height: 100%;
    filter: brightness(0.5) invert(0.5) drop-shadow(0 4px 12px rgba(200, 16, 46, 0.8)) !important;
}

@keyframes swipeLeftMotion {
    0%, 100% {
        transform: translate(-50%, -50%) translateX(20px);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) translateX(-30px);
        opacity: 1;
    }
    70% {
        opacity: 0;
    }
}

/* Dots Indicator */
.swipe-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(200, 16, 46, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.swipe-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.swipe-dots .dot.active {
    background: var(--chinese-gold);
    width: 20px;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Hide only hand animation after interaction, keep dots visible */
.device-gallery.interacted .swipe-hand {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* ===== Dragon Navigation ===== */
.dragon-nav {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    opacity: 0;
    width: fit-content;
    max-width: min(95vw, 500px);
    transition: none;
    pointer-events: none; /* Весь nav не блокирует клики */
}

.dragon-nav.visible {
    animation: slideDownDragon 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideDownDragon {
    0% {
        top: -100px;
        opacity: 0;
    }
    100% {
        top: 0px;
        opacity: 1;
    }
}

.dragon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: fit-content;
}

/* Dragon Image Container */
.dragon-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: 0;
    pointer-events: none; /* Не блокировать клики на контенте под ним */
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.dragon-image {
    width: 100%;
    height: auto;
    max-height: 240px;
    display: block;
    filter: drop-shadow(0 3px 8px rgba(200, 16, 46, 0.25));
    transition: filter 0.4s ease;
    object-fit: contain;
    object-position: center center;
}

.dragon-image:hover {
    filter: drop-shadow(0 4px 12px rgba(200, 16, 46, 0.35));
}

/* Interactive Points on Dragon */
.dragon-point {
    position: absolute;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    pointer-events: auto; /* Включить клики только на точках */
}

.dragon-point::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 7px;
    height: 7px;
    background: radial-gradient(circle at center, #FFD700 0%, #FFA500 50%, var(--chinese-red) 100%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 0 1px rgba(200, 16, 46, 0.8),
        0 0 3px rgba(255, 215, 0, 0.7),
        0 1px 4px rgba(200, 16, 46, 0.5);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dragon-point:hover::before {
    width: 9px;
    height: 9px;
    background: radial-gradient(circle at center, #FFD700 0%, #FFA500 40%, var(--chinese-red) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 1),
        0 0 0 2px var(--chinese-gold),
        0 0 5px rgba(255, 215, 0, 1),
        0 2px 6px rgba(200, 16, 46, 0.6);
    animation: pointPulse 1s ease-in-out infinite;
}

.dragon-point.active::before {
    width: 10px;
    height: 10px;
    background: radial-gradient(circle at center, #FFED4E 0%, #FFD700 30%, #FFA500 60%, var(--chinese-red) 100%);
    border-color: rgba(255, 255, 255, 1);
    box-shadow:
        0 0 0 1.5px rgba(255, 255, 255, 0.9),
        0 0 0 3px var(--chinese-gold),
        0 0 12px rgba(255, 215, 0, 1),
        0 4px 15px rgba(200, 16, 46, 0.8);
    animation: pointGlow 1.5s ease-in-out infinite;
}

@keyframes pointPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes pointGlow {
    0%, 100% {
        box-shadow:
            0 0 0 3px rgba(255, 255, 255, 0.9),
            0 0 0 6px var(--chinese-gold),
            0 0 25px rgba(255, 215, 0, 0.9),
            0 8px 32px rgba(200, 16, 46, 0.7);
    }
    50% {
        box-shadow:
            0 0 0 4px rgba(255, 255, 255, 1),
            0 0 0 8px var(--chinese-gold),
            0 0 40px rgba(255, 215, 0, 1),
            0 12px 40px rgba(200, 16, 46, 0.9);
    }
}

/* Point Labels */
.point-label {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--chinese-red), #A0102E);
    color: var(--chinese-gold);
    padding: 2px 7px;
    border-radius: 7px;
    font-size: 0.55rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1.5px solid var(--chinese-gold);
    box-shadow:
        0 0 0 0.5px rgba(255, 255, 255, 0.5),
        0 2px 6px rgba(200, 16, 46, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
}

.dragon-point:hover .point-label {
    opacity: 1;
    top: -28px;
    transform: translateX(-50%) scale(1.05);
}

.dragon-point.active .point-label {
    opacity: 1;
    top: -30px;
    background: linear-gradient(135deg, #A0102E, var(--chinese-red), #A0102E);
    border-color: #FFED4E;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.8),
        0 0 8px rgba(255, 215, 0, 0.8),
        0 3px 10px rgba(200, 16, 46, 0.6);
    animation: labelBounce 0.5s ease;
}

@keyframes labelBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Navigation Labels */
.nav-labels {
    display: none;
    pointer-events: auto; /* Включить клики на альтернативной навигации */
}

.nav-labels::-webkit-scrollbar {
    display: none;
}

.nav-label {
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--chinese-brown);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(200, 16, 46, 0.2);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.nav-label:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--chinese-gold);
    color: var(--chinese-red);
    transform: translateY(-2px);
}

.nav-label.active {
    background: linear-gradient(135deg, var(--chinese-red), #A0102E);
    border-color: var(--chinese-gold);
    color: var(--chinese-gold);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
}

/* Section scroll margin for proper tracking */
.project-section {
    scroll-margin-top: 140px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .project-main::before,
    .project-main::after {
        width: 30px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-title::before,
    .section-title::after {
        margin: 0 8px;
        font-size: 1.2rem;
    }

    .section-desc {
        font-size: 0.95rem;
    }

    .project-hero-title {
        font-size: 2rem;
    }

    .project-hero-desc {
        font-size: 1rem;
    }

    .problem-box li,
    .solution-box li {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .feature-card h3,
    .result-card h3 {
        font-size: 1rem;
    }

    .feature-card p,
    .result-card p {
        font-size: 0.85rem;
    }

    /* Smaller icons on mobile */
    .feature-icon .emoji-icon,
    .result-icon .emoji-icon,
    .workflow-step h3 .emoji-icon {
        width: 1.8rem;
        height: 1.8rem;
        margin-right: 6px;
    }

    .workflow-step::before {
        width: 3px;
        height: 60%;
    }

    /* Reduce swipe indicator size */
    .swipe-hand {
        width: 45px;
        height: 45px;
    }

    .swipe-dots {
        bottom: 10px;
        padding: 6px 10px;
    }

    .swipe-dots .dot {
        width: 5px;
        height: 5px;
    }

    .swipe-dots .dot.active {
        width: 15px;
    }

    /* Dragon nav mobile */
    .dragon-nav {
        padding: 8px 12px;
        max-width: calc(100vw - 20px);
    }

    .dragon-image-wrapper {
        max-width: 100%;
    }

    .dragon-image {
        width: 100% !important;
        height: auto !important;
        max-height: 120px !important; /* ЕЩЁ МЕНЬШЕ = ЕЩЁ ВЫШЕ на странице */
        min-height: 100px !important;
        filter: drop-shadow(0 2px 8px rgba(200, 16, 46, 0.3));
        object-fit: contain !important;
    }

    /* Smaller dragon points on mobile */
    .dragon-point {
        width: 12px; /* Ещё меньше для мобильных */
        height: 12px;
    }

    .dragon-point::before {
        width: 5px; /* Очень маленькие точки */
        height: 5px;
        border-width: 0.5px;
    }

    .dragon-point:hover::before {
        width: 7px;
        height: 7px;
    }

    .dragon-point.active::before {
        width: 8px;
        height: 8px;
    }

    /* Adjust point positions for mobile - ПОДНИМАЕМ ВЫШЕ (уменьшаем значения) */
    .dragon-point[data-section="philosophy"],
    .dragon-point[data-section="custom-order"],
    .dragon-point[data-section="demo"] {
        top: 11% !important; /* Centered on dragon body */
    }

    .dragon-point[data-section="game-modes"],
    .dragon-point[data-section="tech-features"],
    .dragon-point[data-section="comparison"] {
        top: 8% !important; /* Top of golden circle */
    }

    .dragon-point[data-section="characters"] {
        top: 11% !important; /* Middle of golden circle */
    }

    .dragon-point[data-section="progress"],
    .dragon-point[data-section="technologies"],
    .dragon-point[data-section="results"] {
        top: 14% !important; /* Bottom of golden circle */
    }

    .point-label {
        font-size: 0.6rem;
        padding: 3px 8px;
        top: -30px;
    }

    .dragon-point:hover .point-label,
    .dragon-point.active .point-label {
        top: -35px;
    }

    .nav-labels {
        gap: 4px;
        margin-top: 8px;
    }

    .nav-label {
        padding: 4px 10px;
        font-size: 0.7rem;
    }

    @keyframes slideDownDragon {
        0% {
            top: -150px;
            opacity: 0;
        }
        100% {
            top: 10px;
            opacity: 1;
        }
    }

    .project-section {
        scroll-margin-top: 110px;
    }
}
