/* 캐릭터 애니메이션 CSS */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    40% {
        transform: translateY(-20px) rotate(-3deg);
    }
    60% {
        transform: translateY(-10px) rotate(3deg);
    }
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(3deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

@keyframes wave {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    25% {
        transform: translateX(-5px) translateY(-10px) rotate(-5deg);
    }
    50% {
        transform: translateX(5px) translateY(0) rotate(0deg);
    }
    75% {
        transform: translateX(5px) translateY(-10px) rotate(5deg);
    }
    100% {
        transform: translateX(0) translateY(0) rotate(0deg);
    }
}

@keyframes dance {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-10px) rotate(5deg) scale(1.05);
    }
    50% {
        transform: translateY(0) rotate(-5deg) scale(1);
    }
    75% {
        transform: translateY(-5px) rotate(2deg) scale(1.02);
    }
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
}

@keyframes pop {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(-5px) rotate(-2deg);
    }
    50% {
        transform: translateX(5px) rotate(2deg);
    }
    75% {
        transform: translateX(-5px) rotate(-1deg);
    }
}

/* 히어로 섹션 캐릭터 컨테이너 스타일 향상 */
.hero-characters {
    display: flex;
    justify-content: center;
    margin: 20px auto;
    position: relative;
    z-index: 10;
    perspective: 1000px;
    transform-style: preserve-3d;
    max-width: 90%;
    padding: 15px;
    /* 배경 효과 제거 */
    background-color: transparent;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
}

/* 히어로 섹션에 스크롤 힌트 추가 - 제거 */
.hero-characters::after {
    display: none;
}

/* 히어로 섹션 캐릭터 기본 애니메이션 및 호버 효과 */
.hero-character {
    width: 120px;
    height: 120px;
    margin: 0 15px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
    position: relative;
    transform-origin: bottom center;
    cursor: pointer;
    object-fit: contain;
}

.hero-character:hover {
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3));
    transform: scale(1.2) translateY(-10px);
    z-index: 20;
}

/* 각 캐릭터 개별 애니메이션 */
.hero-character:nth-child(1) {
    /* LUE */
    animation: bounce 4s ease-in-out infinite;
}

.hero-character:nth-child(2) {
    /* Patti */
    animation: wave 5s ease-in-out infinite;
}

.hero-character:nth-child(3) {
    /* Taya */
    animation: float 6s ease-in-out infinite;
}

.hero-character:nth-child(4) {
    /* Mini */
    animation: dance 7s ease-in-out infinite;
}

/* 크릭 시 팝업 효과를 위한 클래스 */
.pop-animation {
    animation: pop 0.5s ease-in-out;
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

/* 캐릭터 인터렉션 섹션 */
.character-interactive {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 0 auto;
    padding: 20px;
    max-width: 1200px;
}

.character-button {
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    padding: 10px;
}

.character-button img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.character-button:hover img {
    transform: scale(1.1) translateY(-5px);
}

.character-button .tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.character-button:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* 주요 섹션의 캐릭터 애니메이션 향상 */
.character-section .character-card:hover .character-image img {
    animation: dance 3s ease-in-out;
}

.character-floating {
    position: absolute;
    z-index: 1;
    transition: all 0.5s ease;
    pointer-events: none;
}

.float-tl {
    top: 5%;
    left: 5%;
    width: 120px;
    animation: float 8s ease-in-out infinite;
}

.float-br {
    bottom: 5%;
    right: 5%;
    width: 150px;
    animation: wave 10s ease-in-out infinite reverse;
}

.float-tr {
    top: 10%;
    right: 8%;
    width: 100px;
    animation: bounce 7s ease-in-out infinite;
}

.float-bl {
    bottom: 8%;
    left: 8%;
    width: 130px;
    animation: dance 9s ease-in-out infinite reverse;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .hero-characters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 15px 10px;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox에서 스크롤바 숨기기 */
        max-width: 100%;
        margin-left: 10px;
        margin-right: 10px;
    }
    
    /* 스크롤 힌트 제거 */
    .hero-characters::after {
        display: none;
    }
    
    @keyframes pulse {
        0%, 100% { opacity: 0.3; }
        50% { opacity: 0.8; }
    }
    
    .hero-characters::-webkit-scrollbar {
        display: none; /* Chrome, Safari에서 스크롤바 숨기기 */
    }
    
    .hero-character {
        width: 70px;
        height: 70px;
        min-width: 70px;
        margin: 0 5px;
        flex-shrink: 0;
    }
    
    /* 모바일에서 호버 효과 미리 적용해서 잘 보이게 */
    .hero-character:first-child {
        transform: scale(1.1);
        filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.3));
    }
    
    .character-button img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .hero-character {
        width: 60px;
        height: 60px;
        min-width: 60px;
        margin: 0 3px;
    }
    
    .character-button img {
        width: 50px;
        height: 50px;
    }
}

/* 스토리 섹션 스타일 개선 */
.character-story {
    padding: 60px 0;
    background-color: #f9f9f9;
    position: relative;
    overflow: hidden;
}

.story-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.story-title {
    text-align: center;
    margin-bottom: 40px;
}

.story-title h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    background: linear-gradient(90deg, #00c3ff, #6c63ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.story-title p {
    font-size: 1.1rem;
    color: #777;
}

.story-timeline {
    position: relative;
    margin: 50px 0;
}

.story-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    background: linear-gradient(to bottom, #00c3ff 0%, #6c63ff 100%);
}

.story-item {
    position: relative;
    margin-bottom: 50px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.story-date {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #00c3ff, #6c63ff);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.story-content {
    width: 45%;
    padding: 25px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.3s ease;
}

.story-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.story-content::after {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background-color: white;
    transform: rotate(45deg);
}

.story-item:nth-child(odd) .story-content {
    margin-right: auto;
}

.story-item:nth-child(odd) .story-content::after {
    right: -10px;
}

.story-item:nth-child(even) .story-content {
    margin-left: auto;
}

.story-item:nth-child(even) .story-content::after {
    left: -10px;
}

.story-content h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.story-content p {
    color: #666;
    line-height: 1.6;
}

.story-character {
    width: 100px;
    height: 100px;
    object-fit: contain;
    position: absolute;
    top: -20px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.story-item:nth-child(odd) .story-character {
    right: 65%;
}

.story-item:nth-child(even) .story-character {
    left: 65%;
}

/* 반응형 스타일 - 모바일 화면 전용 개선 */
@media (max-width: 768px) {
    .story-title h2 {
        font-size: 1.8rem;
    }
    
    .story-timeline::before {
        left: 20px;
        transform: none;
    }
    
    .story-item {
        flex-direction: column;
        align-items: flex-start;
        margin-left: 40px;
        margin-bottom: 70px;
    }
    
    .story-date {
        left: 20px;
        transform: none;
        top: -50px;
        width: fit-content;
        font-size: 0.9rem;
    }
    
    .story-content {
        width: calc(100% - 40px);
        margin-top: 30px;
        padding: 20px;
        z-index: 1;
    }
    
    .story-content::after {
        display: none;
    }
    
    .story-character {
        width: 70px;
        height: 70px;
        top: -35px;
        right: 10px !important;
        left: auto !important;
        z-index: 2;
    }
    
    .story-item:nth-child(odd) .story-content,
    .story-item:nth-child(even) .story-content {
        margin-left: 0;
        margin-right: 0;
    }
    
    .character-story {
        padding: 40px 0;
    }
    
    /* 애니메이션 효과 추가 */
    .story-item {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }
    
    .story-item.visible {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* 스토리 아이템 배경 스타일 추가 */
    .story-content {
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(5px);
        border-left: 4px solid;
    }
    
    .story-item:nth-child(1) .story-content {
        border-color: #00c3ff;
    }
    
    .story-item:nth-child(2) .story-content {
        border-color: #44b8ff;
    }
    
    .story-item:nth-child(3) .story-content {
        border-color: #6cabff;
    }
    
    .story-item:nth-child(4) .story-content {
        border-color: #6c63ff;
    }
    
    .story-item:nth-child(5) .story-content {
        border-color: #9663ff;
    }
}

@media (max-width: 480px) {
    .story-title h2 {
        font-size: 1.5rem;
    }
    
    .story-title p {
        font-size: 0.95rem;
    }
    
    .story-content h3 {
        font-size: 1.2rem;
    }
    
    .story-content p {
        font-size: 0.95rem;
    }
    
    .story-date {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .story-item {
        margin-bottom: 60px;
    }
    
    .story-character {
        width: 60px;
        height: 60px;
        top: -30px;
    }
    
    .character-story {
        padding: 30px 0;
    }
    
    /* 모바일에서 스크롤 시 그림자 효과 */
    .story-content {
        transition: box-shadow 0.3s ease;
    }
    
    .story-content:active {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
} 