:root {
    /* =========================
       サイズ
    ========================= */
    --header-height: 90px;
    --sidebar-width: 250px;

    /* =========================
       ベースカラー
    ========================= */
    --background: #0d0f12;
    --header: #101419;
    --card: #171c22;
    --card-hover: #1d232a;
    --border: #2a3038;

    /* =========================
       文字
    ========================= */
    --text: #f3f4f6;
    --subtext: #9ca3ad;

    /* =========================
       ブランドカラー
    ========================= */
    --green: #79bd43;
    --green-dark: #5f9e31;

    --cyan: #74DFDB;
}


/* =========================
   基本
========================= */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    background: var(--background);
    color: var(--text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans JP",
        sans-serif;

    line-height: 1.7;
}


/* =========================
   ヘッダー
========================= */

.header {
    position: sticky;
    top: 0;

    height: var(--header-height);

    background: var(--header);
    border-bottom: 1px solid var(--border);

    z-index: 1000;
}

.header::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: 1px;

    background: linear-gradient(90deg,
            transparent 0%,
            var(--border) 15%,
            rgba(116, 223, 219, 0.45) 50%,
            var(--border) 85%,
            transparent 100%);
}

.header-inner {
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 30px;
}


/* =========================
   ロゴ
========================= */

.logo {
    display: flex;
    align-items: center;

    gap: 12px;

    color: var(--text);
    text-decoration: none;

    line-height: 1.2;
}

.server-icon {
    width: 52px;
    height: 52px;

    object-fit: cover;

    border-radius: 8px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 22px;
    font-weight: 700;
}

.logo-sub {
    margin-top: 4px;

    color: var(--cyan);

    font-size: 12px;
}


/* =========================
   ヘッダーナビ
========================= */

.header-nav {
    display: flex;
    align-items: center;

    gap: 28px;
}

.header-nav a {
    color: var(--subtext);
    text-decoration: none;

    font-size: 14px;

    transition:
        color 0.2s,
        transform 0.2s;
}

.header-nav a:hover {
    color: var(--cyan);

    transform: translateY(-1px);
}


/* =========================
   HERO
========================= */

.hero {
    position: relative;

    height: 600px;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 0;

    text-align: center;
}


/* 背景画像 */

.hero-backgrounds {
    position: absolute;
    inset: 0;

    z-index: 0;
    /* JSから変更する */
    filter: blur(var(--hero-blur, 0px));

    /* blurで画像の端が見えないよう少し拡大 */
    transform: scale(1.05);

    will-change: filter;
}

.hero-bg {
    position: absolute;
    inset: 0;

    background-size: cover;
    background-position: center;

    opacity: 0;

    animation: heroFade 28s infinite;
}

.bg1 {
    background-image: url("../images/background1.webp");
    animation-delay: 0s;
}

.bg2 {
    background-image: url("../images/background2.webp");
    animation-delay: 7s;
}

.bg3 {
    background-image: url("../images/background3.webp");
    animation-delay: 14s;
}

.bg4 {
    background-image: url("../images/background4.webp");
    animation-delay: 21s;
}

.bg5 {
    background-image: url("../images/background5.webp");
    animation-delay: 28s;
}


/* HERO暗幕 */

.hero-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(to bottom,
            rgba(5, 8, 10, 0.25),
            rgba(5, 8, 10, 0.72));

    z-index: 1;
}


/* HERO文字 */

.hero-content {
    position: relative;

    z-index: 2;

    padding: 30px;
}

.hero-content h1 {
    margin: 5px 0 10px;

    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.1;

    color: var(--text);

    text-shadow:
        0 3px 20px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    margin: 0;

    color: var(--cyan);

    font-size: 18px;
    font-weight: 700;

    letter-spacing: 3px;
}

.hero-description {
    margin: 20px 0 30px;

    color: #e4e7eb;

    font-size: 17px;

    text-shadow:
        0 2px 10px rgba(0, 0, 0, 0.9);
}

.hero-gallery-link {
    display: flex;
    align-items: center;
    justify-content: center;

    width: fit-content;

    gap: 7px;

    margin: 18px auto 0;

    color: rgba(255, 255, 255, 0.72);

    font-size: 13px;
    font-weight: 500;

    text-decoration: none;

    transition:
        color 0.2s,
        transform 0.2s;
}

.hero-gallery-link i {
    color: var(--cyan);
    font-size: 17px;
}

.hero-gallery-link span {
    transition: transform 0.2s;
}

.hero-gallery-link:hover {
    color: #ffffff;
}

.hero-gallery-link:hover span {
    transform: translateX(4px);
}

/* =========================
   HEROボタン
========================= */

.hero-buttons {
    display: flex;
    justify-content: center;

    gap: 12px;
}

.button {
    display: inline-block;

    padding: 11px 22px;

    border-radius: 6px;

    text-decoration: none;
    font-weight: 600;

    transition:
        transform 0.2s,
        filter 0.2s,
        background 0.2s,
        border-color 0.2s;
}

.button-primary {
    background: var(--green);

    color: #0d0f12;
}

.button-primary:hover {
    transform: translateY(-2px);

    filter: brightness(1.1);
}

.button-secondary {
    color: white;

    background:
        rgba(10, 13, 16, 0.65);

    border:
        1px solid rgba(116, 223, 219, 0.45);

    backdrop-filter: blur(5px);
}

.button-secondary:hover {
    background:
        rgba(30, 35, 40, 0.9);

    border-color: var(--cyan);
}


/* =========================
   HEROアニメーション
========================= */

@keyframes heroFade {

    0% {
        opacity: 0;
        transform: scale(1.03);
    }

    5% {
        opacity: 1;
    }

    25% {
        opacity: 1;
    }

    30% {
        opacity: 0;
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}



/* =========================
   サーバー情報
========================= */

.server-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 14px;

    margin-top: 30px;
}

.server-info-card {
    display: flex;
    flex-direction: column;

    padding: 22px 24px;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 8px;
}

.server-info-label {
    margin-bottom: 5px;

    color: var(--cyan);

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 1.5px;
}

.server-info-card strong {
    color: var(--text);

    font-size: 26px;
    line-height: 1.3;
}

.server-info-card>span:last-child {
    margin-top: 3px;

    color: var(--subtext);

    font-size: 13px;
}

@media (max-width: 600px) {
    .server-info-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   レイアウト
========================= */

.layout {
    display: flex;
    align-items: flex-start;

    max-width: 1400px;

    margin: 0 auto;
}


/* =========================
   サイドバー
========================= */

.sidebar {
    position: sticky;
    top: var(--header-height);

    width: var(--sidebar-width);
    min-width: var(--sidebar-width);

    height:
        calc(100vh - var(--header-height));

    padding: 35px 20px;

    border-right: 1px solid var(--border);

    overflow-y: auto;
}

.sidebar-title {
    margin:
        0 0 15px 10px;

    color: var(--cyan);

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 1px;
}

.sidebar-nav a {
    display: block;

    margin-bottom: 4px;

    padding: 10px 12px;

    color: #d9dde2;
    text-decoration: none;

    border-radius: 6px;

    font-size: 14px;

    transition:
        background 0.15s,
        color 0.15s;
}

.sidebar-nav a:hover {
    background: var(--card-hover);

    color: var(--cyan);
}


/* =========================
   メイン
========================= */

.main {
    flex: 1;

    min-width: 0;

    max-width: 950px;

    padding:
        55px 60px 100px;
}


/* =========================
   セクション
========================= */

section {
    margin-bottom: 80px;

    scroll-margin-top:
        calc(var(--header-height) + 30px);
}

section h1 {
    margin: 0 0 15px;

    font-size: 36px;
}

section h2 {
    margin: 0 0 15px;

    font-size: 28px;
}

section h3 {
    margin: 0 0 10px;

    font-size: 18px;
}

section p {
    color: #c4c8ce;
}

.section-label {
    margin-bottom: 5px;

    color: var(--cyan);

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 1.5px;
}

.lead {
    margin-bottom: 30px;

    color: var(--subtext);

    font-size: 16px;
}


/* =========================
   カード
========================= */

.card {
    margin-top: 18px;

    padding: 22px 24px;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 8px;

    transition:
        border-color 0.2s,
        background 0.2s;
}

.card:hover {
    background: var(--card-hover);

    border-color:
        rgba(116, 223, 219, 0.35);
}

.card p {
    margin-bottom: 15px;
}


/* =========================
   お知らせ
========================= */

.notice {
    margin-top: 30px;

    padding: 20px 22px;

    background:
        rgba(121, 189, 67, 0.08);

    border:
        1px solid rgba(121, 189, 67, 0.35);

    border-radius: 8px;
}

.notice strong {
    color: var(--green);
}

.notice p {
    margin: 5px 0 0;
}


/* =========================
   コード表示
========================= */

code {
    display: inline-block;

    margin-right: 8px;

    padding: 5px 10px;

    background: #0c1014;

    border: 1px solid var(--border);
    border-radius: 5px;

    color: var(--cyan);

    font-family:
        Consolas,
        "Courier New",
        monospace;
}


/* =========================
   便利な機能スライダー
========================= */

.feature-slider {
    display: flex;
    align-items: center;

    gap: 20px;

    margin-top: 30px;
}

.slides {
    position: relative;

    flex: 1;
    min-width: 0;

    overflow: hidden;

    border-radius: 10px;
}

.feature-slide {
    display: none;

    min-height: 260px;
    padding: 35px;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 10px;
}

.feature-slide.active {
    display: block;
}


/* 次へ：右から入ってくる */
.feature-slide.slide-in-right {
    display: block;

    animation: slideInRight 0.35s ease;
}

@keyframes slideInRight {

    from {
        opacity: 0;
        transform: translateX(50px);
    }

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


/* 前へ：左から入ってくる */
.feature-slide.slide-in-left {
    display: block;

    animation: slideInLeft 0.35s ease;
}

@keyframes slideInLeft {

    from {
        opacity: 0;
        transform: translateX(-50px);
    }

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

.slider-button {
    width: 44px;
    min-width: 44px;
    height: 44px;

    border: 1px solid var(--border);
    border-radius: 50%;

    background: var(--card);

    color: var(--cyan);

    cursor: pointer;

    font-size: 20px;

    transition:
        background 0.2s,
        border-color 0.2s,
        transform 0.2s;
}

.slider-button:hover {
    background: var(--card-hover);

    border-color: var(--cyan);

    transform: scale(1.05);
}


/* =========================
   コマンド
========================= */

.command {
    margin-top: 15px;

    padding: 20px;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 8px;
}

.command p {
    margin: 0;
}

.command-name {
    display: inline-flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 8px;

    padding: 0;

    background: none;
    border: none;

    color: var(--cyan);

    font-family:
        Consolas,
        "Courier New",
        monospace;

    font-weight: 700;

    cursor: pointer;
}

.command-name code {
    transition:
        border-color 0.2s,
        color 0.2s;
}

.command-name:hover code {
    color: var(--cyan);

    border-color: var(--cyan);
}


/* =========================
   コピー完了
========================= */

.copy-message {
    color: var(--green);

    font-size: 13px;
    font-weight: 600;

    opacity: 0;

    transform:
        translateX(-5px);

    transition:
        opacity 0.2s,
        transform 0.2s;

    pointer-events: none;
}

.copy-message.show {
    opacity: 1;

    transform:
        translateX(0);
}


/* =========================
   フッター
========================= */

.footer {
    position: relative;

    padding: 30px;

    color: var(--subtext);
    text-align: center;
    font-size: 13px;
}

.footer::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    height: 1px;

    background: linear-gradient(90deg,
            transparent 0%,
            var(--border) 15%,
            rgba(116, 223, 219, 0.45) 50%,
            var(--border) 85%,
            transparent 100%);
}

/* =========================
   スマホ
========================= */

@media (max-width: 800px) {

    :root {
        --header-height: 70px;
    }

    .header-inner {
        padding: 0 18px;
    }

    .server-icon {
        width: 42px;
        height: 42px;
    }

    .logo-main {
        font-size: 17px;
    }

    .logo-sub {
        display: none;
    }

    .header-nav {
        gap: 14px;
    }

    .header-nav a {
        font-size: 12px;
    }

    .hero {
        height: 480px;
    }

    .sidebar {
        display: none;
    }

    .main {
        width: 100%;

        padding:
            35px 20px 70px;
    }

    section h1 {
        font-size: 30px;
    }

    section h2 {
        font-size: 24px;
    }

    .feature-slider {
        gap: 10px;
    }

    .feature-slide {
        min-height: 230px;

        padding: 25px 20px;
    }

    .slider-button {
        width: 38px;
        min-width: 38px;
        height: 38px;
    }
}

.commands-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin-top: 24px;
    padding: 11px 18px;

    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;

    border: 1px solid var(--border);
    border-radius: 7px;

    background: var(--card);

    transition:
        background 0.2s,
        border-color 0.2s,
        transform 0.2s;
}

.commands-more span {
    transition: transform 0.2s;
}

.commands-more:hover {
    background: var(--card-hover);
    border-color: var(--cyan);
    transform: translateY(-1px);
}

.commands-more:hover span {
    transform: translateX(4px);
}

/* =========================
   詳細ページへのリンクカード
========================= */

.feature-link {
    display: block;

    color: inherit;
    text-decoration: none;

    cursor: pointer;

    transition:
        border-color 0.2s,
        transform 0.2s;
}

.feature-link:hover {
    border-color: var(--cyan);
    transform: translateY(-2px);
}

.feature-more {
    display: inline-block;

    margin-top: 12px;

    color: var(--cyan);

    font-size: 13px;
    font-weight: 600;
}

/* =========================
   便利な機能：ガイドリンク
========================= */

.feature-guide-link {
    display: block;

    width: fit-content;

    margin-top: 20px;

    color: var(--cyan);
    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    transition:
        color 0.2s,
        transform 0.2s;
}

.feature-guide-link:hover {
    color: var(--green);

    transform: translateX(4px);
}

/* =========================
   ヘッダー：ガイドドロップダウン
========================= */

.nav-dropdown {
    position: relative;

    display: flex;
    align-items: center;
}

.nav-dropdown-button {
    display: flex;
    align-items: center;

    gap: 6px;

    padding: 0;

    background: none;
    border: none;

    color: var(--subtext);

    font-size: 14px;

    cursor: pointer;

    transition:
        color 0.2s;
}

.nav-dropdown-button:hover {
    color: var(--cyan);
}

.nav-dropdown-arrow {
    font-size: 8px;

    transition:
        transform 0.2s;
}


/* メニュー */

.nav-dropdown-menu {
    position: absolute;

    top: calc(100% + 18px);
    right: 0;

    width: 220px;

    padding: 8px;

    background: rgba(16, 20, 25, 0.98);

    border: 1px solid var(--border);
    border-radius: 8px;

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.35);

    opacity: 0;
    visibility: hidden;

    transform: translateY(-5px);

    transition:
        opacity 0.18s,
        visibility 0.18s,
        transform 0.18s;

    z-index: 1100;
}

.nav-dropdown-menu a {
    display: flex;
    flex-direction: column;

    gap: 1px;

    padding: 10px 12px;

    color: var(--text);

    border-radius: 6px;

    text-decoration: none;

    transform: none;
}

.nav-dropdown-menu a span {
    color: var(--subtext);

    font-size: 11px;
}

.nav-dropdown-menu a:hover {
    background: var(--card-hover);

    color: var(--cyan);

    transform: none;
}


/* ホバーで表示 */

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;

    transform: translateY(0);
}

.nav-dropdown:hover .nav-dropdown-arrow {
    transform: rotate(180deg);
}

/* =========================
   ガイドドロップダウン：MDI
========================= */

.nav-dropdown-menu a {
    display: flex;
    flex-direction: row;
    align-items: center;

    gap: 12px;
}

.nav-dropdown-menu a>.mdi {
    width: 24px;
    min-width: 24px;

    color: var(--cyan);

    font-size: 20px;

    text-align: center;
}

.nav-dropdown-menu a>div {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.nav-dropdown-menu a>div span {
    color: var(--subtext);

    font-size: 11px;
}

.mobile-menu-button {
    display: none;
}

@media (max-width: 800px) {

    .header-inner {
        position: relative;

        display: flex;
        align-items: center;
        justify-content: space-between;

        width: 100%;
    }

    .mobile-menu-button {
        display: flex;
        align-items: center;
        justify-content: center;

        width: 42px;
        height: 42px;

        margin-left: auto;

        background: transparent;
        border: 1px solid var(--border);
        border-radius: 7px;

        color: var(--text);
        font-size: 26px;

        cursor: pointer;
    }

    .header-nav {
        position: absolute;

        top: 100%;
        left: 0;
        right: 0;

        /* 常にflexにしてアニメーション可能にする */
        display: flex;
        flex-direction: column;
        align-items: stretch;

        gap: 0;

        padding: 10px 18px 16px;

        background: rgba(12, 16, 20, 0.96);

        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);

        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);

        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);

        /* 閉じている状態 */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform: translateY(-8px);

        transition:
            opacity 0.2s ease,
            transform 0.2s ease,
            visibility 0.2s;

        z-index: 1000;
    }

    .header-nav.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: translateY(0);
    }


    /* =========================
   スマホ：メインメニュー
========================= */

    .header-nav>a,
    .nav-dropdown-button {
        box-sizing: border-box;

        width: 100%;

        /* スマホで押しやすい高さ */
        padding: 12px 8px;

        text-align: center;
        justify-content: center;

        /* 各項目の区切り線 */
        border-bottom: 1px solid var(--border);
    }

    /* Webマップの下には線を付けない */
    .header-nav>a:last-child {
        border-bottom: none;
    }


    /* =========================
   スマホ：ガイド
========================= */

    .nav-dropdown {
        width: 100%;
    }

    /* ガイド内の小さいメニュー */
    .nav-dropdown-menu {
        width: 160px;

        padding: 2px;

        border-radius: 6px;
    }

    /* チェスト保護・土地保護・mcMMO */
    .nav-dropdown-menu a {
        gap: 6px;

        padding: 6px 5px;

        justify-content: flex-start;
        text-align: left;

        /* ガイド内には区切り線を付けない */
        border-bottom: none;
    }

    /* アイコン */
    .nav-dropdown-menu a>.mdi {
        width: 17px;
        min-width: 17px;

        font-size: 17px;
    }

    /* タイトル＋説明 */
    .nav-dropdown-menu a>div {
        line-height: 1.2;
    }

    /* LWC Extended / WorldGuard / スキル・能力 */
    .nav-dropdown-menu a>div span {
        margin-top: 1px;

        font-size: 10px;
        line-height: 1.2;
    }

    /* ハンバーガーメニューの文字サイズ */
    .header-nav>a,
    .nav-dropdown-button {
        font-size: 15px;
        font-weight: 500;
    }
}