/* KRAKEN — colors taken from the logo: deep sea navy, gold frame, red banner, copper eyes. */
:root {
  --bg: #060b16;
  --bg-2: #0a1424;
  --panel: #0e1b2e;
  --panel-2: #12233a;
  --line: #1f3350;
  --line-gold: rgba(224, 169, 59, .35);
  --gold: #e0a93b;
  --gold-2: #f6d27a;
  --red: #b3202a;
  --copper: #ff8a2b;
  --sea: #2c7fbf;
  --text: #d6deea;
  --muted: #8a9bb3;
  --ok: #37d67a;
  --font-title: 'Cinzel', 'Cairo', serif;
  --font-body: 'Rajdhani', 'Cairo', sans-serif;
}
html[dir="rtl"] { --font-title: 'Cairo', sans-serif; --font-body: 'Cairo', sans-serif; }

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
main { flex: 1; }
a { color: var(--gold); text-decoration: none; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 520px; }
.center { text-align: center; }

/* Top bar */
.topbar { background: #04080f; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
html[dir="rtl"] .topbar { text-transform: none; letter-spacing: 0; }
.topbar-in { display: flex; align-items: center; gap: 24px; min-height: 38px; flex-wrap: wrap; }
.topbar b { font-weight: 700; }
.st-on { color: var(--ok); }
.st-off { color: #ff5a5a; }
.clock { color: var(--gold); font-variant-numeric: tabular-nums; }
.grow { flex: 1; }
.lang-switch { background: transparent; border: 1px solid var(--line); color: var(--text); padding: 4px 14px; border-radius: 4px; cursor: pointer; font-family: 'Cairo', sans-serif; font-size: 13px; }
.lang-switch:hover { border-color: var(--gold); color: var(--gold); }

/* Navbar */
.navbar { background: rgba(6, 11, 22, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.nav-in { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Cinzel', serif; font-weight: 900; font-size: 22px; letter-spacing: 3px; color: var(--gold); }
.brand img { filter: drop-shadow(0 0 6px rgba(224, 169, 59, .4)); }
.nav-menu { display: flex; list-style: none; gap: 6px; flex-wrap: wrap; }
.nav-menu a { display: block; padding: 8px 14px; color: var(--muted); font-family: var(--font-title); font-weight: 700; font-size: 14px; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav-menu a:hover { color: var(--text); }
.nav-menu a.active { color: var(--gold); border-bottom-color: var(--gold); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 26px; border-radius: 6px; font-family: var(--font-title); font-weight: 700; font-size: 15px; cursor: pointer; border: 1px solid transparent; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn.gold { background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, #b9822a); color: #1a1004; border-color: #ffe39a; box-shadow: 0 6px 20px rgba(224, 169, 59, .25); }
.btn.outline { background: rgba(6, 11, 22, .5); color: var(--text); border-color: var(--line-gold); }
.btn.outline:hover { border-color: var(--gold); color: var(--gold); }
.btn.big { padding: 16px 28px; }
.btn.full, .dl-btn.full { width: 100%; }

.dl-btn { display: inline-flex; align-items: center; gap: 14px; padding: 12px 26px 12px 14px; border-radius: 8px; color: #fff; background: linear-gradient(135deg, #1d5f99, #123d66); border: 1px solid #4e9be0; box-shadow: 0 0 0 1px rgba(224, 169, 59, .45) inset, 0 10px 30px rgba(44, 127, 191, .35); transition: transform .2s, box-shadow .2s; }
html[dir="rtl"] .dl-btn { padding: 12px 14px 12px 26px; }
.dl-btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(224, 169, 59, .7) inset, 0 14px 36px rgba(44, 127, 191, .5); }
.dl-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #1a1004; background: radial-gradient(circle at 35% 30%, var(--gold-2), var(--gold) 60%, #9c6b1f); }
.dl-btn b { display: block; font-family: var(--font-title); font-size: 18px; letter-spacing: 1px; }
.dl-btn small { display: block; color: #b7cde6; font-size: 13px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 72px; border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 70% 40%, rgba(44, 127, 191, .28), transparent 55%), radial-gradient(ellipse at 15% 90%, rgba(179, 32, 42, .18), transparent 50%), linear-gradient(180deg, var(--bg-2), var(--bg)); }
.hero.small { padding: 48px 0; }
.hero-sea { position: absolute; inset: auto -10% -2px -10%; height: 140px; opacity: .5; pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, rgba(44, 127, 191, .35), transparent 70%); animation: sea 9s ease-in-out infinite alternate; }
.hero-in { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 32px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(6, 11, 22, .6); font-size: 14px; color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 2s ease-in-out infinite; }
.online-big { margin: 22px 0 10px; }
.online-num { font-family: 'Cinzel', serif; font-weight: 900; font-size: 84px; line-height: 1; color: var(--gold-2); text-shadow: 0 0 24px rgba(224, 169, 59, .45); font-variant-numeric: tabular-nums; }
.online-lbl { font-family: var(--font-title); color: var(--muted); letter-spacing: 3px; text-transform: uppercase; font-size: 15px; }
html[dir="rtl"] .online-lbl { letter-spacing: 0; }
.hero-text { color: var(--muted); font-size: 18px; max-width: 520px; margin-bottom: 26px; }
.hero.small .hero-text { margin: 8px auto 0; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.page-title { font-family: var(--font-title); font-size: 40px; color: var(--gold); text-shadow: 0 0 20px rgba(224, 169, 59, .3); }

/* Animated logo */
.hero-logo { position: relative; display: grid; place-items: center; }
.logo-glow { position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(44, 127, 191, .45), rgba(44, 127, 191, 0) 65%); filter: blur(10px); animation: glow 5s ease-in-out infinite; }
.logo-float { position: relative; width: min(470px, 100%); animation: logo-in 1.4s cubic-bezier(.2, .8, .2, 1) both, float 6s ease-in-out 1.4s infinite; }
.logo-img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .6)); }
.logo-shine { position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url('../images/logo.webp') center / 100% 100% no-repeat; mask: url('../images/logo.webp') center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 244, 210, .6) 50%, transparent 58%); background-size: 300% 100%; background-position: 150% 0;
  mix-blend-mode: screen; animation: shine 7s ease-in-out 2s infinite; }
.eye { position: absolute; top: 24.8%; width: 7%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(circle, rgba(255, 200, 90, .95), rgba(255, 120, 30, .55) 35%, rgba(255, 90, 0, 0) 70%); mix-blend-mode: screen; animation: eyes 4s ease-in-out infinite; }
.eye-l { left: 45.3%; }
.eye-r { left: 54.0%; }

/* Full-width kraken art behind the hero text */
.hero-art { padding: 0; min-height: clamp(520px, 44vw, 760px); display: flex; align-items: center; background: var(--bg); }
.hero-art .hero-in { grid-template-columns: minmax(0, 560px); padding-top: 48px; padding-bottom: 90px; }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-img, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 78% 35%; }
.hero-video { opacity: 0; transition: opacity 1s ease; }
.hero-video.playing { opacity: 1; }
html[dir="rtl"] .hero-img, html[dir="rtl"] .hero-video { transform: scaleX(-1); }
.hero-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 11, 22, .92) 0%, rgba(6, 11, 22, .7) 32%, rgba(6, 11, 22, 0) 62%),
              linear-gradient(180deg, rgba(6, 11, 22, .35) 0%, rgba(6, 11, 22, 0) 25%, rgba(6, 11, 22, 0) 70%, var(--bg) 100%); }
html[dir="rtl"] .hero-shade {
  background: linear-gradient(270deg, rgba(6, 11, 22, .92) 0%, rgba(6, 11, 22, .7) 32%, rgba(6, 11, 22, 0) 62%),
              linear-gradient(180deg, rgba(6, 11, 22, .35) 0%, rgba(6, 11, 22, 0) 25%, rgba(6, 11, 22, 0) 70%, var(--bg) 100%); }
.hero-art .hero-text { color: #c3cfde; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
.hero-logo-sm { position: relative; width: 170px; margin-bottom: 14px; animation: logo-in 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.hero-logo-sm img { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .7)); }

/* Panels */
.grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; margin-top: -36px; margin-bottom: 48px; position: relative; }
.col-main, .col-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.panel { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-gold); border-radius: 10px; padding: 20px; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.wrap.narrow .panel, .wrap > .panel.guide { margin: -28px 0 48px; position: relative; }
.panel-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-family: var(--font-title); font-size: 18px; color: var(--text); }
.panel-head small { color: var(--muted); font-size: 13px; }
.panel-ico { width: 42px; height: 42px; flex: none; border-radius: 8px; display: grid; place-items: center; font-size: 20px; border: 1px solid var(--line-gold); background: rgba(224, 169, 59, .08); color: var(--gold); }
.panel-ico.discord { background: #5865f2; border-color: #7983f5; color: #fff; }
.panel-ico.fb { background: #1877f2; border-color: #4b95f5; color: #fff; font-weight: 800; font-family: Arial, sans-serif; }
.panel p { margin-bottom: 12px; }
.soon { color: var(--muted); text-align: center; padding: 26px 8px; border: 1px dashed var(--line); border-radius: 8px; }

.news { list-style: none; }
.news li { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.news li:last-child { border-bottom: 0; }
.news-title { flex: 1; font-weight: 600; font-size: 16px; }
.news time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.tag { flex: none; min-width: 64px; text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 3px 8px; border-radius: 4px; border: 1px solid; }
.tag-update { color: #6fb3ff; border-color: #2c5f99; background: rgba(44, 127, 191, .12); }
.tag-event { color: var(--gold); border-color: #8a6420; background: rgba(224, 169, 59, .1); }
.tag-news { color: #ff7b84; border-color: #7a1d24; background: rgba(179, 32, 42, .15); }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.info-grid > div { padding: 12px 6px; border-bottom: 1px solid var(--line); }
.info-grid small { display: block; color: var(--muted); font-size: 13px; }
.info-grid b { font-size: 20px; color: var(--text); }

.embed { width: 100%; border: 0; border-radius: 8px; background: var(--bg-2); display: block; }
.discord-btn { margin-top: 12px; background: #5865f2; color: #fff; }

/* Guide */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px 16px; font-family: var(--font-title); font-weight: 700; font-size: 15px; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-body { display: none; }
.tab-body.active { display: block; }
.tab-body h3 { font-family: var(--font-title); color: var(--gold); margin-bottom: 12px; }
.guide-list { padding-inline-start: 20px; }
.guide-list li { margin-bottom: 10px; }

/* Forms */
label { display: block; font-family: var(--font-title); font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
.input { width: 100%; background: var(--bg); border: 1px solid var(--line); padding: 12px; border-radius: 6px; color: #fff; font-family: inherit; font-size: 16px; }
.input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(224, 169, 59, .15); }
.hint { font-size: 13px; color: var(--muted); margin: 10px 0 6px; }
.form .btn { margin-top: 8px; }
.alert { padding: 12px; border-radius: 6px; margin-bottom: 14px; text-align: center; }
.alert.ok { background: rgba(55, 214, 122, .1); border: 1px solid var(--ok); color: var(--ok); }
.alert.bad { background: rgba(179, 32, 42, .15); border: 1px solid var(--red); color: #ff8a92; }

.footer { border-top: 1px solid var(--line-gold); color: var(--muted); font-size: 13px; background: #04080f; }
.footer-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding: 28px 16px 18px; }
.foot-block h4 { font-family: var(--font-title); color: var(--gold); font-size: 15px; margin-bottom: 12px; }
.vote-row, .social-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.vote-btn { padding: 8px 16px; border-radius: 6px; border: 1px solid var(--line-gold); color: var(--gold-2); background: rgba(224, 169, 59, .06); font-weight: 700; }
.vote-btn:hover { background: rgba(224, 169, 59, .16); }
.social { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; color: #fff; transition: transform .2s; }
.social:hover { transform: translateY(-2px); }
.social.facebook { background: #1877f2; } .social.youtube { background: #ff0000; } .social.discord { background: #5865f2; } .social.tiktok { background: #111; border: 1px solid #333; }
.foot-soon { color: var(--muted); font-size: 13px; }
.copy { text-align: center; padding: 14px 16px; border-top: 1px solid var(--line); }

/* Events page */
.tabs.days .tab { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.tabs.days .tab small { font-family: var(--font-body); font-weight: 400; font-size: 12px; color: var(--muted); }
.ev-next { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 18px; border-radius: 8px; border: 1px solid var(--line-gold); background: rgba(224, 169, 59, .07); font-size: 17px; }
.ev-next b { color: var(--gold-2); }
.ev-next em { font-style: normal; color: var(--ok); font-weight: 700; }
.ev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.ev-head { font-family: var(--font-title); color: var(--gold); font-size: 17px; margin: 6px 0 10px; }
.ev-list { list-style: none; margin-bottom: 18px; }
.ev-list li { display: flex; align-items: center; gap: 14px; padding: 9px 6px; border-bottom: 1px solid var(--line); }
.ev-list time { font-variant-numeric: tabular-nums; color: var(--gold-2); font-weight: 700; min-width: 50px; }
.ev-list time.wide { margin-inline-start: auto; color: var(--muted); font-weight: 600; text-align: end; }
.ev-list span { flex: 1; }
.ev-list em { font-style: normal; font-size: 13px; color: var(--ok); }
.ev-list li.past { opacity: .4; }
.ev-list li.next { background: rgba(224, 169, 59, .08); border-radius: 6px; }
.ev-list.hourly { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
.ev-list.hourly li { gap: 10px; font-size: 15px; }
.ev-list.hourly em { display: none; }
@media (max-width: 760px) { .ev-grid { grid-template-columns: 1fr; } .tabs.days .tab { padding: 8px 10px; } }

/* Language popup */
.lang-modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 16px; background: rgba(2, 5, 10, .85); backdrop-filter: blur(4px); }
.lang-modal.show { display: grid; }
.lang-card { width: 100%; max-width: 420px; text-align: center; padding: 28px 24px; border-radius: 14px; border: 1px solid var(--line-gold); background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: 0 20px 60px rgba(0, 0, 0, .7); animation: logo-in .5s ease both; }
.lang-logo { width: 150px; height: auto; margin-bottom: 8px; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .6)); }
.lang-card h2 { font-family: 'Cinzel', serif; font-size: 20px; color: var(--gold); }
.lang-card h2.ar { font-family: 'Cairo', sans-serif; margin-bottom: 20px; }
.lang-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lang-btns .btn[data-lang="ar"] { font-family: 'Cairo', sans-serif; }
.lang-btns .btn[data-lang="en"] { font-family: 'Cinzel', serif; }

/* Animations */
@keyframes logo-in { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes glow { 0%, 100% { opacity: .55; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes shine { 0% { background-position: 150% 0; } 35%, 100% { background-position: -50% 0; } }
@keyframes eyes { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes sea { from { transform: translateX(-3%); } to { transform: translateX(3%); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Phones and tablets */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; text-align: center; }
  .hero-art .hero-in { grid-template-columns: 1fr; }
  .hero-logo-sm { margin-left: auto; margin-right: auto; }
  .hero-shade, html[dir="rtl"] .hero-shade { background: linear-gradient(180deg, rgba(6, 11, 22, .45) 0%, rgba(6, 11, 22, .75) 55%, var(--bg) 100%); }
  .hero-text { margin-left: auto; margin-right: auto; }
  .hero-btns { justify-content: center; }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-in { flex-direction: column; padding: 10px 0; min-height: 0; }
  .nav-menu { justify-content: center; }
  .nav-menu a { padding: 6px 10px; font-size: 13px; }
  .online-num { font-size: 60px; }
  .page-title { font-size: 30px; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .news li { flex-wrap: wrap; gap: 8px; }
  .news time { width: 100%; }
}
