/* 基本リセット */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    width: 100%;
    height: auto;
}

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    height: 100vh;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    background-color: #7992be;
    /* デザインに合わせた色 */
}

/* ヘッダーのスタイル */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.header-content img {
    height: 30px;
    width: auto;
}

/* ハンバーガーメニューのスタイル */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 20;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ハンバーガーメニューのアクティブ時のスタイル */
.hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ナビゲーションメニューのスタイル */
.main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.5);
    transition: right 0.6s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.main-nav.active {
    right: 0;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.main-nav.active ul {
    opacity: 1;
    transform: translateX(0);
}

.main-nav ul li {
    margin: 20px 0;
}

.main-nav ul li a {
    text-decoration: none;
    color: #fff;
    font-size: 1.6rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    transition: color 0.3s ease;
    text-transform: uppercase;
}

.main-nav ul li a:hover {
    color: #f39c12;
}

/* 背景アニメーション */
.background-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background: linear-gradient(45deg, #fd6d7600, #fdbfa700), url(../img/bg.png);
    background-size: 300% 300%, cover;
    background-blend-mode: multiply;
    animation: gradientShift 15s ease infinite;
}

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

    100% {
        background-position: 100% 50%;
    }
}

/* アイコンコンテナ */
.icon-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 10px;
}

/* 各アイコン */
.icon-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, top 0.5s ease, left 0.5s ease, width 0.5s ease, height 0.5s ease;
}

.icon {
    width: 100%;
    height: 200px;
    border-radius: 5%;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.icon-item.active {
    position: fixed;
    width: 80vw;
    height: 80vh;
    z-index: 10;
    transition: transform 0.5s ease, top 0.5s ease, left 0.5s ease;
}

.icon-item.active .icon {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
}

/* 名前のスタイル */
.name {
    font-size: 16px;
    font-weight: bold;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: #fff;
    text-align: center;
    background: linear-gradient(0deg, #3a3a3adb, transparent);
    padding: 15px 5px 5px 5px;
    border-radius: 0 0 5px 5px;
}

.icon-item.active .name {
    font-size: 7px !important;
    top: 0;
    height: 35px;
    background: linear-gradient(180deg, #000000ad, transparent);
    border-radius: 10px 10px 0 0;
}

/* MOREボタンのスタイル */
.more-btn {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #ffffff4f;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}


/* 初期状態のアイコン */
.icon-item {
    opacity: 0;
    max-height: 0;
    /* アイコンを非表示にするが、アニメーション可能にする */
    margin: 0;
    overflow: hidden;
    transform: translateY(20px);
    /* 視覚的に下から出てくる効果 */
    transition: opacity 0.6s ease, transform 0.6s ease, max-height 0.6s ease, margin 0.6s ease;
    visibility: hidden;
    /* アニメーション中も表示を制御 */
}

/* 表示されたアイコン */
.icon-item.visible {
    opacity: 1;
    max-height: 200px;
    /* 元の高さに戻す */
    transform: translateY(0);
    /* 元の位置に戻す */
    visibility: visible;
}

/* 完全に非表示にする */
.icon-item:not(.visible) {
    visibility: hidden;
    /* 視覚的に非表示 */
}

/* オーバーレイ */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 9;
}

.fullscreen-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* アニメーション */
@keyframes slideIn {
    0% {
        transform: translateX(50px);
        opacity: 0;
    }

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

.main-nav.active ul li:nth-child(1) {
    animation: slideIn 0.3s ease forwards;
}

.main-nav.active ul li:nth-child(2) {
    animation: slideIn 0.4s ease forwards;
}

.main-nav.active ul li:nth-child(3) {
    animation: slideIn 0.5s ease forwards;
}

.main-nav.active ul li:nth-child(4) {
    animation: slideIn 0.6s ease forwards;
}

/* スライダーのスタイル */
.slider-container {
    display: none;
    position: fixed;
    width: 100%;
    padding: 10px;
    bottom: 20px;
    left: 0;
    text-align: center;
    z-index: 100;
    margin: 0 auto;
}

.slider-handle {
    width: 60px;
    height: 60px;
    background-color: #007aff;
    border-radius: 50%;
    position: absolute;
    left: 10px;
    /* スタート位置をleft: 10pxに固定 */
    cursor: pointer;
    top: 50%;
    transform: translateY(-50%);
    transition: left 0.3s ease;
}

.slider-container.slider-active {
    /* 表示用のクラス名を変更 */
    display: block;
}

.slider-container.active {
    /* 表示用のクラス */
    display: block;
}

/* スライダーのメッセージ部分 */
.slider-message {
    border-radius: 70px;
    font-size: 14px;
    background: #ffffffa8;
    /* グラデーション追加 */
    background-size: 200% 200%;
    /* グラデーションのサイズを大きくする */
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    width: 360px;
    margin: 0 auto 10px;
    overflow: hidden;
}

/* グラデーションの光る動き */
@keyframes background-glow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

/* きらっと光るエフェクトの動き */
@keyframes shine {
    0% {
        opacity: 0;
        transform: translateX(0);
    }

    50% {
        opacity: 1;
        transform: translateX(720px);
        /* 速く光が現れる */
    }

    100% {
        opacity: 0;
        transform: translateX(720px);
        /* ワンテンポ待機 */
    }
}

/* メッセージボックスの光エフェクト */
.slider-message::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50px;
    width: 100px;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transform: translateX(0);
    animation: shine 2s ease-in-out infinite;
    /* アニメーション全体の時間を2秒に設定 */
}


/* メッセージのテキスト */
.slider-message p {
    text-align: center;
    display: block;
    margin: 0 auto;
    color: #333;
    font-weight: bold;
}

/* 矢印のアイコンを追加 */
.slider-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #ffffff;
    animation: arrow-move 1.5s infinite;
}

/* 矢印の動き */
@keyframes arrow-move {
    0% {
        transform: translateY(-50%) translateX(0);
    }

    50% {
        transform: translateY(-50%) translateX(5px);
    }

    100% {
        transform: translateY(-50%) translateX(0);
    }
}



/* スライドハンドル */
.slider-handle {
    width: 60px;
    height: 60px;
    background-color: #ffffff;
    /* ハンドルの色を白に変更 */
    border-radius: 50%;
    position: absolute;
    left: 10px;
    cursor: pointer;
    top: 50%;
    transform: translateY(-50%);
    transition: left 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgb(0 0 0 / 15%);
    animation: pulse 1.5s infinite;
}

/* ハンドル内の緑の矢印 */
.slider-handle::before {
    content: '➔';
    /* 矢印を表示 */
    color: #4caf50;
    /* 矢印の色を緑に変更 */
    font-size: 28px;
}

/* ハンドルのポンポンとした動き */
@keyframes pulse {
    0% {
        transform: translateY(-50%) scale(1);
    }

    50% {
        transform: translateY(-50%) scale(1.025);
    }

    100% {
        transform: translateY(-50%) scale(1);
    }
}


/* 成功時のスライダーハンドル */
.slider-handle.success {
    background-color: #4caf50;
    display: flex;
    justify-content: center;
    align-items: center;
}



.hidden {
    display: none;
}

.no-scroll {
    overflow: hidden;
}

/* LIVEバッジのスタイル */
.live-status {
    position: absolute;
    top: 5px;
    /* 位置を調整 */
    right: 5px;
    /* 右上に配置 */
    background-color: #5d5d5d9c;
    /* 緑色の背景 */
    color: #00ff00;
    /* 文字色を白 */
    padding: 1px 8px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 20px;
    /* バッジの丸みをつける */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    animation: blink .8s infinite alternate;
    /* チカチカするアニメーション */
}

.active .live-status {
    position: absolute;
    top: 2px;
    right: -6px;
    background-color: #5d5d5d9c;
    color: #00ff00;
    padding: 1px 8px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    animation: blink .8s infinite alternate;
    transform: scale(0.4);
}

/* チカチカするアニメーション */
@keyframes blink {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}

/* slider-handle内のチェックマークのスタイル */
.slider-handle svg {
    width: 35px;
    /* チェックマークのサイズを大きく */
    height: 35px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 中央に配置 */
    fill: white;
    /* チェックマークの色を白に */
}

.message-box {
    display: none;
    /* 最初は非表示 */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fffffff5;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.message-box.active {
    display: block;
    /* active クラスがついたら表示 */
}

.message-box p {
    font-size: 14px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
    line-height: 1.4;
}

.add-friend-btn,
.close-message-box {
    padding: 9px 25px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.add-friend-btn {
    background-color: #18cf51;
    color: white;
}

.add-friend-btn:hover {
    transform: scale(1.05);
}

.close-message-box {
    background-color: #d5d5d5;
    color: white;
    margin-top: 15px;
}

.close-message-box:hover {
    background-color: #c82333;
    transform: scale(1.05);
}

.add-friend-btn:active,
.close-message-box:active {
    transform: scale(0.98);
}