/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    padding: 20px;
    background-color: #f5f5f5;
}

/* チェックボックスを非表示 */
#popup-toggle {
    display: none;
}

/* トリガーテキストのスタイル */
.popup-trigger {
    color: #0066cc;
    text-decoration: underline;
    cursor: pointer;
    display: inline-block;
    padding: 10px;
    transition: color 0.3s ease;
}

.popup-trigger:hover {
    color: #0052a3;
}

/* オーバーレイ */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

/* ポップアップ本体 */
.popup-content {
    position: fixed;
    top: 57%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: none;
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s ease;
}

/* 閉じるボタン */
.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background-color: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.popup-close:hover {
    background-color: #e0e0e0;
}

.popup-close::before,
.popup-close::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background-color: #333;
    transform: rotate(45deg);
}

.popup-close::after {
    transform: rotate(-45deg);
}

/* ポップアップのヘッダー */
.popup-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.popup-header h2 {
    color: #333;
    font-size: 1.5rem;
}

/* スクロール可能なコンテンツエリア */
.popup-body {
    max-height: calc(80vh - 150px);
    overflow-y: auto;
    padding-right: 10px;
}

/* スクロールバーのカスタマイズ */
.popup-body::-webkit-scrollbar {
    width: 8px;
}

.popup-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.popup-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.popup-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ポップアップが開いた時の表示 */
#popup-toggle:checked ~ .popup-overlay {
    display: block;
}

#popup-toggle:checked ~ .popup-content {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .popup-content {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
    }

    .popup-header h2 {
        font-size: 1.2rem;
    }

    .popup-body {
        max-height: calc(90vh - 120px);
    }
}

/* サンプル用のメインコンテンツ */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-content h1 {
    color: #333;
    margin-bottom: 20px;
}

.main-content p {
    color: #666;
    margin-bottom: 15px;
}
