:root{
  --bg1:#667eea;
  --bg2:#764ba2;
  --surface:rgba(255,255,255,.12);
  --surface2:rgba(255,255,255,.08);
  --border:rgba(255,255,255,.26);
  --text:#ffffff;
  --muted:rgba(255,255,255,.80);
  --shadow:0 14px 40px rgba(0,0,0,.30);
  --accent:#ffd700;
  --radius:16px;
}

:root[data-theme="dark"]{
  --bg1:#0b1020;
  --bg2:#2b1055;
  --surface:rgba(255,255,255,.11);
  --surface2:rgba(255,255,255,.07);
  --border:rgba(255,255,255,.18);
  --text:#ffffff;
  --muted:rgba(255,255,255,.80);
  --shadow:0 18px 48px rgba(0,0,0,.55);
  --accent:#ffd700;
}

:root[data-theme="light"]{
  --bg1:#eef1ff;
  --bg2:#e7ddff;
  --surface:rgba(255,255,255,.22);
  --surface2:rgba(255,255,255,.14);
  --border:rgba(20,22,39,.12);
  --text:#141627;
  --muted:rgba(20,22,39,.72);
  --shadow:0 14px 34px rgba(15,18,30,.18);
  --accent:#4b52ff;
}

html{min-height:100%;}

body{
  min-height:100vh;
  background:linear-gradient(135deg,var(--bg1) 0%,var(--bg2) 100%) !important;
  color:var(--text) !important;
  margin:0 !important;
  padding:0 !important;
  overflow-x:hidden;
}

a{color:inherit;}

.page{
  padding-top:88px !important;
  padding-left:20px !important;
  padding-right:20px !important;
  padding-bottom:36px !important;
}

.container{
  width:100%;
  margin:0 auto;
}

.logo,
.title{
  letter-spacing:-0.4px !important;
}

.subtitle{
  color:var(--muted) !important;
}

.platform-name,
.name{
  font-weight:900 !important;
  font-size:1.12rem !important;
}

.platform-desc,
.desc{
  color:var(--muted) !important;
  font-size:0.95rem !important;
  line-height:1.35 !important;
  text-align:center !important;
}

.platform-icon{
  display:none !important;
}

:root[data-theme="light"] .telegram-button,
:root[data-theme="dark"] .telegram-button{
  color:#fff !important;
}

:root[data-theme="light"] .back-button{
  color:var(--text) !important;
  border-color:rgba(20,22,39,.14) !important;
}

:root[data-theme="light"] .footer{
  color:var(--muted) !important;
}

:root[data-theme="light"] .spinner,
:root[data-theme="light"] .loader{
  border-color:rgba(20,22,39,.18) !important;
  border-top-color:rgba(20,22,39,.70) !important;
}

.nav-button,
.platform-card,
.navlink,
.item,
details,
.card,
.payment-card,
.coming-soon,
.content,
.step,
.warning,
.feature-item{
  background:var(--surface) !important;
  border:1px solid var(--border) !important;
  color:var(--text) !important;
  border-radius:18px !important;
  backdrop-filter:blur(14px) !important;
}

.btn,
.back a{
  background:var(--surface) !important;
  border:1px solid var(--border) !important;
  color:var(--text) !important;
  border-radius:14px !important;
}

.nav-grid,
.grid,
.platforms-grid{
  display:grid !important;
  grid-template-columns:repeat(2, minmax(220px, 1fr)) !important;
  gap:18px !important;
  max-width:860px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

@media (min-width:1100px){
  .nav-grid,
  .grid,
  .platforms-grid{
    grid-template-columns:repeat(3, minmax(220px, 1fr)) !important;
  }
}

@media (max-width:768px){
  .nav-grid,
  .grid,
  .platforms-grid{
    grid-template-columns:1fr !important;
    max-width:520px !important;
  }
}

@media (max-width: 480px) {
  .page {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .title {
    font-size: 2rem !important;
  }
}

.nav-button,
.btn,
.platform-card,
a.card{
  min-height:108px !important;
  padding:18px 18px !important;
  text-decoration:none !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
  transition:transform .22s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease !important;
}

.nav-button:hover,
.btn:hover,
.platform-card:hover,
a.card:hover{
  transform:translateY(-4px) !important;
  box-shadow:var(--shadow) !important;
}

.nav-button::before,
.btn::before,
.platform-card::before,
a.card::before{
  content:'';
  width:40px;
  height:40px;
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
  opacity:0.95;
}

.btn[href$="tariffs.html"]::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1.81.45 1.61 1.67 1.61 1.16 0 1.6-.64 1.6-1.46 0-.84-.68-1.22-1.88-1.54-1.76-.46-3.5-1.08-3.5-3.22 0-1.69 1.26-2.83 2.93-3.18V5h2.67v1.71c1.63.39 2.83 1.48 2.94 3.08h-1.96c-.1-.73-.39-1.33-1.43-1.33-1.06 0-1.46.58-1.46 1.28 0 .64.45 1.02 1.81 1.37 1.82.49 3.58 1.13 3.58 3.46-.01 1.87-1.36 3.03-3.02 3.52z"/></svg>');}
.btn[href$="conditions.html"]::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>');}
.btn[href$="installation.html"]::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>');}
.btn[href$="payment.html"]::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"/></svg>');}

.nav-button[href$="tariffs.html"]::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1.81.45 1.61 1.67 1.61 1.16 0 1.6-.64 1.6-1.46 0-.84-.68-1.22-1.88-1.54-1.76-.46-3.5-1.08-3.5-3.22 0-1.69 1.26-2.83 2.93-3.18V5h2.67v1.71c1.63.39 2.83 1.48 2.94 3.08h-1.96c-.1-.73-.39-1.33-1.43-1.33-1.06 0-1.46.58-1.46 1.28 0 .64.45 1.02 1.81 1.37 1.82.49 3.58 1.13 3.58 3.46-.01 1.87-1.36 3.03-3.02 3.52z"/></svg>') !important;}
.nav-button[href$="conditions.html"]::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>') !important;}
.nav-button[href$="installation.html"]::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>') !important;}
.nav-button[href$="payment.html"]::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"/></svg>') !important;}

:is(.platform-card,a.card)[href$="android.html"]::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%233DDC84" viewBox="0 0 24 24"><path d="M17.6 9.48l1.84-3.18c.16-.31.04-.69-.26-.85-.29-.15-.65-.06-.83.22l-1.88 3.24c-2.86-1.21-6.08-1.21-8.94 0L5.65 5.67c-.19-.29-.54-.38-.83-.22-.3.16-.42.54-.26.85l1.84 3.18C3.53 10.94 1.68 13.75 1.53 17H22.47c-.15-3.25-2-6.06-4.87-7.52zM7 15.25c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25zm10 0c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25z"/></svg>');}
:is(.platform-card,a.card)[href$="ios.html"]::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%23000000" viewBox="0 0 24 24"><path d="M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"/></svg>');}
:is(.platform-card,a.card)[href$="windows.html"]::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%230078D4" d="M2 4l9-1v9H2V4zm11-1l9-1v10h-9V3zM2 13h9v9l-9-1v-8zm11 0h9v10l-9-1v-9z"/></svg>');}
:is(.platform-card,a.card)[href$="webos.html"]::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%230099FF" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="%230099FF"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" fill="white"/><path d="M12 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6z" fill="white"/></svg>');}
:is(.platform-card,a.card)[href$="tizen.html"]::before{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 50 Q55.2 25.5 50.0 5.0 Q44.8 25.5 50 50" fill="%234E50A4" /><path d="M50 50 Q68.6 33.3 76.5 13.6 Q60.2 27.2 50 50" fill="%237D4F9F" /><path d="M50 50 Q74.9 47.4 92.8 36.1 Q71.7 37.5 50 50" fill="%23B34B96" /><path d="M50 50 Q71.7 62.5 92.8 63.9 Q74.9 52.6 50 50" fill="%23DA467D" /><path d="M50 50 Q60.2 72.8 76.5 86.4 Q68.6 66.7 50 50" fill="%23F15A5A" /><path d="M50 50 Q44.8 74.5 50.0 95.0 Q55.2 74.5 50 50" fill="%23F78E49" /><path d="M50 50 Q31.4 66.7 23.5 86.4 Q39.8 72.8 50 50" fill="%23F9BA36" /><path d="M50 50 Q25.1 52.6 7.2 63.9 Q28.3 62.5 50 50" fill="%23B4D234" /><path d="M50 50 Q28.3 37.5 7.2 36.1 Q25.1 47.4 50 50" fill="%2366C163" /><path d="M50 50 Q39.8 27.2 23.5 13.6 Q31.4 33.3 50 50" fill="%2300A3DA" /></svg>');}
:is(.platform-card,a.card)[href$="appletv.html"]::before{width:70px !important;background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 20 130 75"><defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop offset="0%" stop-color="%239FE8FF"/><stop offset="25%" stop-color="%23B8FFDA"/><stop offset="50%" stop-color="%23FFF0A6"/><stop offset="75%" stop-color="%23FFC1D9"/><stop offset="100%" stop-color="%23A8A2FF"/></linearGradient></defs><g transform="translate(-5,15) scale(3.5)"><path d="M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83" fill="url(%23g)"/><path d="M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z" fill="url(%23g)"/></g><text x="75" y="75" font-family="Arial, sans-serif" font-size="38" font-weight="700" fill="url(%23g)">tv</text></svg>') !important;}

:root[data-theme="light"] .btn::before,
:root[data-theme="light"] a.card::before,
:root[data-theme="light"] .platform-card::before,
:root[data-theme="light"] .nav-button::before{
  filter:invert(1);
}

:root[data-theme="light"] :is(.platform-card,a.card)[href$="appletv.html"]::before{
  filter:none !important;
}

.navlink{
  border-width:1px !important;
}

details{
  border-width:1px !important;
}

.nav-button:hover,
.platform-card:hover,
.navlink:hover,
.item:hover,
details:hover,
.card:hover{
  box-shadow:var(--shadow) !important;
}

:root[data-theme="light"] .nav-button::before{
  filter:invert(1);
  opacity:0.85;
}

.topbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 16px;
  background:var(--surface);
  border-bottom:1px solid var(--border);
  backdrop-filter:blur(12px);
}

:root[data-theme="light"] .topbar{backdrop-filter:blur(14px);}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.2px;
  text-decoration:none;
}
.brand .dot{
  width:10px;
  height:10px;
  border-radius:99px;
  background:var(--accent);
  box-shadow:0 0 0 6px rgba(255,215,0,.15);
}
:root[data-theme="light"] .brand .dot{box-shadow:0 0 0 6px rgba(107,91,255,.14);}

.actions{display:flex; align-items:center; gap:10px;}

.icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:12px;
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--text);
  cursor:pointer;
  text-decoration:none;
  user-select:none;
}
.icon-btn:hover{transform:translateY(-1px); box-shadow:var(--shadow);}

.burger{
  width:44px;
  height:44px;
  padding:0;
}

.icon-btn[data-action="theme"]{
  width:44px;
  height:44px;
  padding:0;
  font-size:0;
}

.icon-btn[data-action="theme"] svg{
  width:20px;
  height:20px;
}

.burger span{
  display:none;
}

.burger::before{
  content:"";
  display:block;
  width:20px;
  height:20px;
  margin:0 auto;
  background:center / contain no-repeat;
  background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><circle cx='4' cy='10' r='2' fill='%23000'/><circle cx='10' cy='10' r='2' fill='%23000'/><circle cx='16' cy='10' r='2' fill='%23000'/></svg>");
}

:root[data-theme="dark"] .burger::before{
  background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><circle cx='4' cy='10' r='2' fill='%23fff'/><circle cx='10' cy='10' r='2' fill='%23fff'/><circle cx='16' cy='10' r='2' fill='%23fff'/></svg>");
}
:root[data-theme="light"] .burger::before{
  background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><circle cx='4' cy='10' r='2' fill='%23000'/><circle cx='10' cy='10' r='2' fill='%23000'/><circle cx='16' cy='10' r='2' fill='%23000'/></svg>");
}
.navpanel{
  position:fixed;
  top:64px;
  right:16px;
  width:min(360px, calc(100vw - 32px));
  max-height:calc(100vh - 80px);
  overflow-y:auto;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  backdrop-filter:blur(14px);
  box-shadow:var(--shadow);
  padding:12px;
  z-index:60;
  transform:translateY(-6px);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
}
.navpanel.open{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}

.navlinks{
  display:grid;
  gap:10px;
}

.navlink{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-radius:14px;
  text-decoration:none;
  background:var(--surface2);
  border:1px solid var(--border);
}
.navlink:hover{box-shadow:var(--shadow); transform:translateY(-1px);}


#preloader{
  position:fixed;
  inset:0;
  background:linear-gradient(135deg,var(--bg1) 0%,var(--bg2) 100%);
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:opacity .25s ease;
}
#preloader.hide{opacity:0; pointer-events:none;}

.loader{
  width:56px;
  height:56px;
  border-radius:99px;
  border:4px solid rgba(255,255,255,.35);
  border-top-color:rgba(255,255,255,.95);
  animation:spin 1s linear infinite;
}
:root[data-theme="light"] .loader{
  border-color:rgba(0,0,0,.18);
  border-top-color:rgba(0,0,0,.65);
}

@keyframes spin{to{transform:rotate(360deg);}}

.reveal{
  opacity:0;
  transform:translateY(14px);
  transition:opacity .45s ease, transform .45s ease;
}
.reveal.show{opacity:1; transform:translateY(0);}

.lang-switch{font-weight:700;}

.lang-dropdown{position:relative;}

.lang-dropdown .icon-btn{
  min-width:52px;
  height:44px;
  padding:0 12px;
  font-weight:900;
  letter-spacing:.3px;
}

.lang-code{font-weight:900;}
.lang-caret{opacity:.75; font-size:12px; margin-left:6px;}

.lang-menu{
  position:absolute;
  top:48px;
  right:0;
  min-width:160px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:var(--shadow);
  backdrop-filter:blur(14px);
  padding:8px;
  display:none;
  z-index:80;
}

.lang-menu{
  background:var(--surface);
}
:root[data-theme="dark"] .lang-menu{
  background:rgba(15,18,30,.88);
  border-color:rgba(255,255,255,.22);
  backdrop-filter:blur(8px);
}
:root[data-theme="light"] .lang-menu{
  background:rgba(255,255,255,.96);
  border-color:rgba(20,22,39,.14);
  backdrop-filter:blur(8px);
}

.lang-menu.open{display:block;}

.lang-menu a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  text-decoration:none;
  background:transparent;
  border:1px solid transparent;
}

.lang-menu a:hover{
  background:var(--surface2);
  border-color:var(--border);
}

:is(.answer) ul,
:is(.answer) ol{
  list-style-position: inside;
  margin-left: 0;
  padding-left: 0;
}
:is(.answer) li{
  padding-left: 0;
}

@media (min-width: 900px){
  .navpanel{right:16px;}
}

@media (max-width: 380px) {
  .topbar { padding: 12px 10px; gap: 8px; }
  .actions { gap: 6px; }
  .icon-btn { padding: 8px; }
  .lang-dropdown .icon-btn { min-width: 40px; padding: 0 8px; }
  .brand span:nth-child(2) { display: none; }
}
