/* ========================================================= */
/* 1. リセットCSSと共通スタイル */
/* ========================================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Hiragino Sans', 'ヒラギノ角ゴシック', '游ゴシック', YuGothic, sans-serif;
    line-height: 1.8;
    color: #f0f0f0;
    overflow-x: hidden;
    background-color: #111122; 
    touch-action: manipulation; 
    transition: opacity 0.5s ease-out;
}

body.fade-out {
    opacity: 0;
}

h1, h2, h3 {
    font-family: 'Noto Serif JP', serif;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

p {
    font-size: 1rem;
    line-height: 1.8;
    opacity: 0.8;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #a788cb;
}

section {
    padding: 10vh 5vw;
}

.section-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* ========================================================= */
/* 2. ロード画面のスタイル */
/* ========================================================= */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.light-trail {
    position: relative;
    width: 150px;
    height: 150px;
}

.light-trail::before, .light-trail::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px #fff, 0 0 25px #a788cb;
    animation: trail 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.light-trail::after {
    animation-delay: 1.25s;
    background: #a788cb;
    box-shadow: 0 0 15px #a788cb, 0 0 25px #ffffff;
}

@keyframes trail {
    0% {
        transform: translate(-50px, 50px) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(50px, -50px) scale(0.5);
        opacity: 0;
    }
}

/* ========================================================= */
/* 3. ヘッダーメニューのスタイル */
/* ========================================================= */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    backdrop-filter: blur(5px);
    padding: 1.5rem 5vw;
    z-index: 1000;
    transition: top 0.5s ease-in-out;
}

#main-header.active {
    top: 0;
}

#main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

#main-header .logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.1em;
}

#main-header .nav-links a {
    margin-left: 2.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

#main-header .nav-links a:hover {
    opacity: 1;
}

/* ========================================================= */
/* 4. 背景の空要素 */
/* ========================================================= */
#sky-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#moon {
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #eee;
    box-shadow: 0 0 20px #fff;
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

#stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px #fff;
    animation: twinkle 1.5s infinite alternate;
}

.star:nth-child(1) { top: 20%; left: 15%; width: 2px; height: 2px; }
.star:nth-child(2) { top: 35%; right: 10%; width: 3px; height: 3px; animation-delay: 0.2s; }
.star:nth-child(3) { bottom: 25%; left: 30%; width: 1px; height: 1px; animation-delay: 0.5s; }
.star:nth-child(4) { top: 50%; left: 50%; width: 2px; height: 2px; animation-delay: 0.8s; }
.star:nth-child(5) { top: 15%; right: 40%; width: 3px; height: 3px; animation-delay: 1.1s; }
.star:nth-child(6) { bottom: 10%; right: 20%; width: 1px; height: 1px; animation-delay: 1.4s; }

@keyframes twinkle {
    from { opacity: 1; }
    to { opacity: 0.6; }
}

#sun-rays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 70%, rgba(255, 255, 204, 0.2));
    opacity: 0;
    pointer-events: none;
    transition: opacity 2s ease-in-out;
}

/* ========================================================= */
/* 5. ヒーローセクションのスタイル */
/* ========================================================= */
#main-content {
    display: none;
}

#hero-slider {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 1;
    white-space: nowrap;
}

.hero-content h1 {
    font-size: clamp(2rem, 8vw, 6rem);
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease-out;
    margin: 0;
}

.hero-content p {
    font-size: clamp(1rem, 3vw, 2rem);
    letter-spacing: 0.5em;
    animation: fadeInUp 1s ease-out 0.2s forwards;
    opacity: 0;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    margin: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-down-prompt {
    position: absolute;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

/* ========================================================= */
/* 6. aboutセクションのスタイル */
/* ========================================================= */
#about {
    padding: 10vh 5vw;
    text-align: center;
}

#about h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.about-content p {
    margin-bottom: 1.5rem;
}

.about-content p:last-of-type {
    margin-bottom: 0;
}

.about-content a {
    color: #a788cb;
    text-decoration: underline;
}

/* ========================================================= */
/* 7. 商品一覧セクションのスタイル */
/* ========================================================= */
#products {
    padding: 10vh 5vw;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.product-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.product-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.product-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.product-item p {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ========================================================= */
/* 8. コンタクトセクションのスタイル */
/* ========================================================= */
#contact {
    padding: 10vh 5vw;
    text-align: center;
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.form-group .required {
    color: #a788cb;
    font-weight: bold;
    margin-left: 0.2rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #a788cb;
    outline: none;
}

.form-group textarea {
    resize: none;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23a788cb%22%20d%3D%22M287%20202.5l-139.7-139.7c-5-5-13.1-5-18.1%200L5.4%20202.5c-5%205-5%2013.1%200%2018.1s13.1%205%2018.1%200l130.6-130.6%20130.6%20130.6c5%205%2013.1%205%2018.1%200s5-13.1%200-18.1z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 0.8rem auto;
}

.neon-button {
    background-color: transparent;
    border: 2px solid #a788cb;
    color: #a788cb;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px #a788cb;
    position: relative;
    overflow: hidden;
}

.neon-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, #a788cb, transparent);
    transition: left 0.5s;
}

.neon-button:hover::before {
    left: 100%;
}

.neon-button:hover {
    color: #ffffff;
    box-shadow: 0 0 20px #a788cb, 0 0 30px #a788cb;
}

.form-messages {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.form-messages.show {
    opacity: 1;
}

.form-messages.success {
    color: #38c172;
}

.form-messages.error {
    color: #e3342f;
}

/* ========================================================= */
/* 9. フッターのスタイル */
/* ========================================================= */
footer {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 2rem 5vw;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    /* ★追加：PC表示時にアイコンとリンクを左右に配置するflexbox設定 */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.8rem;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
}

footer p {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* ========================================================= */
/* 10. レスポンシブデザイン */
/* ========================================================= */

/* PC用スタイル：769px以上 */
@media (min-width: 769px) {
    #main-header nav {
        justify-content: space-between;
    }
    .hamburger-menu {
        display:block; 
    }
    .nav-links {
        display: block !important;
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        transform: none;
        flex-direction: row;
        gap: 0;
    }
    .nav-links a {
        font-size: 0.9rem;
        margin-left: 2.5rem;
        animation: none;
    }
    .nav-links .social-share {
        display: none;
    }
    /* ★追加：PC用フッターのレイアウト */
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .footer-links {
        justify-content: flex-start;
        margin-bottom: 0;
    }

    .desktop-social-share {
        display: flex;
        gap: 1rem;
    }
    
    .desktop-social-share a {
        display: inline-block;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(5px);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: background-color 0.3s ease, transform 0.3s ease;
    }
    
    .desktop-social-share a:hover {
        background-color: #a788cb;
        transform: scale(1.1);
    }
    
    .desktop-social-share .share-icon {
        font-size: 1.2rem;
        color: #fff;
    }
}

/* スマートフォン用スタイル：768px以下 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    section h2 {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }

    #main-header nav .logo {
        display: none;
    }

    #main-header {
        background-color: transparent;
        backdrop-filter: none;
    }

    .hamburger-menu {
        display: block;
        cursor: pointer;
        z-index: 100;
    }

    .hamburger-menu .bar {
        width: 25px;
        height: 3px;
        background-color: #fff;
        margin: 5px 0;
        transition: 0.4s;
    }

    .hamburger-menu.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.9);
        z-index: 99;
        transition: transform 0.5s ease-in-out;
        transform: translateX(100%);
        gap: 3rem;
    }

    .nav-links.open {
        display: flex;
        transform: translateX(0);
    }

    .nav-links.active {
        display: flex;
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem;
        opacity: 0;
        animation: fadeIn 0.8s forwards;
    }

    .footer-nav {
        flex-direction: column;
    }

    .footer-links {
        margin-bottom: 1rem;
    }

    .social-share {
        display: flex;
        gap: 2rem;
        justify-content: center;
        align-items: center;
        margin-top: 2rem;
    }
    
    .social-share a {
        display: inline-block;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(5px);
        display: flex;
        justify-content: center;
        align-items: center;
        transition: background-color 0.3s ease, transform 0.3s ease;
    }

    .social-share a:hover {
        background-color: #a788cb;
        transform: scale(1.1);
    }

    .social-share a .share-icon {
        font-size: 1.5rem;
        color: #fff;
    }
    
    .desktop-social-share {
        display: none;
    }
    
    .visually-hidden {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
    }
}