<style> /* Reset and Base Styles with High Specificity */ #cpmc-wrapper.cpmc-wrapper, #cpmc-wrapper.cpmc-wrapper *, #cpmc-wrapper.cpmc-wrapper *::before, #cpmc-wrapper.cpmc-wrapper *::after { box-sizing: border-box !important; margin: 0 !important; padding: 0 !important; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important; -webkit-user-select: none !important; -moz-user-select: none !important; -ms-user-select: none !important; user-select: none !important; } #cpmc-wrapper.cpmc-wrapper { max-width: 940px !important; min-height: auto !important; margin: 0 auto !important; padding: 24px !important; background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%) !important; border-radius: 16px !important; box-shadow: 0 4px 24px rgba(65, 80, 246, 0.08) !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-title { font-size: 28px !important; font-weight: 700 !important; color: #1a1f36 !important; text-align: center !important; margin-bottom: 24px !important; letter-spacing: -0.5px !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-title .cpmc-title-highlight { color: #4150F6 !important; } /* Tab Navigation */ #cpmc-wrapper.cpmc-wrapper .cpmc-tabs { display: flex !important; gap: 12px !important; margin-bottom: 24px !important; flex-wrap: wrap !important; justify-content: center !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-tab { flex: 1 !important; min-width: 140px !important; max-width: 280px !important; padding: 14px 20px !important; border: 2px solid #e2e6f3 !important; border-radius: 12px !important; background: #ffffff !important; cursor: pointer !important; transition: all 0.25s ease !important; display: flex !important; align-items: center !important; justify-content: center !important; gap: 10px !important; font-size: 15px !important; font-weight: 500 !important; color: #5a6178 !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-tab:hover { border-color: #4150F6 !important; background: #f8f9ff !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-tab.cpmc-tab-active { border-color: #4150F6 !important; background: linear-gradient(135deg, #4150F6 0%, #5a68f7 100%) !important; color: #ffffff !important; box-shadow: 0 4px 16px rgba(65, 80, 246, 0.25) !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-tab-radio { width: 18px !important; height: 18px !important; border: 2px solid #c8cdd9 !important; border-radius: 50% !important; display: flex !important; align-items: center !important; justify-content: center !important; transition: all 0.25s ease !important; flex-shrink: 0 !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-tab.cpmc-tab-active .cpmc-tab-radio { border-color: #ffffff !important; background: #ffffff !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-tab.cpmc-tab-active .cpmc-tab-radio::after { content: '' !important; width: 8px !important; height: 8px !important; background: #4150F6 !important; border-radius: 50% !important; } /* Main Content Layout */ #cpmc-wrapper.cpmc-wrapper .cpmc-content { display: flex !important; gap: 24px !important; flex-wrap: wrap !important; } /* Form Section */ #cpmc-wrapper.cpmc-wrapper .cpmc-form-section { flex: 1 !important; min-width: 280px !important; background: #ffffff !important; border-radius: 14px !important; padding: 24px !important; border: 1px solid #e8ebf4 !important; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-section-title { font-size: 18px !important; font-weight: 600 !important; color: #1a1f36 !important; margin-bottom: 20px !important; padding-bottom: 12px !important; border-bottom: 2px solid #f0f2f8 !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-form-group { margin-bottom: 18px !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-label { display: block !important; font-size: 15px !important; font-weight: 600 !important; color: #3d4463 !important; margin-bottom: 8px !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-input-wrapper { position: relative !important; display: flex !important; align-items: center !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-input-prefix { position: absolute !important; left: 14px !important; font-size: 15px !important; color: #8b91a7 !important; font-weight: 500 !important; z-index: 1 !important; pointer-events: none !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-input { width: 100% !important; padding: 14px 16px 14px 32px !important; font-size: 15px !important; border: 2px solid #e2e6f3 !important; border-radius: 10px !important; background: #fafbfd !important; color: #1a1f36 !important; transition: all 0.25s ease !important; outline: none !important; -webkit-user-select: text !important; -moz-user-select: text !important; -ms-user-select: text !important; user-select: text !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-input:focus { border-color: #4150F6 !important; background: #ffffff !important; box-shadow: 0 0 0 4px rgba(65, 80, 246, 0.1) !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-input::placeholder { color: #a8aec4 !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-input.cpmc-input-readonly { background: linear-gradient(135deg, #f0f2f8 0%, #e8ebf4 100%) !important; color: #5a6178 !important; cursor: not-allowed !important; border-color: #e2e6f3 !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-btn-reset { width: 100% !important; padding: 14px 24px !important; font-size: 15px !important; font-weight: 600 !important; background: #f5f6fa !important; color: #5a6178 !important; border: 2px solid #e2e6f3 !important; border-radius: 10px !important; cursor: pointer !important; transition: all 0.25s ease !important; margin-top: 8px !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-btn-reset:hover { background: #eef0f7 !important; border-color: #d0d5e4 !important; color: #3d4463 !important; } /* Result Section */ #cpmc-wrapper.cpmc-wrapper .cpmc-result-section { flex: 0 0 280px !important; background: #ffffff !important; border-radius: 14px !important; padding: 24px !important; border: 1px solid #e8ebf4 !important; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important; display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; text-align: center !important; min-height: 200px !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-result-label { font-size: 13px !important; font-weight: 700 !important; color: #4150F6 !important; text-transform: uppercase !important; letter-spacing: 1.5px !important; margin-bottom: 12px !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-result-value { font-size: 48px !important; font-weight: 800 !important; color: #4150F6 !important; line-height: 1 !important; margin-bottom: 16px !important; background: linear-gradient(135deg, #4150F6 0%, #6b78f8 100%) !important; -webkit-background-clip: text !important; -webkit-text-fill-color: transparent !important; background-clip: text !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-result-subtitle { font-size: 15px !important; color: #8b91a7 !important; font-weight: 500 !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-result-subtitle .cpmc-highlight { color: #4150F6 !important; font-weight: 600 !important; } /* Responsive Design */ @media screen and (max-width: 768px) { #cpmc-wrapper.cpmc-wrapper { padding: 20px !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-title { font-size: 24px !important; margin-bottom: 20px !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-tabs { flex-direction: column !important; gap: 10px !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-tab { max-width: 100% !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-content { flex-direction: column !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-result-section { flex: 1 !important; min-height: 160px !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-result-value { font-size: 40px !important; } } @media screen and (max-width: 480px) { #cpmc-wrapper.cpmc-wrapper { padding: 16px !important; border-radius: 12px !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-title { font-size: 22px !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-form-section, #cpmc-wrapper.cpmc-wrapper .cpmc-result-section { padding: 18px !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-tab { padding: 12px 16px !important; font-size: 15px !important; } #cpmc-wrapper.cpmc-wrapper .cpmc-result-value { font-size: 36px !important; } } </style> <h1> CPM Calculator </h1> Calculate CPM Calculate Cost Calculate Impressions Campaign Details <label>Total Cost ($)</label> $ <input type="number" id="cpmc-cost" placeholder="e.g. 500" oninput="cpmcCalculate()" min="0" step="0.01"> <label>CPM Rate ($)</label> $ <input type="number" id="cpmc-rate" placeholder="Calculated Result" readonly> <label>Impressions (Count)</label> # <input type="number" id="cpmc-impressions" placeholder="e.g. 50000" oninput="cpmcCalculate()" min="0" step="1"> <button onclick="cpmcReset()">Reset Values</button> CPM (COST PER 1,000) $0 Cost per single impression: $0.0000