:root {
  color-scheme: dark;
  --page: #0c0d13;
  --panel: #151620;
  --panel-raised: #191a27;
  --panel-dark: #11121a;
  --border: #28283b;
  --text: #f0efff;
  --muted: #8988bd;
  --purple: #7866ff;
  --green: #41dc91;
  --category-purple: #aaa1ff;
  --category-red: #ff6a87;
  --category-gold: #f2bf4f;
  --category-green: #51d996;
  --category-blue: #79b4ff;
  --font: "Trebuchet MS", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; scroll-padding-top: 85px; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(ellipse at 75% -15%, #28224a 0, transparent 38%), var(--page); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body.dialog-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #a69aff; outline-offset: 3px; }
[hidden] { display: none !important; }

.forum-header { position: sticky; z-index: 20; top: 0; display: flex; height: 74px; align-items: center; gap: 18px; padding: 0 clamp(16px,3vw,40px); border-bottom: 1px solid #302d49; background: #101117f2; box-shadow: 0 8px 28px #05050b50; backdrop-filter: blur(18px); }
.icon-button { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid var(--border); border-radius: 12px; background: #171824; color: var(--text); font-size: 19px; }
.sidebar-toggle { font-size: 17px; }
.forum-brand { display: inline-flex; align-items: center; gap: 11px; font-size: 24px; font-weight: 900; letter-spacing: -.8px; }
.brand-mark { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 11px; background: var(--purple); color: white; font-size: 21px; }
.brand-domain { color: #a79aff; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.button { display: inline-flex; min-height: 41px; align-items: center; justify-content: center; gap: 7px; padding: 0 17px; border: 1px solid transparent; border-radius: 11px; font-size: 12px; font-weight: 800; transition: background .16s, border-color .16s, transform .16s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-accent { background: var(--purple); color: white; }
.button-accent:hover:not(:disabled) { background: #897aff; }
.button-outline { border-color: var(--border); background: transparent; color: #dad8ff; }
.button-outline:hover { border-color: #6f63d8; background: #1b1b2c; }
.button-wide { width: 100%; }
.button:disabled { cursor: wait; opacity: .7; }

.forum-layout { min-height: calc(100vh - 74px); }
.forum-sidebar { position: fixed; z-index: 15; top: 74px; bottom: 0; left: 0; display: flex; width: 266px; flex-direction: column; padding: 19px 16px 21px; overflow-y: auto; border-right: 1px solid #242335; background: #101117; scrollbar-color: #38384b transparent; scrollbar-width: thin; }
.sidebar-main, .sidebar-categories { display: grid; gap: 5px; }
.sidebar-link { display: flex; min-height: 44px; align-items: center; gap: 12px; padding: 0 13px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #aaa9db; text-align: left; font-size: 13px; font-weight: 700; }
.sidebar-link > span:first-child { width: 19px; text-align: center; font-size: 15px; }
.sidebar-link:hover, .sidebar-link.is-active { border-color: #393457; background: #211f37; color: #a79aff; }
.sidebar-divider { height: 1px; margin: 18px 0; background: #262637; }
.sidebar-heading { margin: 0 0 11px; padding-left: 9px; color: #7473a8; font-size: 10px; font-weight: 900; letter-spacing: 1.8px; text-transform: uppercase; }
.sidebar-category { display: flex; min-height: 40px; align-items: center; gap: 10px; padding: 0 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #a5a4ce; text-align: left; font-size: 12px; font-weight: 700; }
.sidebar-category:hover, .sidebar-category.is-active { border-color: #30304a; background: #191a27; }
.sidebar-category-icon { width: 20px; font-size: 15px; text-align: center; }
.sidebar-category-count { display: grid; min-width: 23px; height: 22px; place-items: center; margin-left: auto; padding: 0 6px; border-radius: 20px; background: #212139; color: #9c99e6; font-size: 10px; }
.sidebar-account { margin-top: auto; padding: 17px 9px 0; border-top: 1px solid #252536; }
.sidebar-account .sidebar-heading { display: block; padding: 0; }
.sidebar-account p { margin: 8px 0; color: #8180aa; font-size: 11px; line-height: 1.6; }
.text-action { padding: 0; border: 0; background: transparent; color: #a396ff; font-size: 11px; font-weight: 800; }
.text-action:hover { color: white; }
.sidebar-backdrop { display: none; }

.forum-main { width: min(1120px,calc(100% - 266px)); margin-left: 266px; padding: 39px clamp(20px,4vw,48px) 25px; }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding: 23px; border: 1px solid #302d49; border-radius: 18px; background: radial-gradient(ellipse at 100% 0, #3a2f6d35, transparent 52%), linear-gradient(135deg,#171824,#12131c); box-shadow: 0 14px 36px #05050b30; }
.eyebrow { margin: 0 0 9px; color: #8885cb; font-size: 9px; font-weight: 900; letter-spacing: 1.7px; }
.status-pulse, .online-indicator { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px #41dc9180; }
.welcome-row h1 { margin: 0 0 9px; font-size: clamp(29px,4vw,42px); letter-spacing: -.9px; line-height: 1.1; }
.welcome-row h1 span { color: #9a8cff; }
.welcome-copy { max-width: 700px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.create-topic-button { flex: 0 0 auto; min-height: 43px; }

.games-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.game-card { position: relative; display: flex; min-height: 184px; flex-direction: column; padding: 17px; overflow: hidden; border: 1px solid #27553c; border-radius: 15px; background: linear-gradient(145deg,#102719,#0d1814 80%); box-shadow: 0 12px 30px #05050b30, 0 0 25px #20a65c12; transition: border-color .18s, transform .18s, box-shadow .18s; }
.game-card::after { position: absolute; right: 3px; bottom: -34px; color: #ffffff08; font-size: 106px; font-weight: 900; content: "Z"; }
.game-card:hover { transform: translateY(-3px); border-color: #48885f; box-shadow: 0 16px 34px #05050b50, 0 0 25px #20a65c18; }
.game-cs2 { border-color: #554525; background: linear-gradient(145deg,#252013,#13151c 82%); box-shadow: 0 0 25px #e4a7340b; }
.game-cs2:hover { border-color: #90713a; }
.game-metin { border-color: #552733; background: linear-gradient(145deg,#28151b,#15141c 82%); box-shadow: 0 0 25px #dd43620d; }
.game-metin:hover { border-color: #974253; }
.game-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.game-icon { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #32774d; border-radius: 12px; background: #164328; font-size: 18px; }
.game-cs2 .game-icon { border-color: #77602e; background: #493817; }
.game-metin .game-icon { border-color: #77404b; background: #4a222b; }
.game-live, .game-tag { display: flex; align-items: center; gap: 6px; color: #62d895; font-size: 9px; font-weight: 900; }
.game-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.game-tag { color: #d3a94a; letter-spacing: .5px; }
.game-metin .game-tag { color: #f07287; }
.game-card h2 { position: relative; z-index: 1; margin: 14px 0 5px; font-size: 21px; }
.game-card > p { position: relative; z-index: 1; margin: 0 0 14px; color: #9695b8; font-size: 10px; line-height: 1.6; }
.game-address { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid #ffffff13; color: #65d998; font-size: 10px; font-weight: 800; }
.game-cs2 .game-address { color: #e7bd63; }
.game-metin .game-address { color: #f27b8e; }

.community-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 16px 0 34px; }
.community-strip > div { display: grid; min-height: 70px; align-content: center; justify-items: center; gap: 5px; border: 1px solid var(--border); border-radius: 13px; background: linear-gradient(145deg,#191a27,#13141d); box-shadow: 0 8px 22px #05050b24; }
.community-strip strong { color: #9b8cff; font-size: 21px; }
.community-strip span { color: #8483ae; font-size: 9px; }
.content-section { margin: 27px 0 35px; }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.section-title-row .eyebrow { margin-bottom: 5px; }
.section-title-row h2 { margin: 0; font-size: 21px; letter-spacing: -.3px; }
.category-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.category-card { min-width: 0; min-height: 131px; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(145deg,#191a27,#13141d); box-shadow: 0 8px 22px #05050b24; text-align: left; transition: background .16s, border-color .16s, transform .16s, box-shadow .16s; }
.category-card:hover { transform: translateY(-2px); border-color: #5a5386; background: linear-gradient(145deg,#201f31,#171824); box-shadow: 0 12px 26px #05050b45; }
.category-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.category-icon { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: #212139; font-size: 17px; }
.category-card h3 { margin: 0; font-size: 13px; }
.category-card p { margin: 0 0 11px; color: #8988b6; font-size: 10px; line-height: 1.6; }
.category-count { color: #8e8bc4; font-size: 9px; }
.category-card[data-color="green"] .category-icon { background: #163726; }
.category-card[data-color="gold"] .category-icon { background: #392f1a; }
.category-card[data-color="red"] .category-icon { background: #3a202a; }
.category-card[data-color="blue"] .category-icon { background: #202a3e; }
.loading-state, .empty-state, .error-state { grid-column: 1/-1; margin: 0; padding: 22px 15px; border: 1px solid var(--border); border-radius: 13px; background: var(--panel); color: var(--muted); text-align: center; font-size: 11px; line-height: 1.6; }
.error-state { border-color: #633d48; color: #ffa9b2; }

.topics-heading { align-items: center; margin-bottom: 13px; }
.search-box { display: flex; width: min(240px,45%); min-height: 37px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: #a49dff; }
.search-box > span { font-size: 19px; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 10px; }
.search-box input::placeholder { color: #77769d; }
.thread-list { display: grid; gap: 9px; }
.thread-card { display: grid; grid-template-columns: 39px minmax(0,1fr) auto; gap: 12px; padding: 14px; border: 1px solid #302d49; border-radius: 14px; background: linear-gradient(120deg,#191a27,#14151e); box-shadow: 0 8px 22px #05050b20; transition: border-color .15s, background .15s, transform .15s; }
.thread-card:hover { transform: translateY(-1px); border-color: #5a5386; background: #1b1b2b; }
.thread-avatar { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid #51477f; border-radius: 50%; background: #29243f; color: #b7aaff; font-size: 11px; font-weight: 900; }
.thread-content { min-width: 0; }
.thread-open { display: inline; padding: 0; border: 0; background: transparent; color: var(--text); text-align: left; font-size: 12px; font-weight: 800; line-height: 1.55; }
.thread-open:hover { color: #b6aaff; }
.thread-description { display: -webkit-box; margin: 4px 0 8px; overflow: hidden; color: #8988b5; font-size: 10px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.thread-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #8584ad; font-size: 9px; }
.thread-category { padding: 3px 7px; border: 1px solid #393457; border-radius: 7px; background: #211f37; color: #b1a6ff; }
.thread-stats { display: flex; align-items: center; gap: 10px; align-self: center; color: #9997c6; font-size: 9px; white-space: nowrap; }
.thread-stats span { display: inline-flex; align-items: center; gap: 4px; }

.online-panel { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin: 31px 0; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(135deg,#191a27,#13141d); box-shadow: 0 8px 22px #05050b24; }
.online-panel > div { display: flex; align-items: center; gap: 8px; }
.online-panel .online-indicator { width: 7px; height: 7px; margin: 0; }
.online-panel h2 { margin: 0; font-size: 12px; }
.online-panel > strong { color: #56db97; font-size: 10px; }
.online-panel > p { grid-column: 1/-1; margin: 0; color: #8887b1; text-align: center; font-size: 10px; }
.forum-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; padding: 17px 0 5px; border-top: 1px solid #242335; color: #77769b; font-size: 9px; }
.forum-footer > a, .forum-footer span a { color: #aaa1ff; font-weight: 800; }

.modal-dialog { position: fixed; width: min(510px,calc(100% - 28px)); max-width: 510px; max-height: min(88vh,820px); padding: 28px; overflow-y: auto; border: 1px solid #34324c; border-radius: 18px; background: #151620; color: var(--text); box-shadow: 0 24px 100px #000b; }
.modal-dialog::backdrop { background: #05060bd9; backdrop-filter: blur(5px); }
.modal-dialog h2 { margin: 0 32px 7px 0; font-size: 24px; letter-spacing: -.4px; }
.modal-dialog > .eyebrow { margin: 2px 32px 8px 0; }
.dialog-close-form { position: absolute; top: 13px; right: 13px; }
.dialog-close { width: 34px; height: 34px; font-size: 21px; }
.dialog-description, .dialog-footnote { color: var(--muted); font-size: 10px; line-height: 1.7; }
.dialog-description { margin: 0 0 18px; }
.dialog-footnote { margin: 15px 0 0; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 16px; padding: 4px; border-radius: 10px; background: #202132; }
.auth-tab { min-height: 35px; border: 0; border-radius: 8px; background: transparent; color: #9593bc; font-size: 11px; font-weight: 800; }
.auth-tab.is-active { background: var(--purple); color: white; }
.forum-form { display: grid; gap: 9px; }
.forum-form[hidden] { display: none; }
.forum-form label { margin-top: 3px; color: #d3d1eb; font-size: 10px; font-weight: 700; }
.forum-form input, .forum-form textarea, .forum-form select { width: 100%; min-height: 41px; padding: 10px 11px; border: 1px solid #34354c; border-radius: 9px; outline: none; background: #101119; color: var(--text); font-size: 11px; }
.forum-form textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.forum-form input::placeholder, .forum-form textarea::placeholder { color: #767592; }
.forum-form input:focus, .forum-form textarea:focus, .forum-form select:focus { border-color: #7968f3; }
.forum-form .button { margin-top: 5px; }
.form-message { margin: 0 0 13px; padding: 10px 11px; border: 1px solid #6c3e4b; border-radius: 8px; background: #28151b; color: #ffa8b2; font-size: 10px; line-height: 1.6; }
.form-message[data-state="success"] { border-color: #336647; background: #12281b; color: #76e3a9; }

.thread-dialog { width: min(760px,calc(100% - 24px)); max-width: 760px; padding: 25px; }
.thread-detail-head { padding-right: 38px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.thread-detail-head h2 { margin: 0 0 9px; overflow-wrap: anywhere; }
.thread-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
.thread-posts { display: grid; max-height: 42vh; gap: 9px; margin: 13px 0; padding: 1px 5px 1px 0; overflow-y: auto; }
.thread-post { padding: 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--panel-dark); }
.thread-post-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.thread-post-head strong { color: #ac9fff; font-size: 10px; }
.thread-post-head time { color: #777694; font-size: 8px; }
.thread-post p { margin: 0; color: #d1d0e3; font-size: 11px; line-height: 1.75; overflow-wrap: anywhere; white-space: pre-wrap; }
.thread-reply-form { padding-top: 12px; border-top: 1px solid var(--border); }
.thread-reply-form .form-message { margin-top: 10px; }
.thread-locked-message { margin: 12px 0 0; color: #9291b6; font-size: 10px; line-height: 1.7; }

@media (min-width: 1386px) {
  .forum-main { margin-right: auto; margin-left: calc(266px + (100vw - 266px - 1120px) / 2); }
}
@media (max-width: 1040px) {
  .forum-sidebar { width: 234px; }
  .forum-main { width: calc(100% - 234px); margin-left: 234px; padding-right: 24px; padding-left: 24px; }
  .games-grid { gap: 9px; }
  .game-card { padding: 13px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 72px; }
  .forum-header { height: 66px; gap: 11px; padding: 0 14px; }
  .forum-brand { gap: 8px; font-size: 19px; }
  .brand-mark { width: 31px; height: 31px; font-size: 18px; }
  .icon-button { width: 38px; height: 38px; }
  .header-actions { gap: 7px; }
  .button { min-height: 37px; padding-right: 11px; padding-left: 11px; font-size: 10px; }
  .forum-sidebar { z-index: 31; top: 66px; width: min(290px,84vw); transform: translateX(-105%); transition: transform .2s ease; }
  .forum-sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop:not([hidden]) { position: fixed; z-index: 30; inset: 66px 0 0; display: block; background: #05060bbb; }
  .forum-main { width: 100%; margin-left: 0; padding: 27px 18px 22px; }
  .welcome-row { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 17px; padding: 18px; }
  .welcome-row h1 { font-size: 34px; }
  .create-topic-button { min-height: 39px; }
  .games-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .game-card { min-height: 168px; padding: 14px; }
  .game-card h2 { font-size: 18px; }
  .game-card > p { font-size: 10px; }
  .community-strip { gap: 7px; margin-top: 13px; }
  .community-strip > div { min-height: 62px; }
  .community-strip strong { font-size: 18px; }
  .category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .category-card { min-height: 126px; }
}
@media (max-width: 440px) {
  .forum-header { gap: 8px; padding: 0 10px; }
  .forum-brand { gap: 6px; font-size: 17px; }
  .header-actions { gap: 5px; }
  .header-actions .button { min-height: 34px; padding: 0 8px; font-size: 9px; }
  .forum-main { padding-right: 14px; padding-left: 14px; }
  .welcome-row { padding: 16px; }
  .welcome-row h1 { font-size: 30px; }
  .welcome-copy { font-size: 11px; }
  .community-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .section-title-row h2 { font-size: 19px; }
  .search-box { width: min(190px,52%); }
  .games-grid, .category-grid { grid-template-columns: 1fr; }
  .game-card { min-height: 154px; }
  .category-card { min-height: 116px; }
  .thread-card { grid-template-columns: 33px minmax(0,1fr); gap: 9px; padding: 11px; }
  .thread-avatar { width: 32px; height: 32px; font-size: 9px; }
  .thread-open { font-size: 11px; }
  .thread-stats { grid-column: 2; justify-self: start; }
  .modal-dialog { padding: 22px 17px; }
  .thread-dialog { padding: 20px 14px; }
  .thread-dialog .dialog-close-form { top: 8px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
