*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:#0e0e0e; --surface:#161616; --surface2:#1e1e1e; --surface3:#252525;
  --border:rgba(255,255,255,0.07); --text:#e8e4dc; --text-muted:#7a7670;
  --accent:#c8a96e; --accent2:#7eb8c9; --iris:#b89fd4; --radius:12px;
}
html { scroll-behavior: smooth; }
body { background:var(--bg); color:var(--text); font-family:'DM Sans',sans-serif; font-weight:300; min-height:100vh; overflow-x:hidden; }

/* NAV */
nav { position:fixed; top:0; left:0; right:0; z-index:100; display:flex; align-items:center; justify-content:space-between; padding:1.2rem 3rem; background:rgba(14,14,14,0.9); backdrop-filter:blur(20px); border-bottom:1px solid var(--border); }
.nav-logo { font-family:'Cormorant Garamond',serif; font-size:1.4rem; font-weight:300; letter-spacing:0.06em; color:var(--text); text-decoration:none; }
.nav-logo .g { color:var(--accent); } .nav-logo .p { color:var(--accent2); }
.nav-links { display:flex; gap:2.2rem; list-style:none; }
.nav-links a { color:var(--text-muted); text-decoration:none; font-size:0.76rem; letter-spacing:0.12em; text-transform:uppercase; transition:color .25s; }
.nav-links a:hover { color:var(--text); }
.nav-soon { opacity:0.28; cursor:default; pointer-events:none; }
.nav-docs { color:var(--iris) !important; opacity:1 !important; pointer-events:auto !important; }
.lang-toggle { display:flex; background:var(--surface2); border-radius:6px; overflow:hidden; border:1px solid var(--border); }
.lang-btn { background:none; border:none; color:var(--text-muted); padding:0.32rem 0.65rem; font-size:0.72rem; cursor:pointer; transition:all .2s; font-family:'DM Sans',sans-serif; }
.lang-btn.active { background:var(--accent); color:#000; font-weight:500; }

/* HERO */
.hero { position:relative; width:100%; height:100vh; display:flex; flex-direction:column; justify-content:flex-end; padding:4rem 3rem; overflow:hidden; }
.hero-img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; filter:brightness(0.5); }
.hero-placeholder { position:absolute; inset:0; background:linear-gradient(145deg,#1a1f2e,#0e1520 40%,#1a2a1a); display:flex; align-items:center; justify-content:center; }
.hero-placeholder-text { font-family:'Cormorant Garamond',serif; color:rgba(255,255,255,0.1); letter-spacing:0.3em; text-transform:uppercase; font-size:1rem; }
.hero-content { position:relative; z-index:2; max-width:680px; }
.hero-brand { font-size:0.7rem; letter-spacing:0.28em; text-transform:uppercase; color:var(--accent); margin-bottom:0.7rem; display:flex; align-items:center; gap:0.6rem; }
.hero-brand::before { content:''; display:block; width:28px; height:1px; background:var(--accent); }
.hero-title { font-family:'Cormorant Garamond',serif; font-size:clamp(2.8rem,6vw,5rem); font-weight:300; line-height:1.1; margin-bottom:1.2rem; }
.hero-title em { font-style:italic; color:var(--accent); }
.hero-desc { font-size:0.9rem; color:rgba(232,228,220,0.65); line-height:1.75; max-width:400px; }
.hero-scroll { position:absolute; bottom:2.5rem; right:3rem; z-index:2; display:flex; flex-direction:column; align-items:center; gap:0.5rem; color:var(--text-muted); font-size:0.68rem; letter-spacing:0.15em; text-transform:uppercase; }
.hero-scroll-line { width:1px; height:48px; background:linear-gradient(to bottom,var(--accent),transparent); animation:sLine 2s ease-in-out infinite; }
@keyframes sLine { 0%,100%{transform:scaleY(1);opacity:1} 50%{transform:scaleY(0.4);opacity:0.3} }

/* COMMON */
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:2.5rem; padding-bottom:1rem; border-bottom:1px solid var(--border); }
.section-title { font-family:'Cormorant Garamond',serif; font-size:1.8rem; font-weight:300; }
.section-meta { color:var(--accent); font-size:0.74rem; letter-spacing:0.1em; cursor:pointer; text-decoration:none; }
.section-meta:hover { opacity:0.8; }

/* TECHRADAR */
.techradar-section { padding:5rem 3rem; background:var(--surface); border-top:1px solid var(--border); }
.techradar-tagline { font-size:0.74rem; color:var(--text-muted); letter-spacing:0.1em; margin-top:0.3rem; }
.techradar-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1.2rem; }
.techradar-card { background:var(--surface2); border-radius:var(--radius); padding:1.6rem; border:1px solid var(--border); transition:border-color .25s,transform .25s; text-decoration:none; display:block; }
.techradar-card:hover { border-color:rgba(126,184,201,0.3); transform:translateY(-3px); }
.techradar-card-head { display:flex; align-items:center; gap:0.7rem; margin-bottom:1rem; }
.techradar-emoji { font-size:1.8rem; line-height:1; }
.techradar-category { font-size:0.63rem; letter-spacing:0.12em; text-transform:uppercase; color:var(--accent2); background:rgba(126,184,201,0.08); padding:0.18rem 0.55rem; border-radius:4px; }
.techradar-title { font-family:'Cormorant Garamond',serif; font-size:1.1rem; line-height:1.35; color:var(--text); margin-bottom:0.6rem; }
.techradar-desc { font-size:0.78rem; color:var(--text-muted); line-height:1.65; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.techradar-meta { font-size:0.67rem; color:var(--text-muted); margin-top:0.8rem; }
@media(max-width:900px){ .techradar-grid { grid-template-columns:1fr; } }

/* GALLERY */
.gallery-section { padding:5rem 3rem; background:var(--bg); }
.gallery-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:1.2rem; }
.gallery-item { position:relative; aspect-ratio:4/3; border-radius:var(--radius); overflow:hidden; cursor:pointer; background:var(--surface); transition:transform .35s; }
.gallery-item:hover { transform:translateY(-4px); }
.gallery-item:hover .gallery-overlay { opacity:1; }
.gallery-item img { width:100%; height:100%; object-fit:cover; transition:transform .4s; display:block; }
.gallery-item:hover img { transform:scale(1.04); }
.gallery-ph { width:100%; height:100%; background:var(--surface2); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0.5rem; }
.gallery-ph-icon { font-size:2rem; opacity:0.22; }
.gallery-ph-label { font-size:0.68rem; letter-spacing:0.14em; color:var(--text-muted); opacity:0.38; text-transform:uppercase; }
.gallery-overlay { position:absolute; inset:0; background:rgba(14,14,14,0.72); display:flex; flex-direction:column; justify-content:flex-end; padding:1.2rem; opacity:0; transition:opacity .3s; }
.gallery-overlay-title { font-family:'Cormorant Garamond',serif; font-size:1.1rem; }
.gallery-overlay-loc { font-size:0.68rem; color:var(--accent); letter-spacing:0.1em; margin-top:0.2rem; }
.upload-hint { text-align:center; padding:1.4rem; color:var(--text-muted); font-size:0.78rem; border:1px dashed var(--border); border-radius:var(--radius); margin-top:1.5rem; line-height:1.8; }
.upload-hint code { color:var(--accent); background:rgba(200,169,110,0.08); padding:0.1rem 0.35rem; border-radius:3px; font-size:0.74rem; }

/* AI TOOLS */
.tools-section { padding:5rem 3rem; background:var(--surface); border-top:1px solid var(--border); }
.tools-intro { color:var(--text-muted); font-size:0.85rem; line-height:1.7; max-width:560px; margin-bottom:2rem; }
.model-row { display:flex; align-items:center; gap:1rem; margin-bottom:1.5rem; flex-wrap:wrap; }
.model-label { font-size:0.72rem; letter-spacing:0.12em; text-transform:uppercase; color:var(--text-muted); }
.model-select { background:var(--surface2); border:1px solid var(--border); color:var(--text); border-radius:8px; padding:0.5rem 2rem 0.5rem 1rem; font-size:0.82rem; font-family:'DM Sans',sans-serif; outline:none; cursor:pointer; transition:border-color .2s; appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7670' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 0.8rem center; }
.model-select:focus { border-color:var(--accent2); }
.m-badge { font-size:0.65rem; padding:0.2rem 0.6rem; border-radius:4px; letter-spacing:0.08em; }
.b-free { background:rgba(168,197,160,0.12); color:#a8c5a0; }
.b-smart { background:rgba(126,184,201,0.12); color:var(--accent2); }
.b-power { background:rgba(200,169,110,0.12); color:var(--accent); }
.tools-chat { background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.tools-msgs { height:320px; overflow-y:auto; padding:1.2rem; display:flex; flex-direction:column; gap:0.8rem; scrollbar-width:thin; }
.tmsg { max-width:85%; padding:0.8rem 1.1rem; border-radius:12px; font-size:0.83rem; line-height:1.6; animation:msgIn .2s ease; white-space:pre-wrap; word-break:break-word; }
@keyframes msgIn { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:translateY(0)} }
.tmsg.bot { background:var(--surface3); align-self:flex-start; border-bottom-left-radius:4px; }
.tmsg.user { background:var(--accent2); color:#0e1520; align-self:flex-end; border-bottom-right-radius:4px; font-weight:400; }
.tmsg.typing { color:var(--text-muted); font-style:italic; }
.tools-sugg { display:flex; flex-wrap:wrap; gap:0.5rem; padding:0.6rem 1.2rem; border-top:1px solid var(--border); }
.sug { background:var(--surface3); border:1px solid var(--border); color:var(--text-muted); border-radius:20px; padding:0.28rem 0.8rem; font-size:0.7rem; cursor:pointer; transition:all .2s; font-family:'DM Sans',sans-serif; }
.sug:hover { border-color:var(--accent2); color:var(--accent2); }
.tools-inp-row { display:flex; gap:0.6rem; padding:0.9rem; border-top:1px solid var(--border); }
.tools-inp { flex:1; background:var(--surface3); border:1px solid var(--border); color:var(--text); border-radius:8px; padding:0.6rem 1rem; font-size:0.83rem; font-family:'DM Sans',sans-serif; outline:none; transition:border-color .2s; resize:none; height:42px; }
.tools-inp:focus { border-color:var(--accent2); }
.tools-inp::placeholder { color:var(--text-muted); }
.tools-send { background:var(--accent2); border:none; color:#0e1520; padding:0 1.2rem; height:42px; border-radius:8px; cursor:pointer; font-size:0.78rem; font-family:'DM Sans',sans-serif; font-weight:500; transition:opacity .2s; white-space:nowrap; }
.tools-send:hover { opacity:0.85; }
.model-info-line { font-size:0.72rem; color:var(--text-muted); margin-top:0.6rem; }

/* NEWS */
.news-section { padding:5rem 3rem; background:var(--bg); border-top:1px solid var(--border); }
.news-status { font-size:0.68rem; color:var(--text-muted); display:flex; align-items:center; gap:0.5rem; }
.news-dot-live { width:6px; height:6px; border-radius:50%; background:#a8c5a0; animation:livePulse 2s ease infinite; }
@keyframes livePulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
.news-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:1.2rem; }
.news-card { background:var(--surface); border-radius:var(--radius); padding:1.5rem; border:1px solid var(--border); transition:border-color .25s,transform .25s; text-decoration:none; display:block; }
.news-card:hover { border-color:rgba(200,169,110,0.25); transform:translateY(-2px); }
.news-tag { display:inline-block; font-size:0.63rem; letter-spacing:0.12em; text-transform:uppercase; color:var(--accent2); background:rgba(126,184,201,0.08); padding:0.18rem 0.55rem; border-radius:4px; margin-bottom:0.8rem; }
.news-title { font-family:'Cormorant Garamond',serif; font-size:1.08rem; line-height:1.4; color:var(--text); margin-bottom:0.6rem; }
.news-desc { font-size:0.78rem; color:var(--text-muted); line-height:1.65; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.news-meta { font-size:0.67rem; color:var(--text-muted); margin-top:1rem; display:flex; align-items:center; gap:0.4rem; }
.news-src { color:var(--accent); }
.news-loading { text-align:center; padding:3rem; color:var(--text-muted); grid-column:1/-1; }
.news-error { text-align:center; padding:2rem; color:var(--text-muted); font-size:0.82rem; grid-column:1/-1; }
.news-error a { color:var(--accent2); text-decoration:none; }
.news-setup { margin-top:1.2rem; padding:1rem 1.2rem; background:rgba(126,184,201,0.05); border:1px solid rgba(126,184,201,0.1); border-radius:8px; font-size:0.76rem; color:var(--text-muted); line-height:1.75; }
.news-setup code { color:var(--accent2); background:rgba(126,184,201,0.08); padding:0.1rem 0.35rem; border-radius:3px; }
.news-setup a { color:var(--accent2); }
.news-tabs { display:flex; gap:0.5rem; margin-bottom:1.5rem; }
.news-tab { background:var(--surface2); border:1px solid var(--border); color:var(--text-muted); border-radius:8px; padding:0.45rem 1.1rem; font-size:0.76rem; letter-spacing:0.06em; cursor:pointer; transition:all .2s; font-family:'DM Sans',sans-serif; }
.news-tab.active { background:rgba(200,169,110,0.1); border-color:rgba(200,169,110,0.35); color:var(--accent); }
.alert-legend { display:flex; flex-wrap:wrap; gap:0.6rem; margin-bottom:1.2rem; }
.alert-key { font-size:0.68rem; padding:0.2rem 0.7rem; border-radius:4px; letter-spacing:0.06em; }
.alert-key-war     { background:rgba(220,80,80,0.1);   color:#e08080; border:1px solid rgba(220,80,80,0.2); }
.alert-key-disaster{ background:rgba(220,150,60,0.1);  color:#e0a060; border:1px solid rgba(220,150,60,0.2); }
.alert-key-border  { background:rgba(126,184,201,0.1); color:var(--accent2); border:1px solid rgba(126,184,201,0.2); }
.alert-key-health  { background:rgba(168,197,160,0.1); color:#a8c5a0; border:1px solid rgba(168,197,160,0.2); }
.news-card.alert-war     { border-left:3px solid rgba(220,80,80,0.5); }
.news-card.alert-disaster{ border-left:3px solid rgba(220,150,60,0.5); }
.news-card.alert-border  { border-left:3px solid rgba(126,184,201,0.5); }
.news-card.alert-health  { border-left:3px solid rgba(168,197,160,0.5); }
.alert-tag-war     { color:#e08080 !important; background:rgba(220,80,80,0.08) !important; }
.alert-tag-disaster{ color:#e0a060 !important; background:rgba(220,150,60,0.08) !important; }
.alert-tag-border  { color:var(--accent2) !important; background:rgba(126,184,201,0.08) !important; }
.alert-tag-health  { color:#a8c5a0 !important; background:rgba(168,197,160,0.08) !important; }

/* GAMES */
.games-section { padding:5rem 3rem; background:var(--surface); border-top:1px solid var(--border); }
.games-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:1.2rem; }
.games-card { border:1px solid var(--border); border-radius:var(--radius); padding:2.2rem 1.8rem; text-align:center; background:var(--surface2); transition:border-color .25s,transform .25s; display:flex; flex-direction:column; align-items:center; }
.games-card:hover { border-color:rgba(200,169,110,0.28); transform:translateY(-3px); }
.games-icon { font-size:2.4rem; margin-bottom:1rem; opacity:0.34; }
.games-t { font-family:'Cormorant Garamond',serif; font-size:1.35rem; color:var(--text-muted); margin-bottom:0.45rem; }
.games-s { font-size:0.75rem; color:var(--text-muted); opacity:0.45; line-height:1.55; }
.pill { display:inline-block; margin-top:1.2rem; font-size:0.63rem; letter-spacing:0.2em; text-transform:uppercase; color:var(--accent); border:1px solid rgba(200,169,110,0.22); padding:0.28rem 0.9rem; border-radius:20px; text-decoration:none; }
.pill:hover { background:rgba(200,169,110,0.06); }
.pill-blue { color:var(--accent2) !important; border-color:rgba(126,184,201,0.28) !important; }
.pill-blue:hover { background:rgba(126,184,201,0.06) !important; }
@media(max-width:600px){ .games-grid { grid-template-columns:1fr; } }

/* FOOTER */
footer { padding:2.2rem 3rem; border-top:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; color:var(--text-muted); font-size:0.74rem; }
.footer-logo { font-family:'Cormorant Garamond',serif; font-size:1rem; letter-spacing:0.06em; }
.fl-g { color:var(--accent); } .fl-p { color:var(--accent2); }
.footer-contacts { display:flex; align-items:center; gap:0.5rem; }
.footer-link { color:var(--text-muted); text-decoration:none; transition:color .2s; }
.footer-link:hover { color:var(--accent); }
.footer-sep { opacity:0.4; }

/* IRIS */
.ai-toggle { position:fixed; bottom:2rem; right:2rem; z-index:200; width:52px; height:52px; border-radius:50%; background:linear-gradient(135deg,var(--iris),#7eb8c9); border:none; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:1.3rem; box-shadow:0 4px 24px rgba(184,159,212,0.38); transition:transform .25s,box-shadow .25s; }
.ai-toggle:hover { transform:scale(1.08); box-shadow:0 6px 30px rgba(184,159,212,0.55); }
.pulse { position:absolute; inset:-4px; border-radius:50%; border:2px solid rgba(184,159,212,0.35); animation:pulse 2.5s ease-out infinite; pointer-events:none; }
@keyframes pulse{0%{transform:scale(1);opacity:1}100%{transform:scale(1.6);opacity:0}}
.ai-panel { position:fixed; bottom:6.4rem; right:2rem; z-index:200; width:340px; max-height:500px; background:var(--surface); border:1px solid rgba(184,159,212,0.15); border-radius:16px; display:flex; flex-direction:column; box-shadow:0 20px 60px rgba(0,0,0,0.55); transform:translateY(20px) scale(0.96); opacity:0; pointer-events:none; transition:all .3s cubic-bezier(0.175,0.885,0.32,1.2); overflow:hidden; }
.ai-panel.open { transform:translateY(0) scale(1); opacity:1; pointer-events:all; }
.ai-header { padding:1rem 1.3rem; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:0.75rem; flex-shrink:0; background:linear-gradient(135deg,rgba(184,159,212,0.06),rgba(126,184,201,0.04)); }
.ai-avatar { width:32px; height:32px; border-radius:50%; background:linear-gradient(135deg,var(--iris),var(--accent2)); display:flex; align-items:center; justify-content:center; font-size:0.95rem; flex-shrink:0; }
.ai-name { font-size:0.83rem; font-weight:500; }
.ai-status { font-size:0.66rem; color:var(--iris); }
.ai-close { margin-left:auto; background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:1rem; padding:0.2rem; transition:color .2s; }
.ai-close:hover { color:var(--text); }
.api-hint { background:rgba(200,169,110,0.07); border-bottom:1px solid rgba(200,169,110,0.12); padding:0.55rem 1rem; font-size:0.7rem; color:var(--accent); text-align:center; display:none; }
.api-hint code { background:rgba(200,169,110,0.12); padding:0.1rem 0.3rem; border-radius:3px; }
.ai-msgs { flex:1; overflow-y:auto; padding:0.9rem; display:flex; flex-direction:column; gap:0.7rem; scrollbar-width:thin; }
.ai-msg { max-width:88%; padding:0.7rem 1rem; border-radius:12px; font-size:0.8rem; line-height:1.55; animation:msgIn .2s ease; }
.ai-msg.bot { background:var(--surface2); color:var(--text); border-bottom-left-radius:4px; align-self:flex-start; }
.ai-msg.user { background:linear-gradient(135deg,var(--iris),var(--accent2)); color:#0e0e0e; border-bottom-right-radius:4px; align-self:flex-end; font-weight:400; }
.ai-msg.typing { color:var(--text-muted); font-style:italic; }
.quick-btns { padding:0.4rem 0.7rem; display:flex; flex-wrap:wrap; gap:0.35rem; flex-shrink:0; }
.qbtn { background:var(--surface2); border:1px solid var(--border); color:var(--text-muted); border-radius:20px; padding:0.26rem 0.72rem; font-size:0.7rem; cursor:pointer; transition:all .2s; font-family:'DM Sans',sans-serif; }
.qbtn:hover { border-color:var(--iris); color:var(--iris); }
.ai-inp-row { display:flex; gap:0.5rem; padding:0.75rem; border-top:1px solid var(--border); flex-shrink:0; }
.ai-inp { flex:1; background:var(--surface2); border:1px solid var(--border); color:var(--text); border-radius:8px; padding:0.5rem 0.85rem; font-size:0.8rem; font-family:'DM Sans',sans-serif; outline:none; transition:border-color .2s; }
.ai-inp:focus { border-color:var(--iris); }
.ai-inp::placeholder { color:var(--text-muted); }
.ai-send { background:linear-gradient(135deg,var(--iris),var(--accent2)); border:none; color:#111; width:34px; height:34px; border-radius:8px; cursor:pointer; font-size:0.88rem; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:opacity .2s; }
.ai-send:hover { opacity:0.85; }

/* LIGHTBOX */
.lightbox { position:fixed; inset:0; z-index:300; background:rgba(0,0,0,0.94); display:flex; align-items:center; justify-content:center; opacity:0; pointer-events:none; transition:opacity .3s; }
.lightbox.open { opacity:1; pointer-events:all; }
.lightbox img { max-width:90vw; max-height:85vh; border-radius:8px; object-fit:contain; }
.lb-close { position:absolute; top:1.5rem; right:2rem; background:none; border:none; color:var(--text); font-size:1.8rem; cursor:pointer; opacity:0.6; transition:opacity .2s; }
.lb-close:hover { opacity:1; }
.lb-cap { position:absolute; bottom:2rem; left:50%; transform:translateX(-50%); font-family:'Cormorant Garamond',serif; font-size:1rem; color:rgba(232,228,220,0.7); white-space:nowrap; }

@media(max-width:768px){
  nav { padding:1rem 1.5rem; }
  .nav-links { display:none; }
  .hero,.gallery-section,.tools-section,.news-section,.games-section,.techradar-section { padding:3.5rem 1.5rem; }
  .hero { padding-top:5rem; }
  .ai-panel { width:calc(100vw - 2rem); right:1rem; }
  footer { flex-direction:column; gap:0.8rem; text-align:center; padding:2rem 1.5rem; }
  .footer-contacts { justify-content:center; }
}
