*{ box-sizing:border-box; }
:root{
  --bg:#0b0806;
  --panel:#140e09;
  --panel2:#1a120c;
  --card:#2a1d13;
  --card2:#23170f;
  --accent:#caa35a;
  --accent2:#e7c96a;
  --text:#eadfce;
  --muted:#b7a991;
  --danger:#6d2b2b;
  --success:#1f3b2a;
  --border:rgba(255,230,200,.10);
  --border2:rgba(255,230,200,.06);
}

body{
  margin:0;
  font-family:system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
}
a{ color:inherit; }

.wrap{
  max-width:1200px;
  margin:0 auto;
  padding:14px;
}

/* HEADER */
.site-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  background:var(--panel2);
  border-radius:16px;
}

.nav-left,.nav-right{
  display:flex;
  gap:10px;
  min-width:280px;
}

.nav-center{
  display:flex;
  justify-content:center;
  flex:1;
}

.brand-home img{
  height:72px;
  width:auto;
  display:block;
  filter:drop-shadow(0 8px 18px rgba(0,0,0,.35));
}

.nav-btn{
  display:inline-block;
  padding:10px 14px;
  border-radius:12px;
  text-decoration:none;
  font-weight:700;
  background:var(--card);
  border:1px solid var(--border);
}
.nav-btn:hover{ transform:translateY(-1px); }

/* TOPBAR */
.topbar{
  margin-top:12px;
  padding:10px 14px;
  background:var(--panel);
  border-radius:14px;
  border:1px solid var(--border2);
}
.pill{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  background:var(--card2);
  margin-right:8px;
}
.pill-link{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  background:var(--card2);
  text-decoration:none;
  margin-right:8px;
}

/* LAYOUT */
.page-wrap{
  display:flex;
  gap:18px;
  align-items:flex-start;
  margin-top:16px;
}
.page-main{
  flex:1;
  min-width:0;
}
.page-side{
  width:360px;
}
@media (max-width: 980px){
  .page-wrap{ flex-direction:column; }
  .page-side{ width:100%; }
  .nav-left,.nav-right{ min-width:auto; }
}

/* CARDS */
.page-title{ margin:6px 0 14px; }
.card{
  padding:14px;
  border-radius:16px;
  background:var(--panel2);
  border:1px solid var(--border2);
}
.card-title{ margin:0 0 10px; }
.mini-card{
  padding:12px;
  border-radius:14px;
  background:var(--panel);
  border:1px solid var(--border2);
}

.spacer{ height:14px; }

/* GRID */
.grid2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
@media (max-width: 700px){
  .grid2{ grid-template-columns:1fr; }
}

/* FORM */
.label{ display:block; margin:10px 0 6px; font-weight:700; }
.input{
  width:100%;
  padding:11px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:var(--panel);
  color:var(--text);
  outline:none;
}
.input:focus{ border-color: rgba(140,180,255,.55); }

.btn{
  display:inline-block;
  padding:10px 14px;
  border-radius:12px;
  text-decoration:none;
  font-weight:800;
  background:var(--accent);
  border:1px solid rgba(255,255,255,.10);
  cursor:pointer;
}
.btn:hover{ transform:translateY(-1px); }
.btn.ghost{ background:transparent; }
.btn.danger{ background:#6d2b2b; }

.action-row{ display:flex; gap:10px; flex-wrap:wrap; }

/* ALERT */
.alert{
  padding:10px 12px;
  border-radius:12px;
  background:#3b2a2a;
  border:1px solid rgba(255,255,255,.10);
  margin-bottom:10px;
}
.alert.ok{
  background:#1f3b2a;
}

/* USER KV */
.kv{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-radius:12px;
  background:var(--panel);
  border:1px solid var(--border2);
  margin-top:10px;
}

/* RANKLIST */
.rank-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:8px 10px;
  border-radius:12px;
  margin-top:8px;
  background:var(--panel);
  border:1px solid var(--border2);
}
.rank-left{ display:flex; align-items:center; gap:8px; }
.rank-num{
  width:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  font-size:16px;
}
.rank-name{ font-weight:800; }
.rank-val{ font-weight:900; opacity:.9; }

.rank-hero{
  font-size:1.04em;
  border-color: rgba(255,215,0,.18);
}
.rank-top3{
  border-color: rgba(120,170,255,.18);
}

.emp-flag{
  width:34px;
  height:21px;
  object-fit:cover;
  border-radius:5px;
  display:block;
}

/* TABLE */
.table{
  width:100%;
  border-collapse:collapse;
}
.table th, .table td{
  text-align:left;
  padding:10px 10px;
  border-bottom:1px solid var(--border2);
}
.pager{
  display:flex;
  gap:10px;
  margin-top:12px;
}

/* MENU */
.menu-col{ display:flex; flex-direction:column; gap:8px; }
.menu-link{
  padding:10px 12px;
  border-radius:12px;
  background:var(--panel);
  border:1px solid var(--border2);
  text-decoration:none;
  font-weight:800;
}
.menu-link.danger{ background:#2a1717; }

/* FOOTER */
.site-footer{
  margin-top:18px;
  padding:14px 16px;
  border-radius:16px;
  background:var(--panel);
  border:1px solid var(--border2);
  opacity:.9;
}


/* GRID CARDS */
.grid-cards{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px; }
@media (max-width: 980px){ .grid-cards{ grid-template-columns:1fr; } }



/* Top10 tabs */
.card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.tabs{
  display:flex;
  gap:8px;
}
.tab-btn{
  padding:6px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background:var(--panel);
  color:var(--text);
  cursor:pointer;
  font-weight:700;
  font-size:12px;
}
.tab-btn.is-active{
  border-color: rgba(120,170,255,.30);
  background:var(--card2);
}
.tab-panel{ display:none; }
.tab-panel.is-active{ display:block; }

.rank-text{
  display:flex;
  flex-direction:column;
  line-height:1.15;
}
.rank-name{ font-weight:500; } /* normal for 4-10 */
.rank-sub{
  font-size:12px;
  opacity:.75;
  margin-top:2px;
}
.rank-top3 .rank-name,
.rank-hero .rank-name{
  font-weight:800;
}

.rank-gold{
  border: 2px solid var(--accent2) !important;
  box-shadow: 0 0 14px rgba(255,215,0,.55);
  background: linear-gradient(180deg, rgba(255,215,0,.08), rgba(15,18,32,1));
}

.rank-silver{
  border: 2px solid var(--muted) !important;
  box-shadow: 0 0 12px rgba(192,192,192,.45);
  background: linear-gradient(180deg, rgba(192,192,192,.07), rgba(15,18,32,1));
}

.rank-bronze{
  border: 2px solid var(--accent) !important;
  box-shadow: 0 0 12px rgba(205,127,50,.45);
  background: linear-gradient(180deg, rgba(205,127,50,.07), rgba(15,18,32,1));
}

.rank-hero{
  padding-top:10px;
  padding-bottom:10px;
}


.alert.success{border:1px solid rgba(0,0,0,.15);}
.muted{opacity:.75; font-size: 12px;}


/* Global Ranklist page */
.ranklist-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px;}
.ranklist-tabs{display:flex;gap:8px;flex-wrap:wrap;}
.ranklist-search{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.ranklist-search input[type="text"]{padding:8px 10px;border-radius:10px;border:1px solid rgba(255,230,200,.14);background:rgba(0,0,0,.15);color:var(--text);min-width:220px;}
.rank-num{font-weight:700;}
.rank-name{font-weight:inherit;}
.rank-sub{opacity:.8;font-size:.85em;margin-top:2px;}
.rank-right{font-weight:700;}
.rank-bold .rank-name{font-weight:700;}
.rank-hero .rank-name{font-size:1.05em;}


/* --- Simple rich text editor --- */
.editor { border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; overflow: hidden; background: rgba(0,0,0,0.2); }
.editor-toolbar { display:flex; gap:8px; flex-wrap:wrap; padding:10px; border-bottom: 1px solid rgba(255,255,255,0.10); background: rgba(0,0,0,0.25); }
.editor-toolbar .btn.small { padding: 6px 10px; font-size: 13px; }
.editor-sep { width: 1px; background: rgba(255,255,255,0.12); margin: 0 6px; }
.editor-area { min-height: 220px; padding: 12px; outline: none; line-height: 1.55; }
.editor-area:empty:before { content: "Írd ide a hírt..."; opacity: .55; }
.news-body p { margin: 0 0 10px 0; }
.news-body ul, .news-body ol { padding-left: 20px; }


/* NEWS FEED (Facebook-like posts) */
.news-feed{
  max-width: 820px;
  margin: 0 auto;
}
.post{
  padding:14px;
  border-radius:16px;
  background:var(--panel2);
  border:1px solid var(--border2);
}
.post-header{
  display:flex;
  gap:12px;
  align-items:center;
}
.avatar{
  width:44px;
  height:44px;
  border-radius:999px;
  background:var(--card);
  border:1px solid rgba(255,255,255,.10);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
}
.post-meta{ line-height:1.2; }
.post-author{ font-weight:800; }
.post-sub{ font-size:13px; opacity:.75; margin-top:2px; }

.post-title{
  margin-top:12px;
  font-size:18px;
  font-weight:900;
}
.post-body{
  margin-top:10px;
  line-height:1.55;
}
.post-body p{ margin: 0 0 10px 0; }
.post-body a{
  color:var(--accent);
  text-decoration:underline;
}
.post-footer{
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid var(--border2);
}
.post-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.post-action{
  padding:8px 10px;
  border-radius:12px;
  background:var(--panel);
  border:1px solid var(--border2);
  font-weight:800;
  user-select:none;
}
.post-hint{ margin-top:8px; font-size:13px; }



/* Reactions + comments */
.post-reactions-summary{
  margin-top:10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  font-size:13px;
}
.rx-badges{ display:flex; gap:8px; flex-wrap:wrap; }
.rx-badge{
  padding:6px 10px;
  border-radius:999px;
  background:var(--panel);
  border:1px solid var(--border2);
  font-weight:800;
}

.rx-form{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.post-action{
  cursor:pointer;
}
button.post-action{
  color:inherit;
  font:inherit;
  outline:none;
}
button.post-action:hover{
  border-color: rgba(255,255,255,.16);
}
.post-action.active{
  background:var(--card);
  border-color: rgba(159,178,255,.35);
}

.comment-section{
  margin-top:12px;
  width:100%;
}
.comment-list{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.comment{
  background:var(--panel);
  border:1px solid var(--border2);
  border-radius:14px;
  padding:10px 12px;
}
.comment-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:13px;
}
.comment-author{
  font-weight:900;
}
.comment-body{
  margin-top:6px;
  line-height:1.45;
  font-size:14px;
}
.comment-form{
  margin-top:10px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.comment-input{
  flex:1;
  min-width:240px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--bg);
  color:var(--text);
}
.comment-input:focus{
  outline:none;
  border-color: rgba(159,178,255,.35);
}

/* News images */
.post-image-wrap{
  margin-top:12px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--border2);
  background:var(--panel);
}
.post-image{
  width:100%;
  max-height:520px;
  object-fit:cover;
  display:block;
}

/* Collapsible comments + new badge */
details.comments{
  width:100%;
}
.comments-summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  user-select:none;
}
details.comments > summary::-webkit-details-marker{ display:none; }
.comments-title{ font-weight:900; }
.comments-new{
  padding:2px 8px;
  border-radius:999px;
  background:var(--card);
  border:1px solid rgba(159,178,255,.25);
  font-size:12px;
  font-weight:900;
}

.comment-delete{
  margin-left:auto;
}
.btn.tiny{
  padding:6px 10px;
  border-radius:12px;
  font-size:12px;
}


/* Characters: job icons */
.job-cell{display:flex; align-items:center; gap:10px;}
.job-icon{width:28px; height:28px; object-fit:contain; filter:drop-shadow(0 6px 10px rgba(0,0,0,.35));}


/* Language selector */
.lang-form{
  display:flex;
  align-items:center;
}
.lang-form select{
  height:34px;
  padding:0 10px;
  border-radius:10px;
  border:1px solid rgba(255,230,200,.20);
  background:var(--border2);
  color:var(--text);
}
.lang-form option{
  color:#000;
}
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}


.post-image{width:100%;height:auto;display:block;}
