@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700;900&display=swap');

body {
    font-family: 'Noto Sans JP', sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* Enhanced gradient backgrounds */
.hero-gradient {
    background: linear-gradient(135deg, #71a853 0%, #4bd9fd 25%, #e4a043 50%, #56b821 75%, #71a853 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* Enhanced custom shapes */
.custom-shape-divider-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.custom-shape-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 150px;
}

.custom-shape-divider-bottom .shape-fill {
    fill: #FFFFFF;
}

/* Parallax enhancements */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    overflow: hidden;
}

.parallax::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(1px);
}

/* Glassmorphism effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Scroll indicator enhancement */
.scroll-indicator {
    position: relative;
    display: inline-block;
}

.scroll-indicator::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, white, transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { transform: translateX(-50%) scaleY(0); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(-50%) scaleY(1); opacity: 0; }
}

/* Particle effect */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgb(255, 251, 0);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 15s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Modal animations */
#guidelinesModal,
#privacyModal {
    animation: fadeIn 0.3s ease-out;
}

#guidelinesModal .inline-block,
#privacyModal .inline-block {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Language switcher styles */
.lang-btn {
    position: relative;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    color: white;
    font-weight: 600;
}

/* Language Dropdown Styles */
#languageDropdown {
    animation: dropdownSlide 0.2s ease-out;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown button hover effect */
#languageDropdown button[data-active="true"] {
    background-color: rgba(113, 168, 83, 0.2);
    color: white;
}

/* Active language highlight */
#languageDropdown button[data-active="true"] {
    background-color: rgba(147, 51, 234, 0.2);
    color: white;
}

/* Shake animation for wrong code */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* ナビゲーションバーのトランジション */
#navbar {
    transition: top 0.5s ease;
}

/* アナウンスメントバーのスタイル */
#announcementBar {
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, rgba(9, 86, 27, 0.95), rgba(113, 168, 83, 0.95), rgba(86, 184, 33, 0.95));
    min-height: 48px;
    z-index: 60;
}

/* ロゴのシャドウ効果（アニメーションなし） */
.logo-shadow-glow {
    filter: drop-shadow(0 0 30px rgba(113, 168, 83, 0.5)) drop-shadow(0 0 60px rgba(36, 120, 29, 0.3)) drop-shadow(0 25px 25px rgba(0, 0, 0, 0.3));
}

/* Top shape divider */
.custom-shape-divider-top {
    position: absolute;
    top: -1px;
    /* わずかに調整して隙間を防ぐ */
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
}

.custom-shape-divider-top svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 150px;
    transform: rotateY(180deg);
}

/* ヒーローセクションの背景に合わせて色を調整 */
.custom-shape-divider-top .shape-fill {
    fill: #ffffff;
    /* ヒーローセクションの背景色（hero-gradient）に合わせる */
}

/* Mobile menu animation */
#mobileMenu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* モバイルメニュー表示時の背景 */
@media (max-width: 767px) {
    #navbar.menu-open {
        background-color: rgba(31, 41, 55, 0.98) !important;
    }
}