@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

.doom-captcha-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    margin: 20px 0;
}

/* Trigger Button */
.doom-verify-btn {
    background: #000;
    color: #fff;
    border: 2px solid #333;
    padding: 12px 20px;
    font-size: 10px;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    border-radius: 0; /* Square corners for retro look */
    transition: all 0.2s;
    text-transform: uppercase;
    box-shadow: 4px 4px 0 #444;
}

.doom-verify-btn:hover {
    background: #333;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #444;
}

.doom-verify-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Modal Overlay */
.doom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    backdrop-filter: blur(2px);
}

/* Modal Content / Card */
.doom-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px; /* Demo size */
    overflow: hidden;
    position: relative;
    animation: doomPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

@keyframes doomPopIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Header */
.doom-card-header {
    background: #4285f4; /* Google Blue-ish */
    color: white;
    padding: 16px;
}

.doom-card-header h2 {
    margin: 0;
    font-size: 10px; /* Smaller for pixel font */
    font-family: 'Press Start 2P', cursive;
    font-weight: normal;
    line-height: 1.6;
    text-transform: uppercase;
}

.doom-card-header h2 strong {
    font-size: 14px;
    font-weight: 700;
    display: block;
    margin-top: 8px;
    color: #ffd700; /* Gold color for emphasis */
}

/* Game Wrapper */
.doom-game-wrapper {
    position: relative;
    width: 100%;
    /* Default height for desktop */
    height: 250px; 
    background: #000;
    flex-shrink: 0; /* Prevent shrinking */
}

.doom-canvas {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
    cursor: none;
    image-rendering: pixelated;
}

.doom-status-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-family: monospace;
    font-size: 14px;
    pointer-events: none;
    text-align: center;
    width: 100%;
}

/* Footer */
.doom-card-footer {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f1f1;
    border-top: 1px solid #ddd;
}

.doom-refresh-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doom-refresh-btn:hover {
    background: rgba(0,0,0,0.1);
    color: #000;
}

.doom-footer-status {
    font-size: 8px;
    color: #666;
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
}

.doom-kill-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: bold;
    font-family: 'Press Start 2P', cursive;
    color: #333;
}

/* Close Button (Absolute) */
.doom-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.2);
    border: none;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.doom-modal-close:hover {
    background: rgba(0,0,0,0.5);
}

/* Reveal Content */
.doom-content-reveal {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    border-radius: 4px;
    display: none; /* Hidden by default */
}

/* Game Over Overlay */
.doom-gameover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(139, 0, 0, 0.95); /* Dark Red transparent, slightly more opaque */
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Increased Z-Index to be sure */
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.doom-gameover-overlay h3 {
    font-size: 18px;
    margin: 0 0 20px 0;
    text-shadow: 4px 4px 0 #000;
    font-weight: normal;
    font-family: 'Press Start 2P', cursive;
    color: #ff3333;
    line-height: 1.5;
}

.doom-gameover-overlay p {
    font-size: 10px;
    margin: 0 0 30px 0;
    font-family: 'Press Start 2P', cursive;
    color: #fff;
    line-height: 1.5;
}

.doom-restart-btn {
    background: #000;
    color: #fff;
    border: 2px solid #fff;
    padding: 15px 20px;
    font-size: 10px;
    font-weight: normal;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
    border-radius: 0;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
    transition: transform 0.1s;
    text-transform: uppercase;
}

.doom-restart-btn:hover {
    transform: scale(1.05);
    background: #333;
}

/* Instructions */
.doom-instructions {
    padding: 12px 16px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #555;
}
.doom-instructions h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    text-transform: uppercase;
    color: #888;
    font-weight: bold;
}
.doom-controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
}
.doom-controls-grid div {
    display: flex;
    justify-content: space-between;
}
.doom-controls-grid b {
    color: #333;
}

/* --- Mobile Controls --- */
.doom-mobile-controls {
    display: none; /* Default hidden */
    background: #222;
    padding: 10px;
    user-select: none;
    touch-action: none;
}

.doom-dpad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.dpad-middle {
    display: flex;
    gap: 35px; /* Space between Left and Right */
}

.dpad-btn, .action-btn {
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.dpad-btn:active, .action-btn:active {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0.95);
}

.doom-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.action-btn {
    width: 60px;
    height: 60px;
    font-size: 8px; /* Pixel font is wide */
    font-family: 'Press Start 2P', cursive;
    font-weight: normal;
    border-radius: 50%;
}
.btn-fire { background: rgba(255, 60, 60, 0.3); border-color: rgba(255, 60, 60, 0.6); }
.btn-fire:active { background: rgba(255, 60, 60, 0.6); }

.btn-use { background: rgba(60, 255, 60, 0.3); border-color: rgba(60, 255, 60, 0.6); }
.btn-use:active { background: rgba(60, 255, 60, 0.6); }

/* --- Mobile Responsive Tweaks --- */
@media (max-width: 600px) {
    .doom-modal-content {
        max-width: 95%;
        /* Ensure it fits in viewport height but allows scrolling if needed or just fits */
        max-height: 90vh;
    }
    
    .doom-game-wrapper {
        /* On mobile, keep game screen visible but leave room for controls */
        height: 240px;
    }
    
    /* Show mobile controls on small screens */
    .doom-mobile-controls {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 30px 20px 20px 20px; /* Top padding increased for separation */
        background: #222; /* Ensure background is solid */
        border-top: 1px solid #444;
        width: 100%; /* Force full width */
        box-sizing: border-box; /* Include padding in width */
    }

    /* Hide Keyboard Instructions on mobile to save space */
    .doom-instructions {
        display: none; 
    }
    
    /* Ensure modal content expands to fit controls */
    .doom-modal-content {
        height: auto;
        max-height: 90vh; /* Leave some margin */
        overflow-y: auto; /* Allow scrolling if controls overflow */
        display: flex;
        flex-direction: column;
    }

    .doom-game-wrapper {
        flex-shrink: 0; /* Prevent game from shrinking */
    }
}

/* --- Form Fixes --- */
.ig-es-form-input::placeholder {
    /* Corrected selector */
    opacity: 0.7;
}

.es-subscribe-btn:active {
    /* Corrected selector */
    transform: scale(0.98);
}
