/* Platform generate buttons */
.generate-platform-options { margin-top: 16px }
.gen-platform-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px }
.btn-gen-platform {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 16px; border-radius: 14px; cursor: pointer; border: 2px solid var(--line);
  background: var(--panel); transition: border-color .2s, transform .1s;
}
.btn-gen-platform:hover { transform: translateY(-2px) }
.gen-plat-icon { font-size: 28px; font-weight: 800 }
.gen-plat-name { font-size: 14px; font-weight: 700 }
.btn-gen-fb { color: #1877f2 } .btn-gen-fb:hover { border-color: #1877f2 }
.btn-gen-fb .gen-plat-icon { color: #1877f2 }
.btn-gen-ig { color: #e1306c } .btn-gen-ig:hover { border-color: #e1306c }
.btn-gen-ig .gen-plat-icon { color: #e1306c }
.btn-gen-both { color: var(--accent) } .btn-gen-both:hover { border-color: var(--accent) }
.btn-gen-both .gen-plat-icon { color: var(--accent) }

/* Platform badges on ad cards */
.ad-platform-fb { border-left: 4px solid #1877f2 }
.ad-platform-ig { border-left: 4px solid #e1306c }
.platform-section { margin-bottom: 20px }
.platform-header { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px }
.platform-header-fb { color: #1877f2 }
.platform-header-ig { color: #e1306c }

@media (max-width: 500px) { .gen-platform-grid { grid-template-columns: 1fr } }

/* Instagram Feed Preview */
.ig-topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font-size: 16px; color: #fff }
.ig-logo { font-family: Georgia, serif; font-size: 20px; font-weight: 700; font-style: italic }
.ig-feed-post { background: var(--panel) }
.ig-post-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px }
.ig-post-image { width: 100%; aspect-ratio: 1; background: var(--bg); overflow: hidden }
.ig-post-image img { width: 100%; height: 100%; object-fit: cover }
.ig-post-actions { display: flex; justify-content: space-between; padding: 10px 14px; font-size: 22px }
.ig-post-likes { padding: 0 14px 4px; font-size: 13px; font-weight: 700 }
.ig-post-caption { padding: 0 14px 14px; font-size: 13px; line-height: 1.5 }

/* Instagram Stories Preview */
.ig-story-screen { position: relative; background: #000; display: flex; flex-direction: column; min-height: 500px }
.ig-story-progress { padding: 8px 8px 0; display: flex; gap: 4px }
.ig-story-bar { flex: 1; height: 3px; background: rgba(255,255,255,.8); border-radius: 2px }
.ig-story-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px }
.ig-story-image { flex: 1; overflow: hidden; display: flex; align-items: center; justify-content: center }
.ig-story-image img { width: 100%; height: 100%; object-fit: cover }
.ig-story-cta { padding: 14px; text-align: center }
.ig-story-cta-btn { background: rgba(255,255,255,.95); color: #000; padding: 10px 24px; border-radius: 20px; font-size: 14px; font-weight: 700; display: inline-block }

/* Instagram Reels Preview */
.ig-reel-screen { position: relative; background: #000; display: flex; flex-direction: column; min-height: 500px }
.ig-reel-image { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden }
.ig-reel-image img { width: 100%; height: 100%; object-fit: cover }
.ig-reel-sidebar { position: absolute; right: 10px; bottom: 120px; display: flex; flex-direction: column; gap: 16px; align-items: center; z-index: 2 }
.ig-reel-action { text-align: center; color: #fff; font-size: 22px; text-shadow: 0 1px 4px rgba(0,0,0,.5) }
.ig-reel-action span { display: block; font-size: 11px; margin-top: 2px }
.ig-reel-bottom { position: absolute; bottom: 0; left: 0; right: 60px; padding: 14px; z-index: 2 }
.ig-reel-user { color: #fff; font-size: 13px; margin-bottom: 4px; text-shadow: 0 1px 4px rgba(0,0,0,.5) }
.ig-reel-caption { color: rgba(255,255,255,.9); font-size: 13px; line-height: 1.4; margin-bottom: 8px; text-shadow: 0 1px 4px rgba(0,0,0,.5) }
.ig-reel-cta-btn { background: var(--accent); color: #fff; padding: 8px 20px; border-radius: 8px; font-size: 13px; font-weight: 700; display: inline-block }

/* "How many ads?" modal (Create tab, after picking a platform) */
.adcount-overlay { position: fixed; inset: 0; z-index: 9995; background: rgba(8,12,20,.6); display: flex; align-items: center; justify-content: center; padding: 20px }
.adcount-modal { width: 420px; max-width: calc(100vw - 32px); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.55); padding: 26px; text-align: center }
.adcount-modal h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px }
.adcount-sub { font-size: 17px; color: var(--muted); margin-bottom: 18px }
.adcount-btns { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px }
.adcount-num { width: 54px; height: 54px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 20px; font-weight: 800; cursor: pointer }
.adcount-num:hover { border-color: var(--accent); color: var(--accent) }
.adcount-num.sel { border-color: var(--accent); background: rgba(91,163,245,.16); color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset }
.adcount-total { font-size: 17px; color: var(--text); min-height: 22px; margin-bottom: 18px }
.adcount-total b { color: var(--accent) }
.adcount-actions { display: flex; gap: 10px; justify-content: center }

/* Bigger, easier-to-read variant used by the "Save all ads?" confirmation */
.saveall-modal { width: 560px; padding: 38px 40px }
.saveall-modal h3 { font-size: 28px; margin-bottom: 14px }
.saveall-modal .adcount-sub { font-size: 17px; line-height: 1.65; color: var(--text); margin-bottom: 26px }
.saveall-modal .adcount-sub b { color: var(--accent) }
.saveall-modal .adcount-actions { gap: 14px }
.saveall-modal .adcount-actions button { font-size: 16px; font-weight: 700; padding: 14px 26px; border-radius: 11px }
@media (max-width: 600px) { .saveall-modal { padding: 28px 22px } .saveall-modal h3 { font-size: 23px } .saveall-modal .adcount-sub { font-size: 15.5px } }
