/*====================
    0. 変数と基本設定
====================*/
:root {
    --primary-pink: #fbc7d4;
    --light-pink: #fce4e8;
    --dark-pink: #e0a3b2;
    --text-color: #555;
    --heading-color: #d16b86;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--light-pink);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/*====================
    1. ローディング画面
====================*/
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-pink);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    width: 100%;
}

.block {
    width: 20px;
    height: 20px;
    background-color: white;
    margin: 0 5px;
    animation: block-jump 1.2s infinite ease-in-out;
    border-radius: 4px;
    border: 2px solid var(--dark-pink);
}

.block:nth-child(2) { animation-delay: 0.1s; }
.block:nth-child(3) { animation-delay: 0.2s; }
.block:nth-child(4) { animation-delay: 0.3s; }
.block:nth-child(5) { animation-delay: 0.4s; }
.block:nth-child(6) { animation-delay: 0.5s; }

#loader p {
    margin-top: 15px;
    color: white;
    font-weight: bold;
    animation: fadeInOut 2.4s infinite;
}

/*====================
    2. ヘッダーとナビゲーション
====================*/
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 900;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 5%;
}

.logo {
    max-width: 200px;
    height: auto;
    flex-shrink: 0;
}

.logo-image {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.1) rotate(-5deg);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-item {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 5px;
}

.nav-item::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: var(--dark-pink);
    transition: width 0.3s ease;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.nav-item:hover::after {
    width: 100%;
}

.hamburger-menu {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
}

.hamburger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: var(--dark-pink);
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

/*====================
    3. メインコンテンツ
====================*/
main {
    padding: 20px 5%;
}

.hero {
    background: linear-gradient(135deg, var(--primary-pink), var(--dark-pink));
    color: white;
    text-align: center;
    padding: 100px 20px;
    border-radius: 20px;
    margin-bottom: 40px;
    animation: fadeIn 1.5s ease-in-out;
    position: relative;
    overflow: hidden;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-button {
    background-color: white;
    color: var(--dark-pink);
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: inline-block;
}

.cta-button:hover {
    transform: scale(1.05) rotate(2deg);
    background-color: #fff0f5;
}

.content-section {
    margin-bottom: 40px;
}

.section-card {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
    animation: slideInUp 0.8s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

h3 {
    font-size: 2rem;
    color: var(--heading-color);
    border-left: 5px solid var(--dark-pink);
    padding-left: 15px;
    margin-bottom: 20px;
}

ol, ul {
    list-style-position: inside;
    margin-bottom: 20px;
    padding-left: 20px;
}

ol li, ul li {
    margin-bottom: 10px;
}

.card-image-container {
    text-align: center;
    margin-top: 20px;
}

.card-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card-image:hover {
    transform: scale(1.02);
}

.link-text {
    color: var(--dark-pink);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.link-text:hover {
    color: var(--heading-color);
}

.card-button-container {
    text-align: center;
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

/* LINEボタンの追加 */
.line-button {
    background: linear-gradient(45deg, #00c300, #00a800);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(0, 195, 0, 0.3);
    position: relative;
    padding-left: 50px;
}

.line-button::before {
    content: '';
    background: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M11.999 0C5.372 0 0 5.372 0 12c0 6.627 5.372 12 12 12 6.626 0 12-5.373 12-12C24 5.372 18.625 0 11.999 0zM12 21.6c-5.3 0-9.6-4.3-9.6-9.6s4.3-9.6 9.6-9.6 9.6 4.3 9.6 9.6-4.3 9.6-9.6 9.6zM8.4 12c0-.4.3-.7.7-.7h.9v-.9c0-.4.3-.7.7-.7s.7.3.7.7v.9h.9c.4 0 .7.3.7.7s-.3.7-.7.7h-.9v.9c0 .4-.3.7-.7.7s-.7-.3-.7-.7v-.9h-.9c-.4 0-.7-.3-.7-.7s.3-.7.7-.7z"/></svg>') no-repeat center center;
    background-size: 24px;
    width: 24px;
    height: 24px;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.line-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 195, 0, 0.5);
}

.blumap-container {
    border: 2px solid var(--dark-pink);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.blumap-container iframe {
    width: 100%;
    height: 500px;
    display: block;
}

.map-button {
    background-color: #6a7ecb;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease, background-color 0.3s ease;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(106, 126, 203, 0.3);
}

.map-button:hover {
    transform: scale(1.05);
    background-color: #5d6eaf;
    box-shadow: 0 8px 25px rgba(106, 126, 203, 0.5);
}

.skip-container {
    text-align: center;
    margin-top: 20px;
}

.skip-button {
    background-color: white;
    color: var(--dark-pink);
    border: 2px solid var(--dark-pink);
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.skip-button:hover {
    background-color: var(--dark-pink);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.small-text {
    font-size: 0.8rem;
    color: #999;
    margin-top: 10px;
    text-align: center;
}

/*====================
    4. 折りたたみメニュー
====================*/
.platform-details {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    transition: transform 0.3s ease;
}

.platform-details:hover {
    transform: translateY(-3px);
}

.platform-details summary {
    padding: 20px;
    cursor: pointer;
    outline: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--heading-color);
    position: relative;
    list-style: none;
    display: flex;
    align-items: center;
}

.platform-details summary h4 {
    flex-grow: 1;
    padding-left: 10px;
}

/* 共通の画像スタイル */
.platform-details summary::before {
    content: '';
    display: inline-block;
    width: 25px;
    height: 25px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 10px;
}

/* 各エディションに個別の画像を指定 */
.java-edition summary::before {
    background-image: url('img/java-image.png');
}

.bedrock-pc summary::before {
    background-image: url('img/bedrock-pc-image.png');
}

.bedrock-console summary::before {
    background-image: url('img/bedrock-console-image.png');
}

.platform-details summary::after {
    content: '▶';
    font-size: 1.2rem;
    color: var(--dark-pink);
    transition: transform 0.3s ease;
}

.platform-details[open] summary::after {
    transform: rotate(90deg);
}

.details-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    overflow: hidden;
    padding: 0 40px;
}

.platform-details[open] .details-content {
    grid-template-rows: 1fr;
    padding: 10px 40px 20px 40px;
}

.details-content p {
    margin-bottom: 10px;
}

.details-content ol,
.details-content ul {
    list-style-position: outside;
    padding-left: 20px;
}

.details-content li {
    margin-bottom: 10px;
}

/*====================
    5. フッター
====================*/
footer {
    text-align: center;
    padding: 20px;
    background-color: var(--dark-pink);
    color: white;
}

/*====================
    6. アニメーション
====================*/
@keyframes block-jump {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-20px); }
    50% { transform: translateY(0); background-color: var(--dark-pink); }
    75% { transform: translateY(10px); }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

/*====================
    7. レスポンシブデザイン
====================*/
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.9);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 20px 0;
        text-align: center;
        box-shadow: var(--box-shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger-menu {
        display: flex;
    }

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

    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

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

    .hero-content h2 {
        font-size: 2rem;
    }

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

/*====================
    8. 共通施設
====================*/
.facility-item {
    margin-top: 40px;
    padding: 20px;
    background-color: #f7f7f7;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.facility-item:hover {
    transform: translateY(-3px);
}

.facility-item h4 {
    color: var(--heading-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.facility-item p {
    margin-bottom: 10px;
}

.rule-text {
    font-size: 0.9rem;
    color: #888;
    border-left: 3px solid var(--dark-pink);
    padding-left: 10px;
}

.facility-image-container {
    text-align: center;
    margin-top: 20px;
}

.facility-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.facility-image:hover {
    transform: scale(1.02);
}

/*====================
    9. トップに戻るボタン
====================*/
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--dark-pink);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 950;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top svg {
    width: 24px;
    height: 24px;
}

/*====================
    10. 強調表示
====================*/
.highlight {
    color: #d9534f; /* 濃い赤 */
    font-weight: bold;
}

/* Discordボタンの追加 */
.discord-button {
    background-color: #7289da;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(114, 137, 218, 0.3);
}

.discord-button:hover {
    transform: scale(1.05) translateX(5px);
    background-color: #6a7ecb;
    box-shadow: 0 8px 25px rgba(114, 137, 218, 0.5);
}
