/* =========================================================================
   Evil Ad Styles (Dark Patterns Parody - White Base)
   ========================================================================= */

/* 白基調のまとめサイト風上書き設定 */
body.ad-page {
    background: #f9f9f9 !important;
    background-image: none !important;
    color: #333 !important;
    font-family: 'Meiryo', sans-serif !important;
}

body.ad-page header, body.ad-page footer {
    background: #fff !important;
    border-color: #ddd !important;
    color: #333 !important;
}

body.ad-page header a {
    color: #0066cc !important;
    text-shadow: none !important;
}

body.ad-page .hero {
    display: none; /* ヒーローセクションは非表示にする（コタツ記事感を出すため） */
}

/* 広告コンテナの共通スタイル */
.evil-ad {
    background: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    margin: 15px 0;
    position: relative;
    font-family: 'Meiryo', sans-serif;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 画面を覆い尽くす広告群 */
.ad-wall {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.ad-badge {
    position: absolute;
    top: -10px;
    left: 10px;
    background: #555;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 5px;
    border: 1px solid #777;
}

.ad-content h4 {
    margin: 0 0 10px;
    color: #ffcc00;
}

.fake-ad-btn {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* インフィード広告 */
.infeed-ad {
    border: 2px solid #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
    background: #fffdfd;
}

/* ピン抜きゲーム風広告 */
.pin-game-ad {
    text-align: center;
    background: #fff;
}

.fake-game-img {
    background: #eee;
    border: 2px dashed #999;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.fake-game-img span {
    font-size: 2rem;
    letter-spacing: 10px;
}

.pin {
    position: absolute;
    width: 5px;
    height: 100px;
    background: #fff;
    top: -20px;
    left: 50%;
    transform: rotate(45deg);
    border-radius: 2px;
}

.pin::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ffaa00;
    border-radius: 50%;
    top: -10px;
    left: -7px;
}

/* 上部追従広告 */
#sticky-ad-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 2px solid #ccc;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 9999; /* 他の要素より上に */
    padding: 10px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

#sticky-ad-top img {
    max-height: 80px;
    width: auto;
}

/* 下部追従広告 */
#sticky-ad-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-top: 2px solid #ccc;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    padding: 10px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.sticky-ad .fake-ad-btn {
    margin-top: 0;
    width: auto;
    padding: 5px 15px;
    background: #ff003c;
}

/* フェイクポップアップ広告 */
.popup-ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    display: none; /* JSで表示する */
}

.popup-ad-content {
    background: #fff;
    color: #000;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    max-width: 90%; /* 画面を覆い尽くすように大きく */
    width: 600px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.popup-ad-content h3 {
    color: #ff0000;
    margin-top: 0;
}

.big-btn {
    font-size: 1.2rem;
    padding: 15px;
    background: #28a745;
}

/* --- 極悪な「閉じる」ボタンたち --- */
.fake-close-btn {
    position: absolute;
    cursor: pointer;
    color: #999;
}

/* 異常に小さい「x」 */
.tiny-close {
    top: 5px;
    right: 5px;
    font-size: 8px;
    color: #ccc;
}

/* 絶妙に押しづらいダミーの「×」 */
.fake-close-2 {
    top: -15px;
    right: -15px;
    background: #333;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    /* 押すとペナルティ発動 */
}

/* 本物の「閉じる」ボタン（同化して見えない） */
.real-close-btn {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 0.6rem;
    color: #e0e0e0;
    cursor: pointer;
    text-decoration: underline;
}

/* --- 追加のEvil要素 --- */

/* 左右の縦長エロゲ風広告 */
.evil-side-ad {
    position: fixed;
    top: 100px;
    width: 150px;
    height: 600px;
    background: #fff url('../img/anime_rpg_ad.png') center/cover no-repeat;
    border: 3px solid #ff0066;
    z-index: 900;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    text-align: center;
    padding: 10px;
}

.real-link {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.evil-side-ad.left-ad { left: 0; }
.evil-side-ad.right-ad { right: 0; }

.side-ad-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 100%;
}

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    margin: 0 auto;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.side-btn {
    font-size: 0.9rem;
    padding: 10px 5px;
    background: #ff0066;
    animation: pulse 1s infinite;
}

/* 上からゆっくり降りてくる半透明広告 */
#slow-descend-ad {
    position: fixed;
    top: -100vh; /* 初期位置は画面外 */
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: top 15s linear; /* 15秒かけてゆっくり降りる */
}

#slow-descend-ad.descending {
    top: 0;
}

.descend-content {
    background: #fff;
    border: 5px solid #cc00ff;
    padding: 40px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 50px rgba(204, 0, 255, 0.5);
}

/* 巨大ポップアップ */
.giant-content {
    width: 95vw;
    height: 95vh;
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 10px solid #ff0066;
    background: #fff;
    box-shadow: inset 0 0 50px rgba(255,0,102,0.3);
}

.giant-btn {
    font-size: 3rem;
    padding: 20px 50px;
    margin-top: 50px;
    animation: pulse 0.5s infinite;
}

/* バツの当たり判定が異常に小さい（ダミー） */
.tiny-hitbox {
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 40px;
    color: #999;
    /* 見た目は大きいが、実際のクリック可能領域をクリップ等で極小化...は面倒なので、透明なダミーを上に被せるか、要素自体を小さくする */
    font-size: 50px;
    line-height: 50px;
    /* この要素はダミーとして機能し、本物の閉じるボタンは存在しない（ペナルティ直行） */
    pointer-events: auto;
}

/* 巨大ポップアップの本物の閉じるボタン（小さいが押せる） */
.giant-real-close {
    position: absolute;
    top: 65px;
    right: 25px;
    font-size: 14px;
    color: #ddd;
    background: transparent;
    border: none;
    padding: 5px;
    z-index: 100;
    cursor: pointer;
}

/* 透明トラップ */
.transparent-trap {
    background: rgba(0,0,0,0.01); /* ほぼ透明 */
}

.trap-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 1; /* コンテンツの下敷きだが全画面 */
    cursor: default;
}

.small-content {
    width: 300px;
    height: 200px;
    position: relative;
    z-index: 10;
}

.trap-close {
    position: fixed;
    top: 5px;
    left: 5px;
    font-size: 10px;
    color: #eee;
    z-index: 20;
    text-decoration: none;
}

/* --- ペナルティ画面（ジョーク） --- */
#penalty-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #ff0000;
    color: #fff;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
}

#penalty-screen h1 {
    font-size: 5rem;
    margin: 0;
    text-shadow: 4px 4px 0 #000;
    animation: flash-text 0.1s infinite;
}

#penalty-screen h2 {
    font-size: 2rem;
    background: #000;
    padding: 10px 20px;
}

#penalty-screen p {
    font-size: 1.2rem;
    margin-bottom: 40px;
}

#reboot-btn {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}

#reboot-btn:hover {
    background: #fff;
    color: #ff0000;
}

@keyframes flash-text {
    0% { opacity: 1; }
    50% { opacity: 0.8; transform: translate(2px, 2px); }
    100% { opacity: 1; transform: translate(-2px, -2px); }
}

.hidden {
    display: none !important;
}
