* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Press Start 2P', 'Orbitron', 'Courier New', monospace;
    background: linear-gradient(135deg, #0c0c1e 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    /* iOS Safe Area 対応 - サイドのみ */
    padding: 0 max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    /* スマホでのスワイプ制御強化 */
    touch-action: pan-y pinch-zoom;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.game-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 100%;
    transform-origin: center center;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1; /* 背景より手前に表示 */
    /* iOS Safe Area 対応 - 上部マージン */
    margin-top: env(safe-area-inset-top);
}

.game-footer {
    text-align: center;
    margin-top: 10px;
}

.sound-toggle-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffffff;
    color: #ffffff;
    font-size: 0.8rem;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: block;
    width: 100%;
    text-align: center;
}

.sound-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.sound-toggle-btn:active {
    transform: scale(0.95);
}

.sound-toggle-btn.muted {
    color: #ff6666;
    border-color: #ff6666;
}

/* デスクトップ小ウィンドウ対応 */
@media (max-width: 500px) {
    .game-layout {
        transform: scale(0.9);
        transform-origin: top center;
    }

    .start-screen, .game-over, .congratulations-screen, .name-entry-screen, .ranking-screen, .loading-screen {
        max-width: 90%;
        width: 90%;
        padding: 20px;
    }

    #gameCanvas {
        max-width: 100%;
    }
}

@media (max-width: 420px) {
    .game-layout {
        transform: scale(0.85);
    }
}

@media (max-width: 768px) {
    .sound-toggle-btn {
        display: block;
    }
}

.game-container {
    text-align: center;
    border: 2px solid #ffffff;
    border-radius: 10px;
    padding: 8px;
    /* iOS Safe Area 対応 - 上部に十分な余白を確保 */
    padding-top: max(20px, calc(env(safe-area-inset-top) + 10px));
    /* 背景色を透明に変更（WebGL背景を見せるため） */
    /* background: rgba(0, 0, 0, 0.8); */
    background: transparent;
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    max-width: 100%;
    width: fit-content;
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* スマホでのタッチ操作制御 */
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    position: relative; /* Canvasの絶対配置のために必要 */
}

#bgCanvas {
    /* フルスクリーン背景キャンバス */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* 背景として配置 */
    display: block;
    pointer-events: none;
}

#gameCanvas {
    position: relative;
    z-index: 1;
    background-color: transparent; /* 背景色を透明にしてbgCanvasを見せる */
    border: 1px solid #333;
    border-radius: 4px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    /* スマホでのタッチ操作制御 */
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: crosshair;
}

.game-footer {
    text-align: center;
    max-width: 450px;
}

h1 {
    font-size: 1.6rem;
    text-shadow: 0 0 10px #ffffff;
    margin: 0;
    letter-spacing: 2px;
}

.top-stats {
    display: flex;
    justify-content: center;
    font-size: 0.8rem;
    gap: 5px;
    width: 100%;
    position: relative;
    z-index: 10; /* WebGLキャンバスより上に表示 */
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8); /* 視認性向上 */
}

.bottom-stats {
    display: flex;
    justify-content: center;
    font-size: 1rem;
    width: 100%;
}

.score, .base-damage {
    padding: 5px 10px;
}

.base-damage {
    color: #ff6666;
}


#gameCanvas {
    /* background: radial-gradient(ellipse at center, #000011 0%, #000000 100%); */
    background: transparent;
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    touch-action: none; /* タッチジェスチャーを無効化 */
    -webkit-user-select: none;
    user-select: none; /* テキスト選択を無効化 */
    -webkit-touch-callout: none; /* 長押しメニューを無効化 */
    -webkit-tap-highlight-color: transparent; /* タップハイライトを無効化 */
    /* スマホでのドラッグ・スクロール防止 */
    -webkit-overflow-scrolling: auto;
    overscroll-behavior: none;
    /* タッチ遅延の除去 */
    -ms-touch-action: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.controls {
    font-size: 0.8rem;
    color: #66ff66;
    line-height: 1.3;
    margin: 0;
}

.start-screen, .game-over {
    position: fixed; /* viewport全体を基準に配置 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.60);
    padding: 40px;
    border: 2px solid #ffffff;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    width: 393px;
    max-width: 393px;
    z-index: 100; /* キャンバスより手前に表示 */
}

.congratulations-screen {
    position: fixed; /* viewport全体を基準に配置 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(0, 100, 255, 0.8) 0%, rgba(0, 200, 100, 0.8) 100%);
    padding: 40px;
    border: 3px solid #ffd700;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
    width: 90%;
    max-width: 393px;
    z-index: 100;
}

.congratulations-screen h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: #ffd700;
    text-shadow: 0 0 15px #ffd700, 0 0 30px #ffd700;
    animation: pulse 2s ease-in-out infinite;
}

.congrats-message {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 0 0 10px #ffffff;
}

.congrats-submessage {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: #ffd700;
}

.congrats-animation {
    font-size: 2rem;
    margin: 20px 0;
    animation: bounce 1s ease-in-out infinite;
}

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

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.start-screen h2, .game-over h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ffffff;
}

.start-screen p, .game-over p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.rules {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
}

.rules p {
    margin: 8px 0;
    font-size: 0.9rem;
    color: #66ff66;
    line-height: 1.3;
}

button {
    font-family: 'Press Start 2P', 'Orbitron', 'Courier New', monospace;
    background: #222222;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 12px 20px;
    font-size: 0.8rem;
    font-weight: normal;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 2px 2px 0px #666666;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

button:hover {
    background: #444444;
    color: #ffdd44;
    border-color: #ffdd44;
    box-shadow: 3px 3px 0px #888888;
    transform: translate(-1px, -1px);
}

button:active {
    background: #111111;
    box-shadow: 1px 1px 0px #333333;
    transform: translate(1px, 1px);
}

.hidden {
    display: none;
}

/* モバイル用自動スケーリング */
@media (max-width: 768px) and (orientation: portrait) {
    body {
        padding: 5px;
        justify-content: center; /* 中央配置を維持 */
        min-height: 100vh;
    }
    
    .game-layout {
        gap: 8px;
        width: 100%;
    }
    
    .game-footer h1 {
        font-size: 1.2rem;
        margin-top: 5px;
    }
    
    .game-container {
        padding: 4px;
        gap: 4px;
    }
    
    .top-stats {
        gap: 10px;
        font-size: 0.7rem;
    }
    
    #gameCanvas {
        width: 100% !important;
        height: auto !important;
        max-width: 393px;
    }
    
    .start-screen, .game-over, .congratulations-screen, .name-entry-screen, .ranking-screen, .loading-screen {
        font-size: 0.8rem;
        padding: 15px;
        max-width: 95%;
        width: 95%;
    }

    .start-screen h2, .game-over h2, .congratulations-screen h2, .name-entry-screen h2, .ranking-screen h2, .loading-screen h2 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .rules p {
        font-size: 0.7rem;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    
    button {
        font-size: 0.7rem;
        padding: 8px 12px;
        margin: 4px;
    }
    
    .name-letters {
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .letter {
        font-size: 1.5rem;
        padding: 12px 16px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s ease;
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
    
    .letter:active {
        transform: scale(1.1);
        box-shadow: 0 0 15px rgba(255, 221, 68, 0.7);
    }
    
    .name-controls {
        font-size: 0.6rem;
        margin-top: 10px;
        margin-bottom: 15px;
    }
    
    #nameOkButton {
        font-size: 0.8rem;
        padding: 12px 24px;
        margin-top: 10px;
        background: #006600;
        border-color: #00ff00;
        color: #ffffff;
    }
    
    #nameOkButton:hover, #nameOkButton:active {
        background: #008800;
        border-color: #44ff44;
        color: #ffffff;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 2px;
        justify-content: center;
        min-height: 100vh;
    }
    
    .game-layout {
        gap: 5px;
        transform: scale(0.8);
    }
    
    .game-footer h1 {
        font-size: 1rem;
        margin-top: 2px;
    }
    
    .top-stats {
        font-size: 0.6rem;
        gap: 8px;
    }
    
    #gameCanvas {
        max-height: 70vh;
    }
}

/* 非常に小さな画面用 */
@media (max-height: 800px) {
    .game-layout {
        transform: scale(0.85);
    }
}

@media (max-height: 600px) {
    .game-layout {
        transform: scale(0.75);
    }
    
    body {
        padding: 2px;
    }
}

/* ローディング画面のスタイル */
.loading-screen {
    position: fixed; /* viewport全体を基準に配置 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.90);
    color: #00ff00;
    border: 2px solid #00ff00;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    max-width: 393px;
    width: 90%;
    z-index: 1000;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #003300;
    border-top: 4px solid #00ff00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-detail {
    font-size: 0.9rem;
    color: #00cc00;
    margin: 0;
}

/* ランキング関連のスタイル */
.name-entry-screen, .ranking-screen {
    position: fixed; /* viewport全体を基準に配置 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.70);
    padding: 20px;
    border: 2px solid #ffffff;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    max-width: 380px;
    width: 90%;
    z-index: 100; /* キャンバスより手前に表示 */
}

.name-entry-screen h2, .ranking-screen h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-shadow: 0 0 10px #ffffff;
    color: #ffdd44;
    word-break: break-word;
}

.name-input {
    margin: 20px 0;
}

.name-letters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.letter {
    font-size: 1.8rem;
    font-weight: bold;
    padding: 8px 12px;
    border: 2px solid #666666;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 5px;
    min-width: 45px;
    text-align: center;
}

.letter.active {
    border-color: #ffdd44;
    background: rgba(255, 221, 68, 0.2);
    box-shadow: 0 0 10px rgba(255, 221, 68, 0.5);
    animation: letterBlink 1s infinite;
}

@keyframes letterBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

.name-controls {
    font-size: 0.8rem;
    color: #cccccc;
    line-height: 1.4;
}

.ranking-list {
    margin: 20px 0;
    text-align: left;
}

.ranking-header {
    display: grid;
    grid-template-columns: 60px 100px 1fr;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 2px solid #ffffff;
    font-weight: bold;
    color: #ffdd44;
    text-align: center;
}

.ranking-entry {
    display: grid;
    grid-template-columns: 60px 100px 1fr;
    gap: 20px;
    padding: 8px 0;
    border-bottom: 1px solid #666666;
    text-align: center;
}

.ranking-entry:nth-child(1) { color: #ffdd44; } /* 1位 */
.ranking-entry:nth-child(2) { color: #cccccc; } /* 2位 */
.ranking-entry:nth-child(3) { color: #cd7f32; } /* 3位 */

.ranking-entry.current-score {
    background: rgba(255, 221, 68, 0.2);
    border: 1px solid #ffdd44;
    animation: scoreHighlight 2s infinite;
}

@keyframes scoreHighlight {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.blink {
    animation: blink 1s infinite;
}

/* ========================================
   ドラムロール式ネームエントリー
   ======================================== */

.drum-roll-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 15px 0;
}

.drum-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.drum-column.focused .drum-viewport {
    border-color: #ffdd44;
    box-shadow: 0 0 12px rgba(255, 221, 68, 0.5);
}

.drum-arrow {
    font-family: 'Press Start 2P', monospace;
    background: transparent;
    color: #888;
    border: none;
    font-size: 1rem;
    padding: 4px 8px;
    cursor: pointer;
    box-shadow: none;
    transition: color 0.15s;
    line-height: 1;
}

.drum-arrow:hover {
    color: #ffdd44;
    background: transparent;
    border: none;
    box-shadow: none;
    transform: none;
}

.drum-arrow:active {
    color: #ffffff;
    background: transparent;
    box-shadow: none;
    transform: scale(1.2);
}

.drum-viewport {
    width: 60px;
    height: 120px;
    overflow: hidden;
    border: 2px solid #666;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
    position: relative;
}

/* 中央のハイライトバンド */
.drum-highlight {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    height: 40px;
    border-top: 2px solid #ffdd44;
    border-bottom: 2px solid #ffdd44;
    background: rgba(255, 221, 68, 0.08);
    pointer-events: none;
    z-index: 2;
}

/* 上下グラデーションフェード */
.drum-viewport::before,
.drum-viewport::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 40px;
    pointer-events: none;
    z-index: 3;
}

.drum-viewport::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
}

.drum-viewport::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.drum-reel {
    position: relative;
    will-change: transform;
    /* 初期位置: 最初の文字を中央に配置 (viewport 120px / 2 - letterHeight 40px / 2 = 40px) */
    padding-top: 40px;
}

.drum-letter {
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.2rem;
    color: #666;
    transition: color 0.15s;
}

.drum-letter.active {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 221, 68, 0.7);
}

/* ランキング区切り（Top10外表示用） */
.ranking-separator {
    text-align: center;
    color: #888;
    padding: 6px 0;
    font-size: 0.9rem;
    letter-spacing: 4px;
}

/* モバイル対応 */
@media (max-width: 480px) {
    .drum-roll-container {
        gap: 8px;
    }

    .drum-viewport {
        width: 50px;
        height: 100px;
    }

    .drum-highlight {
        top: 30px;
        height: 40px;
    }

    .drum-viewport::before,
    .drum-viewport::after {
        height: 30px;
    }

    .drum-reel {
        padding-top: 30px;
    }

    .drum-letter {
        width: 50px;
        height: 40px;
        font-size: 1rem;
    }

    .drum-arrow {
        font-size: 0.8rem;
        padding: 2px 6px;
    }
}

/* スマホ対応 */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .game-layout {
        gap: 10px;
    }
    
    .game-container {
        padding: 5px;
        border-radius: 5px;
    }
    
    .game-footer {
        max-width: 350px;
    }
    
    h1 {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
    
    .top-stats, .bottom-stats {
        font-size: 0.8rem;
        gap: 3px;
    }
    
    .score, .base-damage {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    
    .controls {
        font-size: 0.7rem;
    }
}

/* スマートフォン画面幅対応 (393px基準) */
@media (max-width: 393px) {
    .game-layout {
        width: 100vw;
        margin: 0;
        padding: 0;
    }
    
    .game-container {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    
    #gameCanvas {
        width: 100vw;
        height: auto;
        max-width: 100%;
    }
    
    .game-footer {
        margin-top: 5px;
    }
    
    .game-footer h1 {
        font-size: 0.9rem;
    }
}

/* 小さめのスマートフォン対応 */
@media (max-width: 360px) {
    .top-stats {
        font-size: 0.6rem;
        gap: 2px;
    }
    
    .score, .base-damage {
        padding: 2px 6px;
        font-size: 0.65rem;
    }

    .start-screen, .game-over, .name-entry-screen, .ranking-screen {
        padding: 15px;
        width: 350px;
        max-width: 95%;
    }
    
    .start-screen h2, .game-over h2, .name-entry-screen h2, .ranking-screen h2, .loading-screen h2 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    button {
        padding: 10px 16px;
        font-size: 0.7rem;
        box-shadow: 1px 1px 0px #666666;
    }
    
    button:hover {
        box-shadow: 2px 2px 0px #888888;
    }
    
    .rules {
        margin: 15px 0;
        padding: 10px;
    }
    
    .rules p {
        margin: 6px 0;
        font-size: 0.75rem;
    }
    
    .name-letters {
        gap: 10px;
    }
    
    .letter {
        font-size: 1.3rem;
        padding: 10px 14px;
        min-width: 40px;
    }
    
    .name-controls {
        font-size: 0.65rem;
        margin: 8px 0;
    }
    
    #nameOkButton {
        font-size: 0.75rem;
        padding: 10px 20px;
        margin-top: 8px;
    }
}

/* 広告表示用スタイル */
.ad-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.ad-container.hidden {
    display: none;
}

.ad-wrapper {
    max-width: 728px;
    width: 90%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 30px 20px;
    border-radius: 15px;
    border: 3px solid #00ff41;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
    text-align: center;
}

.ad-header h3 {
    font-size: 1.2rem;
    color: #00ff41;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.ad-timer {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 20px;
}

.ad-placeholder {
    min-height: 250px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed #666;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    padding: 20px;
}

.ad-placeholder p {
    font-size: 1rem;
    color: #888;
}

.skip-ad-btn {
    margin-top: 20px;
    padding: 15px 30px;
    font-size: 1rem;
    font-family: 'Press Start 2P', monospace;
    background: #4CAF50;
    color: white;
    border: 3px solid #2e7d32;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 #2e7d32;
}

.skip-ad-btn:hover:not(:disabled) {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #2e7d32;
}

.skip-ad-btn:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #2e7d32;
}

.skip-ad-btn:disabled {
    background: #666;
    border-color: #444;
    box-shadow: 0 4px 0 #444;
    cursor: not-allowed;
    opacity: 0.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* モバイル対応 */
@media (max-width: 480px) {
    .ad-wrapper {
        width: 95%;
        padding: 20px 15px;
    }
    
    .ad-header h3 {
        font-size: 0.9rem;
    }
    
    .ad-timer {
        font-size: 0.75rem;
    }
    
    .ad-placeholder {
        min-height: 200px;
    }
    
    .ad-placeholder p {
        font-size: 0.8rem;
    }
    
    .skip-ad-btn {
        padding: 12px 24px;
        font-size: 0.8rem;
    }
}
