/* オーバーレイ広告スタイル */
.overlay-ad {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: overlayFadeIn 0.3s ease-out;
}

.overlay-ad-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.overlay-ad-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #f8f9fa;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
}

.overlay-ad-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
    padding: 5px;
}

.overlay-ad-close:hover {
    color: #333;
}

.overlay-ad-title {
    font-size: 28px;
    font-weight: bold;
    color: #212529;
    margin: 0 0 15px 0;
    text-align: center;
}

/* サブタイトルラッパー */
.overlay-ad-subtitle-wrapper {
    text-align: center;
    margin-bottom: 30px;
}

/* サブタイトル1行目 */
.overlay-ad-subtitle1,
.overlay-ad-subtitle2 {
    font-size: 16px;
    line-height: 1.6;
    color: #6c757d;
    margin: 0;
}

.overlay-ad-subtitle1 {
    margin-bottom: 5px;
}

.overlay-ad-image {
    margin-bottom: 30px;
    text-align: center;
}

.overlay-ad-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
}

.overlay-ad-cta {
    display: inline-block;
    background: #4169E1;
    color: #ffffff;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
}

.overlay-ad-cta:hover {
    background: #3157d1;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(65, 105, 225, 0.3);
    color: #ffffff;
    text-decoration: none;
}

.overlay-ad-cta-arrow {
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.overlay-ad-cta:hover .overlay-ad-cta-arrow {
    transform: translateX(5px);
}

/* アニメーション */
@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* モバイル対応 */
@media (max-width: 768px) {
    .overlay-ad-content {
        padding: 30px 20px;
        width: 95%;
    }
    
    .overlay-ad-title {
        font-size: 22px;
    }
    
    .overlay-ad-subtitle1,
    .overlay-ad-subtitle2 {
        font-size: 14px;
    }
    
    .overlay-ad-image {
        padding: 15px;
    }
    
    .overlay-ad-cta {
        font-size: 16px;
        padding: 12px 30px;
    }
    
    .overlay-ad-close {
        font-size: 24px;
        top: 10px;
        right: 10px;
    }
}

/* スクロールバーのスタイリング（オプション） */
.overlay-ad-content::-webkit-scrollbar {
    width: 8px;
}

.overlay-ad-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.overlay-ad-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.overlay-ad-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ボディのスクロール無効化 */
body.overlay-ad-open {
    overflow: hidden;
}