/* 
 * Plugin Name: Screen Generator Tools
 * Author: Ali Fathi
 * Website: https://Afateam.ir
 */


/* Base */
*{ box-sizing:border-box; }
html, body{ margin:0; padding:0;  color:#e5e7eb; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
.wrap{ max-width:1100px; margin:0 auto; padding:0 16px; }

.site-header{ background:#0b1220; border-bottom:1px solid rgba(255,255,255,.06); }
.site-header .wrap{ display:flex; align-items:center; height:64px; }
.site-title a{ color:#fff; text-decoration:none; }

.site-footer{ background:#0b1220; border-top:1px solid rgba(255,255,255,.06); padding:20px 0; margin-top:40px; }

/* Tools section */
section[data-tools]{
  background:#111827;
  border-radius:18px;
  padding:24px;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  margin: 24px 0;
}
section[data-tools] .tools-wrap{
  display:grid; grid-template-columns:260px 1fr 320px; gap:20px;
}
@media (max-width:1100px){
  section[data-tools] .tools-wrap{ grid-template-columns:240px 1fr; }
  section[data-tools] .tools-controls{ grid-column:1 / -1; }
}
@media (max-width:768px){
  section[data-tools] .tools-wrap{ grid-template-columns:1fr; }
}
/* sidebar */
.tools-sidebar{ display:flex; flex-direction:column; gap:12px; }
.tool-chip{ display:flex; align-items:center; gap:12px; background:#0b1220; border-radius:14px; padding:12px; border:1px solid rgba(255,255,255,.06); }
.tool-chip .swatch{ width:24px; height:24px; border-radius:8px; display:inline-block; }
/* stage */
.tool-stage .stage{ position:relative;  min-height:320px; border-radius:14px; box-shadow:0 6px 22px rgba(0,0,0,.25); }
.stage-footer{ display:flex; justify-content:flex-end; gap:10px; margin-top:10px; }
.stage-btn{ padding:10px 14px; border-radius:10px; background:#111827; color:#fff; border:none; cursor:pointer; }
/* controls */
.tools-controls{ background:#0b1220; border-radius:16px; padding:18px; border:1px solid rgba(255,255,255,.06); }
.control-row{ margin-top:12px; }
.control-row.inline{ display:flex; gap:12px; flex-wrap:wrap; }
.control-row.inline > div{ flex:1 1 140px; min-width:140px; }
.tools-controls input[type="number"], .tools-controls select, .tools-controls input[type="color"]{
  width:100%; background:#0f172a; color:#e5e7eb; border:1px solid rgba(255,255,255,.08); border-radius:10px; padding:10px 12px;
}
.tools-controls label{ font-size:.9rem; color:#cbd5e1; display:block; margin-bottom:6px; }
.button, button{ display:inline-block; background:#3b82f6; color:#fff; border:none; border-radius:12px; padding:12px 16px; font-weight:700; cursor:pointer; }
.button.secondary{ background:#111827; }

/* Share bar */
.share-bar{ display:flex; align-items:center; gap:10px; margin-top:18px; flex-wrap:wrap; padding:0 8px; }
.share-label{ color:#cbd5e1; font-size:.9rem; }
.share-btn{ width:36px; height:36px; border-radius:999px; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; text-transform:uppercase; box-shadow:0 2px 8px rgba(0,0,0,.25); }
.share-btn:hover{ transform: translateY(-1px); filter: brightness(1.05); }
.share-x{ background:#111; } .share-fb{ background:#1877F2; } .share-ln{ background:#0A66C2; } .share-tg{ background:#229ED9; } .share-wa{ background:#25D366; }

/* Fix fullscreen white border */
:fullscreen, ::backdrop{ background:#000 !important; }
body{ overflow-x:hidden; }


/* Gradient style buttons */
.button.gradient {
  background: linear-gradient(135deg,#4f46e5,#9333ea);
  color:#fff !important;
  border:none;
  box-shadow:0 3px 8px rgba(0,0,0,.2);
  transition:transform .2s ease, filter .2s ease;
}
.button.gradient:hover{ filter:brightness(1.1); transform:translateY(-1px); }

/* Floating fullscreen icon */
.fs-icon{ position:absolute; bottom:10px; right:10px; width:36px; height:36px; border-radius:10px; background:rgba(0,0,0,0.6); color:#fff; display:flex; align-items:center; justify-content:center; cursor:pointer; border:none; z-index:10; }
.fs-icon:before{
  content:"\26F6"; font-size:18px; /* Unicode square icon */
}
.fs-icon:hover{ background:rgba(0,0,0,0.8); }


/* Clickable chips */
.tool-chip{ cursor:pointer; border:1px solid rgba(255,255,255,.08); background:#0b1220; }
.tool-chip:hover{ border-color: rgba(59,130,246,.6); box-shadow:0 4px 12px rgba(0,0,0,.25); }
.tools-sidebar .tool-chip{ text-align:left; }
.tools-sidebar .tool-chip span{ pointer-events:none; }

/* Place stage relatively for fs-icon */
.tool-stage { position: relative; }

/* Buttons contrast */
.stage-btn{ background: linear-gradient(135deg,#06b6d4,#3b82f6); color:#fff; }
.stage-btn:hover{ filter: brightness(1.1); transform: translateY(-1px); }

/* Download primary gradient already defined as .button.gradient */

/* Floating FS icon already styled in V6 */

.share-btn.share-ig{ background:#E1306C; }

.download-row{ display:flex; align-items:center; gap:.75rem; flex-wrap:wrap; margin-top:.75rem }
.quality-label{ font-size:.9rem; opacity:.85 }
.quality-select{ padding:.5rem .6rem; border:1px solid var(--border, #e5e7eb); border-radius:.6rem; background:#fff; }


/* ==== Global / Reset ==== */
html, body { font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; overflow-x: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
a { text-decoration: none; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.button { display: inline-flex; align-items:center; gap:.5rem; padding:10px 16px; border-radius:12px; border:1px solid transparent; font-weight:600; }
.button.cta { background: linear-gradient(135deg, #6C5CE7, #A78BFA); color:#fff; }
.button.cta:hover { filter: brightness(1.05); }

/* ==== Header ==== */
.site-header { position: sticky; top:0; z-index: 50; background: rgba(255,255,255,0.75); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid rgba(0,0,0,0.06); }
.header-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; min-height: 64px; }
.site-branding .logo { font-weight: 800; font-size: 20px; color:#111827; }

.main-navigation { display: flex; align-items: center; gap: 20px; }
.main-navigation .menu a { color:#374151; font-weight:600; }
.main-navigation .menu a:hover { color:#111827; }

.nav-toggle { display:none; width:40px; height:40px; background:transparent; border:1px solid #e5e7eb; border-radius:10px; align-items:center; justify-content:center; gap:4px; }
.nav-toggle span { display:block; width:18px; height:2px; background:#111827; }
.nav-toggle.is-active span:nth-child(2){ opacity:.4; transform: scaleX(.7); }

/* ==== Footer ==== */
.site-footer { background:#0F172A; color:#E5E7EB; margin-top:64px; }
.footer-grid { display:grid; grid-template-columns: 1.5fr 1fr 1fr; gap:24px; padding:48px 0; }
.footer-col .logo { color:#fff; font-weight:800; font-size:18px; }
.footer-col h4 { font-size:16px; margin:0 0 12px; color:#fff; }
.footer-col .menu a { color:#cbd5e1; }
.footer-col .menu a:hover { color:#fff; }
.footer-bottom { border-top:1px solid rgba(255,255,255,0.08); padding:16px 0; text-align:center; font-size:14px; color:#cbd5e1; }
.socials { display:flex; gap:10px; margin-top:12px; }
.socials .ico { display:inline-flex; width:36px; height:36px; align-items:center; justify-content:center; border-radius:10px; background:#111827; color:#fff; }
.socials .ico-x{ background:#111827; }
.socials .ico-fb{ background:#1877F2; }
.socials .ico-ig{ background:#E1306C; }
.socials .ico-ln{ background:#0A66C2; }

/* ==== Responsive ==== */
@media (max-width: 1024px){
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px){
  .header-row { grid-template-columns: auto 1fr auto; }
  .main-navigation { position: fixed; top:64px; left:0; right:0; background:#fff; padding:16px; border-bottom:1px solid #e5e7eb; transform: translateY(-120%); transition: transform .25s ease; flex-direction: column; gap:12px; }
  .main-navigation.is-open { transform: translateY(0); }
  .main-navigation .menu { flex-direction: column; gap: 12px; }
  .nav-toggle { display:flex; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Avoid horizontal scroll in all sections */
.tool-stage, .site-main, .site-header, .site-footer { max-width: 100vw; overflow-x: hidden; }


/* --- Plugin Safe Reset (do not paint site background) --- */
html, body { background: transparent; }


/* --- Box around the Screen Generator tools --- */
section[data-tools]{
  background: transparent !important;   /* plugin outer background removed */
  margin: 32px auto;
  padding: 0;
  box-shadow: none;
}
section[data-tools] .tools-wrap{
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}
@media (max-width: 768px){
  section[data-tools] .tools-wrap{ padding: 16px; }
}

/* Keep stage surface paintable by JS */
section[data-tools] .tool-stage .stage{
  
}


/* --- Social icons visibility --- */
.share-btn svg { width: 18px; height: 18px; display: block; }
.share-btn svg path, .share-btn svg * { fill: #fff; }



/* --- Share bar inside the tools box --- */
section[data-tools] .tools-wrap .share-bar {
  margin-top: 20px;
  padding: 10px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* --- Stage with stronger shadow --- */
section[data-tools] .tool-stage .stage {
  
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  border-radius: 14px;
}

/* --- Title inside tools controls --- */
section[data-tools] .tools-controls h3 {
  font-size: 12px !important;
  color: #ffffff !important;
  font-weight: 500;
  text-align: center;
  margin-bottom: 12px;
}


/* === Box on the whole section so share-bar is inside === */
body section[data-tools] {
    background: #f0f0f0 !important;
    border-radius: 16px !important;
    padding: 24px !important;
    margin: 32px auto !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15) !important;
    max-width: 1200px;
}
/* Keep inner wrap neutral */
body section[data-tools] .tools-wrap{ background: transparent !important; box-shadow:none !important; padding: 0 !important; }
body section[data-tools] .share-bar{ margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,0.08); }


/* === Strong shadow around the display (stage) === */
body section[data-tools] .tool-stage .stage{
  
  box-shadow: 0 12px 28px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.05) !important;
  border-radius: 14px !important;
}


/* === Screen Generator Tools title smaller and white === */
body section[data-tools] .tools-controls h3{
  font-size: 12px !important;
  color: #ffffff !important;
  font-weight: 500 !important;
  margin-bottom: 12px !important;
  text-align: center;
}



/* Ensure stage only has shadow and radius, no background override */
.tool-stage .stage {
  box-shadow: 0 12px 28px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.05) !important;
  border-radius: 14px !important;
}
