@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --bg:      #000000;
  --bg2:     #0D0D0D;
  --bg3:     #141414;
  --bg4:     #1A1A1A;
  --border:  rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.13);
  --cyan:    #06B6D4;
  --cyan2:   #22D3EE;
  --cyan3:   rgba(6,182,212,0.12);
  --cyan4:   rgba(6,182,212,0.20);
  --text:    #F0F0F0;
  --text2:   #888899;
  --text3:   #444455;
  --green:   #22C55E;
  --amber:   #F59E0B;
  --red:     #EF4444;
  --shadow:  0 1px 4px rgba(0,0,0,0.4);
  --shadow2: 0 8px 32px rgba(0,0,0,0.6);
  --radius:  8px;
  --sw: 240px;
  --hh: 54px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: 'Roboto', sans-serif; font-size: 14px; line-height: 1.5; }
::-webkit-scrollbar { width: 4px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 4px; }
a { color: inherit; text-decoration: none; }
button { font-family: 'Roboto', sans-serif; }
input, select, textarea {
  font-family: 'Roboto', sans-serif; font-size: 14px; width: 100%;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius); color: var(--text);
  padding: 10px 13px; outline: none;
  transition: border-color .15s, box-shadow .15s; resize: vertical;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan3);
}
select option { background: var(--bg3); }
label { display: block; font-size: 13px; font-weight: 500; color: var(--text2); margin-bottom: 6px; }

.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar { width: var(--sw); min-width: var(--sw); background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; transition: width .2s; }
.sidebar.collapsed { width: 0; min-width: 0; }
.sb-logo { padding: 18px 16px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.sb-logo-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--cyan); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; color: #000; font-weight: 800; }
.sb-logo-text { font-size: 15px; font-weight: 700; white-space: nowrap; color: var(--text); }
.sb-logo-text span { color: var(--cyan); }
.sb-section { padding: 16px 16px 5px; font-size: 10px; font-weight: 600; letter-spacing: .08em; color: var(--text3); text-transform: uppercase; white-space: nowrap; }
.sb-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin: 1px 8px; border-radius: 7px; cursor: pointer; color: var(--text2); font-size: 13px; transition: all .12s; position: relative; user-select: none; white-space: nowrap; }
.sb-item:hover { background: var(--bg3); color: var(--text); }
.sb-item.active { background: var(--cyan3); color: var(--cyan); font-weight: 500; }
.sb-item.active::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 2.5px; height: 55%; background: var(--cyan); border-radius: 0 2px 2px 0; }
.sb-item.disabled { opacity: .3; cursor: not-allowed; pointer-events: none; }
.sb-icon { width: 16px; text-align: center; flex-shrink: 0; font-size: 14px; }
.sb-badge { margin-left: auto; font-size: 10px; padding: 2px 7px; border-radius: 20px; font-weight: 600; flex-shrink: 0; }
.sb-badge.new { background: var(--cyan3); color: var(--cyan); border: 1px solid rgba(6,182,212,0.3); }
.sb-badge.soon { background: var(--bg4); color: var(--text3); }
.sb-credits { margin: 8px; border-radius: 9px; background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); padding: 11px 13px; flex-shrink: 0; }
.sb-credits-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.sb-credits-label { font-size: 12px; font-weight: 500; color: var(--text); }
.sb-credits-count { font-size: 11px; background: rgba(245,158,11,0.15); color: var(--amber); padding: 2px 8px; border-radius: 20px; font-weight: 700; }
.sb-credits-sub { font-size: 11px; color: var(--text3); }
.sb-user { margin-top: auto; padding: 12px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sb-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--cyan); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #000; flex-shrink: 0; }
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-email { font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-logout { color: var(--text3); font-size: 15px; flex-shrink: 0; transition: color .15s; }
.sb-logout:hover { color: var(--red); }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

.header { height: var(--hh); min-height: var(--hh); background: var(--bg2); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 22px; flex-shrink: 0; }
.header-left { display: flex; align-items: center; gap: 14px; }
.header-toggle { background: none; border: none; color: var(--text3); font-size: 18px; cursor: pointer; line-height: 1; transition: color .15s; }
.header-toggle:hover { color: var(--text); }
.header-title { font-size: 15px; font-weight: 500; color: var(--text); }
.header-right { display: flex; align-items: center; gap: 10px; }
.header-counter { display: flex; align-items: center; gap: 8px; background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 5px 14px; font-size: 12px; color: var(--text2); }
.hc-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.hc-num { font-weight: 600; color: var(--cyan); }
.header-icon-btn { background: none; border: 1px solid var(--border); border-radius: 7px; color: var(--text2); cursor: pointer; padding: 6px 12px; font-size: 13px; transition: all .15s; font-family: inherit; }
.header-icon-btn:hover { border-color: var(--cyan); color: var(--cyan); }

.content { flex: 1; overflow-y: auto; padding: 24px 28px; background: var(--bg); }

.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.page-title { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.page-sub { font-size: 13px; color: var(--text2); margin-top: 4px; }
.page-tabs { display: flex; gap: 6px; }

.tab { background: var(--bg3); border: 1px solid var(--border); border-radius: 7px; color: var(--text2); cursor: pointer; padding: 7px 16px; font-size: 13px; transition: all .15s; font-family: inherit; }
.tab:hover { border-color: var(--cyan); color: var(--cyan); }
.tab.active { background: var(--cyan); border-color: var(--cyan); color: #000; font-weight: 600; }

.btn-primary { background: var(--cyan); color: #000; border: none; border-radius: var(--radius); padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: 7px; text-align: center; font-family: inherit; }
.btn-primary:hover { background: var(--cyan2); transform: translateY(-1px); }
.btn-full { width: 100%; justify-content: center; display: flex; }
.btn-sm { font-size: 12px; padding: 6px 13px; border-radius: 7px; border: 1px solid var(--border2); background: var(--bg3); color: var(--text2); cursor: pointer; transition: all .15s; font-family: inherit; display: inline-flex; align-items: center; gap: 5px; }
.btn-sm:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-sm.btn-purple { background: var(--cyan); border-color: var(--cyan); color: #000; font-weight: 600; }
.btn-sm.btn-purple:hover { background: var(--cyan2); }
.btn-danger { border-color: rgba(239,68,68,.3) !important; color: var(--red) !important; }
.btn-danger:hover { background: rgba(239,68,68,.08) !important; }

.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); }

.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.section-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 14px; }

.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 22px; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat-card.highlight { border-color: rgba(6,182,212,0.3); background: var(--cyan3); }
.stat-num { font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.stat-card.highlight .stat-num { color: var(--cyan); }
.stat-label { font-size: 12px; color: var(--text2); margin-top: 4px; }

.quick-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 28px; }
.qa-card { display: flex; align-items: center; gap: 12px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; text-decoration: none; color: var(--text); transition: all .15s; }
.qa-card:hover { border-color: var(--cyan); background: var(--cyan3); }
.qa-icon { font-size: 18px; width: 38px; height: 38px; background: var(--bg3); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--cyan); border: 1px solid var(--border); }
.qa-title { font-weight: 500; font-size: 13px; }
.qa-sub { font-size: 12px; color: var(--text2); margin-top: 2px; }
.qa-arrow { margin-left: auto; color: var(--text3); }

.gallery-grid { columns: 4 180px; gap: 12px; }
.gallery-item { break-inside: avoid; border-radius: 10px; margin-bottom: 12px; padding: 14px; min-height: 110px; display: flex; flex-direction: column; justify-content: flex-end; cursor: pointer; transition: all .2s; position: relative; box-shadow: var(--shadow); }
.gallery-item:hover { transform: translateY(-2px); box-shadow: var(--shadow2); }
.gallery-item.tall { min-height: 190px; }
.gi-tag { position: absolute; top: 10px; left: 10px; font-size: 10px; font-weight: 600; background: rgba(0,0,0,.6); color: #fff; padding: 3px 8px; border-radius: 5px; letter-spacing: .04em; text-transform: uppercase; }
.gi-title { font-size: 12px; color: rgba(255,255,255,.85); font-weight: 500; line-height: 1.4; }
.gallery-item.hidden { display: none; }

.generator-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.gen-panel { padding: 20px; }
.gen-result { min-height: 500px; overflow: hidden; }
.result-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 500px; gap: 12px; color: var(--text3); }
.re-icon { font-size: 44px; opacity: .2; }
.re-sub { font-size: 13px; }
.result-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg3); }
.result-label { font-size: 13px; font-weight: 500; color: var(--cyan); }
.result-actions { display: flex; gap: 8px; }
.result-preview { padding: 18px; overflow-y: auto; max-height: 580px; }
.credits-notice { background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.2); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--amber); margin-bottom: 14px; }
.btn-generate { font-size: 15px; padding: 13px; font-weight: 700; letter-spacing: 0.2px; }

.sections-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.section-check { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; cursor: pointer; border: 1px solid var(--border); transition: all .12s; font-size: 13px; background: var(--bg3); }
.section-check:hover { border-color: rgba(6,182,212,0.4); background: var(--cyan3); }
.section-check input { accent-color: var(--cyan); width: auto; }
.section-check input:checked + span { color: var(--cyan); font-weight: 500; }

.ig-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.ig-panel { padding: 20px; }
.ig-result { min-height: 520px; overflow: hidden; }
.ig-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 520px; gap: 12px; color: var(--text3); text-align: center; }
.ig-empty-icon { width: 70px; height: 70px; background: var(--bg3); border: 1px dashed var(--border2); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 30px; opacity: .4; }
.images-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; padding: 16px; }
.img-card { border-radius: 10px; overflow: hidden; position: relative; aspect-ratio: 1; cursor: pointer; border: 1px solid var(--border); transition: all .2s; }
.img-card:hover { border-color: var(--cyan); box-shadow: var(--shadow2); }
.img-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top,rgba(0,0,0,.85) 0%,transparent 50%); opacity: 0; transition: opacity .2s; display: flex; align-items: flex-end; padding: 12px; }
.img-card:hover .img-card-overlay { opacity: 1; }
.img-card-actions { display: flex; gap: 7px; }
.img-action-btn { background: rgba(255,255,255,.9); border: none; border-radius: 6px; padding: 5px 10px; font-size: 11px; font-weight: 600; cursor: pointer; color: #000; font-family: inherit; transition: all .15s; }
.img-action-btn:hover { background: #fff; }
.generating-overlay { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 520px; gap: 16px; }
.gen-spinner { width: 44px; height: 44px; border: 3px solid var(--bg4); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gen-progress { font-size: 14px; color: var(--text2); }
.gen-progress strong { color: var(--cyan); }

.style-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 8px; }
.style-btn { border: 1px solid var(--border); border-radius: 8px; padding: 8px 6px; text-align: center; cursor: pointer; font-size: 12px; color: var(--text2); background: var(--bg3); transition: all .12s; }
.style-btn:hover { border-color: rgba(6,182,212,0.4); color: var(--cyan); }
.style-btn.selected { border-color: var(--cyan); background: var(--cyan3); color: var(--cyan); font-weight: 500; }
.aspect-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin-top: 8px; }
.aspect-btn { border: 1px solid var(--border); border-radius: 8px; padding: 8px 4px; text-align: center; cursor: pointer; font-size: 12px; color: var(--text2); background: var(--bg3); transition: all .12s; }
.aspect-btn:hover { border-color: rgba(6,182,212,0.4); }
.aspect-btn.selected { border-color: var(--cyan); background: var(--cyan3); color: var(--cyan); font-weight: 500; }
.prompt-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pcat-btn { background: var(--bg4); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px; font-size: 12px; cursor: pointer; font-family: inherit; color: var(--text2); transition: all .12s; }
.pcat-btn:hover, .pcat-btn.active { background: var(--cyan3); border-color: var(--cyan); color: var(--cyan); }
.prompt-suggestions { display: flex; flex-direction: column; gap: 5px; max-height: 130px; overflow-y: auto; }
.prompt-item { font-size: 12px; color: var(--text2); padding: 7px 10px; border-radius: 7px; border: 1px solid var(--border); cursor: pointer; background: var(--bg3); transition: all .12s; line-height: 1.4; }
.prompt-item:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan3); }
.img-upload-zone { height: 130px; border: 2px dashed var(--border2); border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; overflow: hidden; }
.img-upload-zone:hover { border-color: var(--cyan); background: var(--cyan3); }

.loading-pulse { text-align: center; padding: 60px 20px; color: var(--text2); font-size: 14px; animation: blink 1.5s infinite; }
@keyframes blink { 0%,100%{opacity:.4} 50%{opacity:1} }
.error-msg { text-align: center; padding: 40px; color: var(--red); font-size: 13px; }

.landing-output { font-family: 'Roboto', sans-serif; }
.landing-output h1,.landing-output h2,.landing-output h3 { color: var(--text); margin-bottom: .5em; font-weight: 700; }
.landing-output p { color: var(--text2); line-height: 1.7; margin-bottom: .75em; }
.landing-output section { margin-bottom: 20px; padding: 20px; background: var(--bg3); border-radius: 10px; border: 1px solid var(--border); }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 400px; gap: 14px; text-align: center; }
.empty-icon { font-size: 40px; color: var(--cyan); background: var(--cyan3); width: 80px; height: 80px; border-radius: 20px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(6,182,212,0.25); }
.empty-state h3 { font-size: 19px; font-weight: 600; color: var(--text); }
.empty-state p { color: var(--text2); max-width: 340px; font-size: 13px; line-height: 1.6; }

.history-section { margin-top: 28px; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item { display: flex; align-items: center; gap: 12px; background: var(--bg2); border: 1px solid var(--border); border-radius: 9px; padding: 12px 16px; transition: border-color .15s; }
.history-item:hover { border-color: rgba(6,182,212,0.3); }
.hi-type { font-size: 18px; color: var(--cyan); }
.hi-product { font-size: 13px; font-weight: 500; }
.hi-sections { font-size: 12px; color: var(--text2); margin-top: 2px; }
.hi-date { margin-left: auto; font-size: 12px; color: var(--text3); }
.history-full { display: flex; flex-direction: column; gap: 8px; }
.history-item-full { display: flex; align-items: center; gap: 14px; background: var(--bg2); border: 1px solid var(--border); border-radius: 9px; padding: 13px 18px; transition: border-color .15s; }
.history-item-full:hover { border-color: rgba(6,182,212,0.3); }
.hi-type-badge { font-size: 11px; font-weight: 600; color: var(--cyan); background: var(--cyan3); padding: 3px 10px; border-radius: 20px; white-space: nowrap; border: 1px solid rgba(6,182,212,0.2); }

.ads-layout { display: grid; grid-template-columns: 290px 1fr; gap: 16px; }
.ad-types { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.variants-grid { display: flex; flex-direction: column; gap: 12px; }
.variant-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.variant-num { font-size: 11px; font-weight: 600; color: var(--cyan); letter-spacing: .07em; text-transform: uppercase; margin-bottom: 12px; }
.variant-row { display: flex; gap: 10px; margin-bottom: 8px; align-items: flex-start; }
.vr-label { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; min-width: 68px; padding-top: 2px; }
.vr-value { font-size: 13px; color: var(--text); line-height: 1.5; }
.variant-visual { margin-top: 10px; padding: 10px; background: var(--bg3); border-radius: 7px; font-size: 12px; color: var(--text2); border-left: 3px solid var(--cyan); }
.copy-variant { float: right; font-size: 11px; padding: 4px 10px; border-radius: 5px; border: 1px solid var(--border2); background: transparent; color: var(--text2); cursor: pointer; font-family: inherit; }
.copy-variant:hover { background: var(--cyan3); color: var(--cyan); border-color: var(--cyan); }

.products-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 14px; }
.product-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 18px; transition: all .15s; }
.product-card:hover { border-color: rgba(6,182,212,0.3); box-shadow: var(--shadow2); }
.pc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pc-icon { font-size: 20px; color: var(--cyan); }
.pc-actions { display: flex; gap: 6px; }
.pc-name { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.pc-desc { font-size: 13px; color: var(--text2); line-height: 1.5; margin-bottom: 12px; }
.pc-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-tag { font-size: 11px; background: var(--bg3); border: 1px solid var(--border); padding: 3px 8px; border-radius: 20px; color: var(--text2); }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(4px); }
.modal { background: var(--bg2); border: 1px solid var(--border2); border-radius: 14px; padding: 26px; width: 100%; max-width: 490px; box-shadow: var(--shadow2); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-size: 17px; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text2); cursor: pointer; font-size: 18px; }

.auth-body { overflow: auto; display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.auth-wrap { display: flex; align-items: center; justify-content: center; width: 100%; padding: 24px; }
.auth-bg { position: fixed; inset: 0; background: radial-gradient(ellipse at 30% 40%, rgba(6,182,212,0.06) 0%, transparent 60%); pointer-events: none; z-index: -1; }
.auth-card { background: var(--bg2); border: 1px solid var(--border2); border-radius: 16px; padding: 36px; width: 100%; max-width: 400px; }
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.auth-logo-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--cyan); display: flex; align-items: center; justify-content: center; font-size: 15px; color: #000; font-weight: 800; }
.auth-logo-text { font-size: 20px; font-weight: 700; color: var(--text); }
.auth-logo-text span { color: var(--cyan); }
.auth-sub { font-size: 13px; color: var(--text2); margin-bottom: 26px; }
.auth-form .form-group { margin-bottom: 14px; }
.alert-error { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); border-radius: 8px; padding: 10px 14px; color: var(--red); font-size: 13px; margin-bottom: 16px; }
.auth-divider { text-align: center; color: var(--text3); font-size: 12px; margin: 16px 0; position: relative; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--border); }
.auth-divider::before { left: 0; } .auth-divider::after { right: 0; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: var(--bg3); border: 1px solid var(--border2); border-radius: var(--radius); color: var(--text); padding: 10px; font-size: 14px; cursor: pointer; transition: all .15s; font-family: inherit; }
.btn-google:hover { border-color: var(--cyan); }
.auth-switch { text-align: center; font-size: 13px; color: var(--text2); margin-top: 20px; }
.auth-switch a { color: var(--cyan); font-weight: 500; }

.plans-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 24px; }
.plan-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 26px; position: relative; display: flex; flex-direction: column; }
.plan-card.featured { border-color: var(--cyan); box-shadow: 0 4px 24px rgba(6,182,212,0.15); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--cyan); color: #000; font-size: 11px; font-weight: 700; padding: 4px 14px; border-radius: 20px; white-space: nowrap; }
.plan-icon { font-size: 22px; margin-bottom: 12px; }
.plan-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.plan-credits { font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.plan-price { margin-bottom: 20px; }
.plan-amount { font-size: 38px; font-weight: 700; color: var(--text); letter-spacing: -1px; }
.plan-period { color: var(--text2); font-size: 14px; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px; flex: 1; }
.plan-features li { font-size: 13px; color: var(--text2); display: flex; align-items: center; gap: 8px; }
.plan-features li::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }
.btn-outline { background: transparent; border: 1px solid var(--border2); color: var(--text); padding: 11px; border-radius: var(--radius); cursor: pointer; font-size: 14px; font-weight: 500; transition: all .15s; font-family: inherit; width: 100%; }
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }
.free-notice { display: flex; align-items: center; gap: 14px; background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.2); border-radius: 12px; padding: 16px 20px; color: var(--amber); font-size: 13px; }

.settings-sections { display: flex; flex-direction: column; gap: 16px; max-width: 700px; }
.settings-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 24px; }
.settings-card-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.sc-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--cyan3); border: 1px solid rgba(6,182,212,0.2); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.settings-card-header h3 { font-size: 15px; font-weight: 600; }
.settings-card-header p { font-size: 13px; color: var(--text2); margin-top: 3px; }
.avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.settings-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--cyan); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: #000; flex-shrink: 0; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--border); }
.toggle-row:last-child { border-bottom: none; }
.tr-label { font-size: 14px; font-weight: 500; }
.tr-sub { font-size: 12px; color: var(--text2); margin-top: 3px; }
.toggle { position: relative; width: 40px; height: 22px; cursor: pointer; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track { position: absolute; inset: 0; background: var(--bg4); border-radius: 11px; border: 1px solid var(--border2); transition: .2s; }
.toggle input:checked + .toggle-track { background: var(--cyan); border-color: var(--cyan); }
.toggle-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .2s; }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); }
.api-key-display { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-family: monospace; font-size: 13px; color: var(--text3); }

.gal-item { break-inside: avoid; margin-bottom: 12px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); position: relative; cursor: pointer; transition: all .2s; }
.gal-item:hover { border-color: var(--cyan); transform: translateY(-2px); }
.gal-item img { width: 100%; display: block; }
.gal-item-overlay { position: absolute; inset: 0; background: linear-gradient(to top,rgba(0,0,0,.8) 0%,transparent 50%); opacity: 0; transition: opacity .2s; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; }
.gal-item:hover .gal-item-overlay { opacity: 1; }
.gal-item-prompt { font-size: 11px; color: rgba(255,255,255,.85); margin-bottom: 8px; line-height: 1.4; }
.gal-item-actions { display: flex; gap: 6px; }
.gal-action { font-size: 11px; padding: 4px 9px; border-radius: 5px; border: none; background: rgba(255,255,255,.9); cursor: pointer; font-family: inherit; color: #000; }

.editor-layout { display: grid; grid-template-columns: 1fr 280px; gap: 16px; align-items: start; }
.canvas-toolbar { display: flex; align-items: center; gap: 4px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg3); flex-wrap: wrap; }
.tool-btn { background: none; border: 1px solid transparent; border-radius: 7px; padding: 6px 10px; cursor: pointer; font-size: 14px; color: var(--text2); transition: all .15s; font-family: inherit; }
.tool-btn:hover { background: var(--bg4); color: var(--text); border-color: var(--border); }
.tool-btn.active { background: var(--cyan3); color: var(--cyan); border-color: rgba(6,182,212,0.3); }
.tool-sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.canvas-area { min-height: 480px; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--bg3); }
.ep-section { padding: 16px; }
.ep-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 14px; }
.filters-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.filter-btn { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; border-radius: 8px; padding: 6px; border: 1px solid var(--border); transition: all .15s; background: var(--bg3); }
.filter-btn:hover { border-color: rgba(6,182,212,0.3); }
.filter-btn.active { border-color: var(--cyan); background: var(--cyan3); }
.filter-btn span { font-size: 10px; color: var(--text2); font-weight: 500; }
.filter-preview { width: 100%; aspect-ratio: 1; border-radius: 5px; }
.slider-row { margin-bottom: 12px; }
.slider-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); margin-bottom: 5px; font-weight: 500; }
.adj-slider { width: 100%; -webkit-appearance: none; height: 4px; border-radius: 2px; background: var(--bg4); outline: none; cursor: pointer; border: none; padding: 0; }
.adj-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--cyan); cursor: pointer; }
.hist-thumb { aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); cursor: pointer; transition: all .2s; position: relative; }
.hist-thumb:hover { border-color: var(--cyan); }
.hist-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hist-thumb-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.65); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; opacity: 0; transition: opacity .2s; padding: 8px; }
.hist-thumb:hover .hist-thumb-overlay { opacity: 1; }
.hist-thumb-overlay button { font-size: 10px; padding: 4px 8px; border-radius: 5px; border: none; background: rgba(255,255,255,.9); cursor: pointer; font-family: inherit; color: #000; }

@media (max-width: 900px) {
  .ig-layout,.generator-layout,.ads-layout,.editor-layout { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .quick-actions,.plans-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; gap: 12px; }
  .header-counter { display: none; }
  .sections-grid,.form-row { grid-template-columns: 1fr; }
}
