/* ============================================================
   Toska Cinema Header  v10.0  |  Persian Emerald + MegaMenu
   ============================================================ */
:root {
  --tch-teal:    #2ec4b6;
  --tch-teal-l:  #7efff5;
  --tch-teal-d:  #0d8c7c;
  --tch-teal-dd: #0d5c4a;
  --tch-green-m: #0d2818;
  --tch-gold:    #ffd166;
  --tch-gold-d:  #b5862a;
  --tch-text:    #c8f7f2;
  --tch-dim:     rgba(200,247,242,.55);
  --tch-ease:    cubic-bezier(.4,0,.2,1);
}

#tch-root { position:relative; width:100%; direction:rtl; font-family:Tahoma,'Vazirmatn',sans-serif; z-index:9900; overflow:visible; overflow-y:visible; }
#tch-root *, #tch-root *::before, #tch-root *::after { box-sizing:border-box; }
#tch-root a { text-decoration:none; }

/* background */
.tch-canvas { position:absolute; inset:0; pointer-events:none; overflow:hidden; z-index:0; }
.tch-aurora { position:absolute; border-radius:50%; filter:blur(42px); }
.tch-aurora-a { width:480px; height:200px; top:-80px; right:3%; background:radial-gradient(ellipse,rgba(46,196,182,.28) 0%,transparent 70%); animation:tch-au-a 10s ease-in-out infinite alternate; }
.tch-aurora-b { width:300px; height:160px; top:-60px; left:5%; background:radial-gradient(ellipse,rgba(255,209,102,.14) 0%,transparent 70%); animation:tch-au-b 14s ease-in-out infinite alternate; }
.tch-aurora-c { width:200px; height:120px; top:0; left:40%; background:radial-gradient(ellipse,rgba(126,255,245,.07) 0%,transparent 70%); animation:tch-au-c 8s ease-in-out infinite alternate; }
@keyframes tch-au-a { from{transform:translateX(0) scale(1);opacity:.7} to{transform:translateX(80px) scale(1.35);opacity:1} }
@keyframes tch-au-b { from{transform:translateX(0) scale(1);opacity:.5} to{transform:translateX(-65px) scale(1.2);opacity:.9} }
@keyframes tch-au-c { from{opacity:.4} to{opacity:.8;transform:scaleX(1.5)} }
.tch-grid { position:absolute; inset:0; background-image:linear-gradient(rgba(46,196,182,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(46,196,182,.04) 1px,transparent 1px); background-size:40px 40px; mask-image:linear-gradient(to bottom,transparent,rgba(0,0,0,.4) 50%,transparent); -webkit-mask-image:linear-gradient(to bottom,transparent,rgba(0,0,0,.4) 50%,transparent); }
.tch-particles { position:absolute; inset:0; pointer-events:none; overflow:hidden; z-index:1; }
.tch-prt { position:absolute; bottom:0; border-radius:50%; animation:tch-rise linear infinite; }
@keyframes tch-rise { 0%{transform:translateY(70px) scale(0);opacity:0} 12%{opacity:1} 88%{opacity:.6} 100%{transform:translateY(-20px) scale(1);opacity:0} }

/* ── HEADER ── */
.tch-header {
  position:relative; width:100%;
  background:linear-gradient(160deg,#071410 0%,#0a1f16 25%,#0d2818 55%,#081a10 100%);
  box-shadow:0 6px 40px rgba(46,196,182,.18),0 2px 10px rgba(0,0,0,.6);
  z-index:9900;
  overflow:visible; /* critical — atom SVG extends beyond */
  border-bottom:2px solid transparent;
  border-image:linear-gradient(90deg,transparent,var(--tch-teal) 25%,var(--tch-gold) 50%,var(--tch-teal) 75%,transparent) 1;
  animation:tch-enter 1s cubic-bezier(.16,1,.3,1) both;
  /* Clean, simple structure at every width: a cluster of buttons on
     each side, logo centred between them. Mobile stacks the three
     blocks; desktop lines them up in one row. */
  display:flex; flex-direction:column; align-items:center;
  padding:22px 10px 14px;
  gap:14px;
}
.tch-header::after { content:''; position:absolute; bottom:-2px; left:0; right:0; height:2px; background:linear-gradient(90deg,transparent,var(--tch-teal-l),var(--tch-gold),var(--tch-teal-l),transparent); background-size:200% 100%; animation:tch-scan 4s linear infinite; pointer-events:none; }
@keyframes tch-scan  { from{background-position:-100% 0} to{background-position:120% 0} }
@keyframes tch-enter { 0%{transform:translateY(-115%);opacity:0;filter:blur(8px)} 60%{transform:translateY(6px);opacity:1;filter:blur(0)} 100%{transform:none;filter:none;opacity:1} }
.tch-header.tch-scrolled { background:rgba(8,26,16,.97); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); box-shadow:0 8px 40px rgba(46,196,182,.22); transition:background .4s,box-shadow .4s; }

@media (min-width:900px) {
  .tch-header { flex-direction:row; justify-content:space-between; align-items:center; min-height:155px; padding:20px 26px; gap:14px; }
}

/* columns — each one a simple wrapping row of buttons */
.tch-col {
  display:flex; align-items:center; justify-content:center; flex-wrap:wrap;
  gap:8px 10px; z-index:2; width:100%;
}
.tch-center{ order:2; flex-direction:column; text-align:center; }
.tch-left  { order:1; }  /* top cluster on mobile — login/menu/deposit/search */
.tch-right { order:3; }  /* bottom cluster on mobile — expert/visitor/price/date/about/privacy */

/* Every button/badge/icon in the row is a fixed-shape unit — never let
   flex shrink squash a circle into an oval when the row runs tight.
   (This was the root cause of both the menu icon and the search icon
   getting visually distorted on mobile.) */
.tch-col > * ,
.tch-item,
.tch-btn,
.tch-btn-icon,
.tch-badge,
.tch-searchwrap,
svg.tch-ico {
  flex-shrink: 0;
}

@media (max-width:899px) {
  .tch-col   { gap:6px 8px; }
  .tch-btn   { font-size:10px; padding:5px 9px; gap:3px; }
  .tch-btn .tch-ico { width:11px; height:11px; }
  .tch-btn-icon.tch-btn { padding:7px; width:32px; height:32px; justify-content:center; }
  .tch-btn-icon.tch-btn svg { width:14px !important; height:14px !important; }
  .tch-badge { padding:3px 8px; border-radius:10px; }
  .tch-blbl  { font-size:7.5px; }
  .tch-bval  { font-size:9.5px; }
}
@media (max-width:420px) {
  .tch-col   { gap:5px 6px; }
  .tch-btn   { font-size:9px; padding:4px 7px; }
  .tch-btn .tch-ico { width:10px; height:10px; }
  .tch-btn-icon.tch-btn { width:29px; height:29px; padding:6px; }
  .tch-btn-icon.tch-btn svg { width:13px !important; height:13px !important; }
  .tch-badge { padding:3px 6px; }
  .tch-blbl  { font-size:7px; }
  .tch-bval  { font-size:8.5px; }
}

@media (min-width:900px) {
  .tch-col    { width:auto; flex-wrap:nowrap; }
  .tch-left   { flex:1; justify-content:flex-start; order:initial; }
  .tch-right  { flex:1; justify-content:flex-end; order:initial; }
  .tch-center { flex:0 0 auto; order:initial; }
}
.tch-center { flex-direction:column; align-items:center; }

/* ── the megamenu trigger is a circular medallion — lock flex-shrink
   at every level in its chain so a tight mobile row can never squash
   it into an oval (.tch-mega-item is already covered by the generic
   .tch-item rule above; the rest of the chain still needs it). ── */
.pmm-megamenu,
.tch-mega-container,
.tch-mega-header,
.pmm-menu-trigger,
.tch-mega-trigger,
.pmm-menu-toggle {
  flex-shrink: 0;
}
.pmm-menu-toggle { min-width:34px; min-height:34px; }
@media (max-width:899px) {
  .pmm-menu-toggle { width:36px !important; height:36px !important; }
  .tch-mega-icon svg, .tch-mega-icon { width:20px; height:20px; }
  .tch-mega-label { font-size:10px !important; }
}
@media (max-width:420px) {
  .pmm-menu-toggle { width:32px !important; height:32px !important; }
  .tch-mega-label { font-size:9px !important; }
}

/* ── LOGO LINK & ATOM ── */
#tch-root .tch-logolink {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  position:relative !important;
  text-decoration:none !important;
  /* Container = 190×190 so SVG (180×180) fits with margin */
  width:190px !important; height:190px !important;
  min-width:190px !important; min-height:190px !important;
  flex-shrink:0 !important;
  overflow:visible !important;
}

/* The span that holds the SVG — injected by JS */
.tch-atom-wrap {
  position:absolute !important;
  top:50% !important; left:50% !important;
  transform:translate(-50%,-50%) !important;
  width:190px !important; height:190px !important;
  pointer-events:none !important;
  display:block !important;
}
/* The actual SVG element injected inside .tch-atom-wrap */
.tch-atom-wrap svg {
  width:190px !important;
  height:190px !important;
  overflow:visible !important;
  display:block !important;
}

/* nucleus glow */
.tch-nucleus-glow {
  position:absolute !important;
  width:120px !important; height:120px !important;
  top:50% !important; left:50% !important;
  transform:translate(-50%,-50%) !important;
  border-radius:50% !important;
  background:radial-gradient(ellipse,rgba(46,196,182,.35) 0%,rgba(255,209,102,.12) 45%,transparent 70%) !important;
  animation:tch-nucleus 4s ease-in-out infinite;
  pointer-events:none !important; z-index:1 !important;
}
@keyframes tch-nucleus { 0%,100%{transform:translate(-50%,-50%) scale(1);opacity:.7} 50%{transform:translate(-50%,-50%) scale(1.14);opacity:1} }

/* logo image */
#tch-root .tch-logolink .tch-logo,
#tch-root img.tch-logo {
  width:98px !important; height:98px !important;
  max-width:98px !important; max-height:98px !important;
  min-width:98px !important; min-height:98px !important;
  object-fit:contain !important; display:block !important;
  position:relative !important; z-index:2 !important;
  flex-shrink:0 !important;
  border:none !important; padding:0 !important; margin:0 !important;
  box-sizing:content-box !important;
  filter:drop-shadow(0 0 14px rgba(46,196,182,.75)) drop-shadow(0 4px 10px rgba(0,0,0,.5)) !important;
  animation:tch-float 6.5s ease-in-out infinite;
  transition:transform .35s var(--tch-ease),filter .35s var(--tch-ease) !important;
  cursor:pointer !important;
}
#tch-root .tch-logolink:hover .tch-logo { transform:scale(1.07) !important; filter:drop-shadow(0 0 26px rgba(46,196,182,1)) drop-shadow(0 0 14px rgba(255,209,102,.7)) !important; }
@keyframes tch-float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }

/* mobile */
@media (max-width:480px) {
  #tch-root .tch-logolink { width:92px !important; height:92px !important; min-width:92px !important; min-height:92px !important; }
  .tch-atom-wrap,.tch-atom-wrap svg { width:92px !important; height:92px !important; }
  #tch-root .tch-logolink .tch-logo, #tch-root img.tch-logo { width:46px !important; height:46px !important; max-width:46px !important; max-height:46px !important; min-width:46px !important; min-height:46px !important; }
  .tch-nucleus-glow { width:54px !important; height:54px !important; }
  #tch-root .tch-brand { font-size:13px; letter-spacing:3px; margin-top:3px; }
  .tch-sub { font-size:7.5px; white-space:normal; max-width:120px; line-height:1.35; }
}

/* brand */
#tch-root .tch-brand { display:block; font-size:19px; font-weight:900; letter-spacing:7px; text-transform:uppercase; background:linear-gradient(90deg,var(--tch-teal-dd),var(--tch-teal),var(--tch-teal-l),var(--tch-gold),var(--tch-teal),var(--tch-teal-dd)); background-size:300%; -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; animation:tch-shine 5s linear infinite; margin-top:6px; text-decoration:none; }
@keyframes tch-shine { from{background-position:-200% center} to{background-position:200% center} }
.tch-sub { font-size:10px; color:var(--tch-dim); letter-spacing:.5px; text-align:center; margin-top:2px; white-space:nowrap; }

/* buttons */
.tch-btn { display:inline-flex; align-items:center; gap:5px; padding:8px 15px; border-radius:26px; border:none; font-family:Tahoma,'Vazirmatn',sans-serif; font-size:12.5px; font-weight:700; cursor:pointer; white-space:nowrap; text-decoration:none; position:relative; overflow:hidden; transition:transform .25s var(--tch-ease),box-shadow .25s var(--tch-ease); -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
.tch-btn::before { content:''; position:absolute; top:-50%; left:-80%; width:50%; height:200%; background:linear-gradient(115deg,transparent,rgba(255,255,255,.3),transparent); transform:skewX(-20deg); transition:left .5s ease; }
.tch-btn:hover::before { left:130%; }
.tch-btn:hover  { transform:translateY(-2px); }
.tch-btn:active { transform:translateY(0); }
.tch-ico { width:14px; height:14px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:2.3; stroke-linecap:round; stroke-linejoin:round; }

.tch-btn-login  { background:linear-gradient(135deg,var(--tch-teal-dd),var(--tch-teal-d)); color:var(--tch-teal-l); border:1px solid rgba(46,196,182,.35); animation:tch-lglow 3s ease-in-out infinite; }
.tch-btn-login:hover { background:linear-gradient(135deg,var(--tch-teal-d),var(--tch-teal)); color:#fff; }
@keyframes tch-lglow { 0%,100%{box-shadow:0 3px 14px rgba(46,196,182,.2)} 50%{box-shadow:0 3px 22px rgba(46,196,182,.5)} }

.tch-btn-deposit { background:linear-gradient(135deg,var(--tch-gold-d),var(--tch-gold)); color:#1a0f00; font-weight:900; font-size:13px; animation:tch-dpulse 2.3s ease-out infinite; }
.tch-btn-deposit:hover { background:linear-gradient(135deg,var(--tch-gold),#ffe599); }
@keyframes tch-dpulse { 0%{box-shadow:0 3px 14px rgba(255,209,102,.3)} 50%{box-shadow:0 3px 24px rgba(255,209,102,.6),0 0 0 4px rgba(255,209,102,.1)} 100%{box-shadow:0 3px 14px rgba(255,209,102,.3)} }

.tch-btn-icon   { background:rgba(46,196,182,.1); color:var(--tch-teal); border:1.5px solid rgba(46,196,182,.25); padding:8px 11px; }
.tch-btn-icon:hover { background:rgba(46,196,182,.22); color:var(--tch-teal-l); }
.tch-btn-expert { background:linear-gradient(135deg,var(--tch-teal-dd),var(--tch-teal-d)); color:var(--tch-teal-l); border:1px solid rgba(46,196,182,.3); }
.tch-btn-expert:hover { background:linear-gradient(135deg,var(--tch-teal-d),var(--tch-teal)); color:#fff; }
.tch-btn-nav    { background:rgba(46,196,182,.07); color:var(--tch-text); border:1.5px solid rgba(46,196,182,.18); }
.tch-btn-nav:hover { background:rgba(46,196,182,.18); border-color:rgba(46,196,182,.5); color:var(--tch-teal-l); }
.tch-btn-user   { background:rgba(46,196,182,.1); color:var(--tch-teal-l); border:1.5px solid rgba(46,196,182,.25); }
.tch-btn-user:hover { background:rgba(46,196,182,.22); }

/* badges */
.tch-badge { display:flex; flex-direction:column; align-items:center; padding:5px 13px; border-radius:12px; border:1.5px solid; line-height:1.4; }
.tch-blbl  { font-size:10px; font-weight:600; opacity:.65; }
.tch-bval  { font-size:13px; font-weight:800; }
.tch-badge-price { background:rgba(255,209,102,.08); border-color:rgba(255,209,102,.32); color:var(--tch-gold); }
.tch-badge-visit { background:rgba(46,196,182,.08); border-color:rgba(46,196,182,.3); color:var(--tch-teal); }
.tch-badge-date  { background:rgba(46,196,182,.10); border-color:rgba(46,196,182,.45); color:var(--tch-teal); }
.tch-badge-date .tch-bval { color:#ffffff; }

/* search */
.tch-searchwrap { position:relative; }
.tch-searchpanel { position:absolute; top:calc(100% + 10px); right:0; width:270px; background:var(--tch-green-m); border:1.5px solid rgba(46,196,182,.3); border-radius:14px; padding:12px; z-index:99999; box-shadow:0 14px 44px rgba(0,0,0,.6); animation:tch-fdrop .25s cubic-bezier(.16,1,.3,1); }
.tch-searchpanel[hidden] { display:none; }
@keyframes tch-fdrop { from{transform:translateY(-8px);opacity:0} to{transform:translateY(0);opacity:1} }
.tch-searchpanel input[type="search"] { width:100%; padding:9px 14px; border:1.5px solid rgba(46,196,182,.25); border-radius:10px; font-family:Tahoma,sans-serif; font-size:13px; background:rgba(46,196,182,.06); color:#fff; outline:none; }
.tch-searchpanel input:focus { border-color:var(--tch-teal); box-shadow:0 0 0 3px rgba(46,196,182,.15); }
.tch-searchpanel input::placeholder { color:rgba(46,196,182,.4); }

/* dropdown */
.tch-userwrap { position:relative; }
.tch-drop { position:absolute; top:calc(100% + 10px); right:0; background:var(--tch-green-m); border:1.5px solid rgba(46,196,182,.28); border-radius:12px; overflow:hidden; z-index:99999; min-width:160px; box-shadow:0 12px 36px rgba(0,0,0,.7); animation:tch-fdrop .22s ease; }
.tch-drop[hidden] { display:none; }
.tch-drop-item { display:flex; align-items:center; gap:7px; width:100%; padding:11px 18px; background:transparent; border:none; font-family:Tahoma,sans-serif; font-size:13px; color:var(--tch-text); text-align:right; cursor:pointer; transition:background .15s; }
.tch-drop-item:hover { background:rgba(46,196,182,.12); color:var(--tch-teal-l); }

/* modal */
.tch-overlay { position:fixed; inset:0; background:rgba(5,20,12,.82); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); z-index:999999; display:flex; align-items:center; justify-content:center; padding:16px; animation:tch-fade .3s ease; }
.tch-overlay[hidden] { display:none; }
@keyframes tch-fade { from{opacity:0} to{opacity:1} }
.tch-modal { background:linear-gradient(155deg,#0a1f14 0%,#0d2818 50%,#081510 100%); border:1.5px solid rgba(46,196,182,.3); border-radius:22px; padding:36px 28px 28px; width:100%; max-width:420px; position:relative; box-shadow:0 32px 80px rgba(0,0,0,.9),inset 0 1px 0 rgba(46,196,182,.12); animation:tch-modal-in .42s cubic-bezier(.16,1,.3,1); overflow:hidden; }
.tch-modal::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; background:linear-gradient(90deg,var(--tch-teal-dd),var(--tch-teal),var(--tch-gold),var(--tch-teal),var(--tch-teal-dd)); }
@keyframes tch-modal-in { from{transform:scale(.86) translateY(28px);opacity:0} to{transform:scale(1) translateY(0);opacity:1} }
.tch-modal-x { position:absolute; top:14px; left:14px; width:32px; height:32px; border-radius:50%; border:1.5px solid rgba(46,196,182,.25); background:rgba(46,196,182,.08); color:var(--tch-teal); font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background .2s,color .2s; z-index:2; }
.tch-modal-x:hover { background:rgba(255,209,102,.15); color:var(--tch-gold); }
.tch-modal-top { text-align:center; margin-bottom:20px; }
.tch-modal-logo-wrap { position:relative; display:inline-block; margin-bottom:8px; }
.tch-modal-halo { position:absolute; inset:-10px; border-radius:50%; background:radial-gradient(ellipse,rgba(46,196,182,.25) 0%,transparent 70%); animation:tch-nucleus 3s ease-in-out infinite; }
.tch-modal-logo { width:70px !important; height:70px !important; max-width:70px !important; max-height:70px !important; object-fit:contain !important; position:relative; z-index:1; filter:drop-shadow(0 0 14px rgba(46,196,182,.7)); }
.tch-modal-top h2 { font-size:19px; color:var(--tch-teal-l); margin:0 0 3px; }
.tch-modal-top p  { font-size:11px; color:var(--tch-dim); }
.tch-tabs { display:flex; gap:4px; background:rgba(46,196,182,.08); border-radius:14px; padding:4px; margin-bottom:20px; }
.tch-tab  { flex:1; padding:9px; border:none; background:transparent; border-radius:11px; font-family:Tahoma,sans-serif; font-size:13px; color:rgba(46,196,182,.5); cursor:pointer; transition:all .25s; -webkit-tap-highlight-color:transparent; }
.tch-tab-on { background:linear-gradient(135deg,var(--tch-teal-dd),var(--tch-teal-d)); color:var(--tch-teal-l); font-weight:700; box-shadow:0 2px 10px rgba(46,196,182,.3); }
.tch-form { display:block; }
.tch-form[hidden] { display:none; }
.tch-field { margin-bottom:14px; }
.tch-field label { display:block; font-size:12px; color:var(--tch-teal); font-weight:600; margin-bottom:5px; }
.tch-field input { width:100%; padding:10px 14px; border:1.5px solid rgba(46,196,182,.22); border-radius:11px; font-family:Tahoma,sans-serif; font-size:16px; background:rgba(46,196,182,.06); color:#fff; outline:none; transition:border-color .2s,box-shadow .2s; }
.tch-field input:focus { border-color:var(--tch-teal); box-shadow:0 0 0 3px rgba(46,196,182,.15); background:rgba(46,196,182,.1); }
.tch-field input::placeholder { color:rgba(46,196,182,.3); }
.tch-submit { width:100%; padding:13px; border:none; border-radius:14px; background:linear-gradient(135deg,var(--tch-teal-dd),var(--tch-teal-d),var(--tch-teal)); color:#fff; font-family:Tahoma,sans-serif; font-size:15px; font-weight:700; cursor:pointer; box-shadow:0 4px 18px rgba(46,196,182,.35); transition:all .25s; }
.tch-submit:hover { transform:translateY(-1px); box-shadow:0 6px 26px rgba(46,196,182,.55); }
.tch-submit:active { transform:translateY(0); }
.tch-submit:disabled { opacity:.55; cursor:not-allowed; transform:none; }
.tch-or { text-align:center; position:relative; margin:14px 0; font-size:12px; color:rgba(46,196,182,.4); }
.tch-or::before,.tch-or::after { content:''; position:absolute; top:50%; width:38%; height:1px; background:rgba(46,196,182,.15); }
.tch-or::before{right:0} .tch-or::after{left:0}
.tch-gcenter { display:flex; justify-content:center; margin-top:5px; }
.tch-msg { margin-top:10px; padding:9px 14px; border-radius:10px; font-size:13px; text-align:center; animation:tch-fdrop .2s ease; }
.tch-msg:empty { display:none; }
.tch-msg-ok  { background:rgba(46,196,182,.12); color:#7efff5; border:1px solid rgba(46,196,182,.3); }
.tch-msg-err { background:rgba(239,68,68,.08); color:#fca5a5; border:1px solid rgba(239,68,68,.22); }

/* mobile */
.tch-nomob { display:none !important; }
@media (min-width:600px) { .tch-nomob { display:inline-flex !important; } }
