/* ========================================
   広告スタイル - SubsManager
   ======================================== */

/* 広告コンテナ */
.ad-container {
    background: #f9f9f9;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    transition: all 0.3s;
}

.ad-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* プレースホルダー広告（アップグレード誘導） */
.ad-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
    border: none;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.ad-placeholder-content {
    max-width: 500px;
    margin: 0 auto;
}

.ad-placeholder-content p {
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.6;
}

.ad-placeholder-content p:first-child {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.btn-upgrade-ad {
    background: white;
    color: #667eea;
    padding: 14px 35px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.btn-upgrade-ad:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.4);
}

/* 上部バナー広告 */
.ad-top {
    max-width: 728px;
    margin: 20px auto;
}

/* サイドバー広告 */
.ad-sidebar {
    position: sticky;
    top: 80px;
    width: 100%;
    max-width: 300px;
}

/* 広告エリアをBasic/Premiumプランでは非表示 */
[data-plan="basic"] .ad-container,
[data-plan="premium"] .ad-container {
    display: none !important;
}

/* Google AdSense スタイル */
.adsbygoogle {
    display: block;
    min-height: 250px;
    background: #f5f5f5;
    margin: 10px 0;
}

/* AdSense広告が読み込まれた後は背景を透明に */
.adsbygoogle[data-ad-status="filled"] {
    background: transparent;
}

/* 広告読み込み中のプレースホルダー */
.ad-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    background: #f5f5f5;
    border-radius: 8px;
}

.ad-loading::after {
    content: '広告を読み込み中...';
    color: #999;
    font-size: 14px;
}

/* レスポンシブデザイン */
@media (max-width: 1200px) {
    .ad-sidebar {
        position: static;
        max-width: 100%;
        margin: 20px 0;
    }
}

@media (max-width: 768px) {
    .ad-top {
        max-width: 100%;
    }
    
    .ad-placeholder {
        padding: 20px 15px;
    }
    
    .ad-placeholder-content p:first-child {
        font-size: 18px;
    }
    
    .ad-placeholder-content p {
        font-size: 14px;
    }
    
    .btn-upgrade-ad {
        padding: 12px 25px;
        font-size: 14px;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ad-container {
    animation: fadeIn 0.5s ease-out;
}

/* Freeプラン限定バッジ */
.free-plan-badge {
    display: inline-block;
    background: #ffc107;
    color: #333;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 10px;
    text-transform: uppercase;
}

/* 広告ブロッカー通知 */
.ad-blocker-notice {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 5px 20px rgba(238, 90, 111, 0.3);
    animation: fadeIn 0.5s ease-out;
}

.ad-blocker-notice .notice-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.ad-blocker-notice .notice-content i {
    font-size: 24px;
}

.ad-blocker-notice .notice-content p {
    flex: 1;
    margin: 0;
    line-height: 1.6;
}

.ad-blocker-notice .btn-primary {
    background: white;
    color: #ee5a6f;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.ad-blocker-notice .btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .ad-blocker-notice .notice-content {
        flex-direction: column;
        text-align: center;
    }
}
