body.xox-ui {
  --xox-bg: #f3f4f6;
  --xox-bg-strong: #e2e5ea;
  --xox-card: #ffffff;
  --xox-ink: #1f2933;
  --xox-muted: #667085;
  --xox-accent: #2b7a78;
  --xox-accent-soft: #d9f1ef;
  --xox-line: #cdd6e1;
  --xox-shadow: 0 22px 50px rgba(18, 25, 38, 0.12);
  --xox-radius: 18px;

  --bg: var(--xox-bg);
  --bg-2: var(--xox-bg-strong);
  --card: var(--xox-card);
  --text: var(--xox-ink);
  --muted: var(--xox-muted);
  --line: var(--xox-line);
  --accent: var(--xox-accent);
  --good: var(--xox-accent);
  --warn: #b45309;
  --bad: #b91c1c;
  --btn: var(--xox-ink);
  --btn2: #2f3b4a;
}

body.xox-ui {
  font-family: "Futura", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, #ffffff 0%, #f2f4f8 40%, #e1e6ec 100%),
    linear-gradient(135deg, #fafafa 0%, #f3f4f6 60%, #e7ecf2 100%);
}

body.xox-ui {
  text-align: left !important;
  padding: 32px 16px 48px;
}

body.xox-ui::before {
  background:
    radial-gradient(500px 360px at 10% 10%, rgba(43, 122, 120, 0.12), transparent 60%),
    radial-gradient(520px 380px at 90% 0%, rgba(31, 41, 51, 0.08), transparent 65%);
  opacity: 0.45;
}

body.xox-ui .card,
body.xox-ui .topbar,
body.xox-ui .app-header,
body.xox-ui .app-nav,
body.xox-ui .board-card,
body.xox-ui .side,
body.xox-ui .modal-card,
body.xox-ui .rt-drawer,
body.xox-ui .rt-panel,
body.xox-ui .side-panel,
body.xox-ui .tutorial-card {
  background: var(--xox-card) !important;
  border: 1px solid var(--xox-line) !important;
  border-radius: var(--xox-radius) !important;
  box-shadow: var(--xox-shadow) !important;
  backdrop-filter: none !important;
  color: var(--xox-ink);
}

body.xox-ui .xox-shell {
  width: min(96vw, 1100px);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--xox-card);
  border: 1px solid var(--xox-line);
  border-radius: var(--xox-radius);
  box-shadow: var(--xox-shadow);
}

body.xox-ui .topbar {
  margin: 0;
  padding: 0;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.xox-ui .brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

body.xox-ui .logo {
  display: none;
}

body.xox-ui .home-btn {
  padding: 0;
  min-height: auto;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--xox-muted) !important;
}

body.xox-ui .home-btn:hover {
  color: var(--xox-ink) !important;
}

body.xox-ui .home-text {
  font-size: 12px;
  font-weight: 600;
}

body.xox-ui .topbar .title {
  font-size: 26px;
  letter-spacing: 0.12em;
}

body.xox-ui .topbar .subtitle {
  font-size: 13px;
  color: var(--xox-muted) !important;
}

body.xox-ui .top-actions .pill {
  font-size: 12px;
}

body.xox-ui .layout {
  margin: 0;
  gap: 16px;
  display: flex;
  flex-direction: column !important;
  align-items: stretch;
}

body.xox-ui .layout > .card,
body.xox-ui .side {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.xox-ui .side {
  width: 100% !important;
  order: 0 !important;
}

body.xox-ui .layout > .card:not(.side) {
  order: 1 !important;
}

body.xox-ui .layout > aside.side {
  order: 0 !important;
}

body.xox-ui .layout > section {
  order: 1 !important;
}

body.xox-ui .layout > .card .row {
  background: #f9fbfd !important;
  border: 1px solid var(--xox-line) !important;
  border-radius: 14px !important;
}

body.xox-ui .board-wrap {
  background: #f9fbfd;
  border: 1px solid var(--xox-line);
  border-radius: 16px;
  padding: 12px;
}

body.xox-ui .xox-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

body.xox-ui .accordion {
  display: grid;
  gap: 10px;
}

body.xox-ui .acc {
  border: 1px solid var(--xox-line);
  border-radius: 14px;
  background: #f9fbfd;
  overflow: hidden;
}

body.xox-ui .acc-head {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 13px;
  color: var(--xox-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.xox-ui .acc-head::marker,
body.xox-ui .acc-head::-webkit-details-marker {
  display: none;
}

body.xox-ui .acc-head::after {
  content: "▾";
  font-size: 12px;
  color: var(--xox-muted);
}

@keyframes popReady {
  0% { transform: scale(0.98); box-shadow: 0 0 0 rgba(43, 122, 120, 0.0); }
  60% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(43, 122, 120, 0.15); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(43, 122, 120, 0.0); }
}

body.xox-ui .acc.is-ready {
  animation: popReady 0.6s ease-out;
  border-color: rgba(43, 122, 120, 0.5);
}

body.xox-ui details[open] > .acc-head::after {
  transform: rotate(180deg);
}

body.xox-ui .acc-body.xox-ui {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--xox-line);
  display: grid;
  gap: 10px;
}

/* Daha sade kontrol görünümü */
body.xox-ui .acc-body .row {
  background: transparent !important;
  border: none !important;
  padding: 6px 0 !important;
  margin-bottom: 0 !important;
}

body.xox-ui .acc-body .row label {
  text-transform: none !important;
  letter-spacing: 0.02em !important;
  font-size: 12px !important;
  color: var(--xox-muted) !important;
}

body.xox-ui .acc-body .section-title {
  border: none !important;
  padding: 0 !important;
  margin: 0 0 8px !important;
}

body.xox-ui .acc-body .section-title strong {
  text-transform: none !important;
  letter-spacing: 0.02em !important;
}

body.xox-ui .acc-body .kv {
  background: #ffffff !important;
  border: 1px solid var(--xox-line) !important;
  border-radius: 12px !important;
  padding: 8px 10px !important;
}

body.xox-ui #rtPanel {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

body.xox-ui #mobileBar,
body.xox-ui #appNav {
  display: none !important;
}

body.xox-ui .game-mode-row {
  display: none;
}

body.xox-ui .mode-select-row {
  display: none;
}

body.xox-ui .topbar__inner {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body.xox-ui .topbar__left {
  width: 100%;
}

body.xox-ui .topbar__title {
  font-size: 26px;
  letter-spacing: 0.12em;
}

body.xox-ui .topbar__subtitle {
  color: var(--xox-muted) !important;
  font-size: 13px;
}

body.xox-ui .acc-body .side-block {
  gap: 8px;
}

body.xox-ui .acc-body .side-title,
body.xox-ui .acc-body .field-label {
  text-transform: none !important;
  letter-spacing: 0.02em !important;
  font-size: 12px !important;
  color: var(--xox-muted) !important;
}

body.xox-ui #status {
  margin-top: 10px;
  color: var(--xox-muted);
  font-size: 12px;
}

body.xox-ui .topbar,
.app-header {
  text-align: left;
}

body.xox-ui .pill {
  background: #eef2f6 !important;
  border-color: var(--xox-line) !important;
  color: var(--xox-ink) !important;
}

body.xox-ui .pill.good {
  background: var(--xox-accent-soft) !important;
  border-color: var(--xox-accent) !important;
  color: var(--xox-accent) !important;
}

body.xox-ui .pill.warn {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  color: #b45309 !important;
}

body.xox-ui .btn,
body.xox-ui .app-nav button {
  background: var(--xox-ink) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 10px 20px rgba(27, 35, 49, 0.18);
}

body.xox-ui .btn:hover,
body.xox-ui .app-nav button:hover {
  transform: translateY(-1px);
}

body.xox-ui .btn.primary {
  background: var(--xox-accent) !important;
}

body.xox-ui .btn-primary {
  background: var(--xox-accent) !important;
  color: #ffffff !important;
  border: none !important;
}

body.xox-ui .btn-danger {
  background: #b91c1c !important;
  color: #ffffff !important;
  border: none !important;
}

body.xox-ui .btn-dark {
  background: #2f3b4a !important;
  color: #ffffff !important;
  border: none !important;
}

body.xox-ui .btn.ghost,
body.xox-ui .btn-ghost {
  background: #f0f3f7 !important;
  color: var(--xox-ink) !important;
  border: 1px solid var(--xox-line) !important;
  box-shadow: none;
}

body.xox-ui .btn.secondary {
  background: #f0f3f7 !important;
  color: var(--xox-ink) !important;
  border: 1px solid var(--xox-line) !important;
  box-shadow: none;
}

body.xox-ui .home-btn {
  background: #f0f3f7 !important;
  color: var(--xox-ink) !important;
  border: 1px solid var(--xox-line) !important;
  box-shadow: var(--xox-shadow);
}

body.xox-ui .select,
body.xox-ui .input,
body.xox-ui input,
body.xox-ui select,
body.xox-ui textarea {
  background: #ffffff !important;
  color: var(--xox-ink) !important;
  border: 1px solid var(--xox-line) !important;
}

body.xox-ui .input::placeholder,
body.xox-ui select::placeholder {
  color: rgba(102, 112, 133, 0.7) !important;
}

body.xox-ui .app-nav {
  background: rgba(255, 255, 255, 0.95) !important;
}

body.xox-ui .app-nav button {
  background: #f0f3f7 !important;
  color: var(--xox-ink) !important;
  border: 1px solid var(--xox-line) !important;
}

body.xox-ui .side .section-title,
body.xox-ui .side .side-title {
  border-bottom: 1px solid var(--xox-line) !important;
  padding-bottom: 8px;
}

body.xox-ui .side .section-title strong,
body.xox-ui .side .side-title {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--xox-muted) !important;
}

body.xox-ui .side .muted,
body.xox-ui .side .side-text,
body.xox-ui .side .field-label {
  color: var(--xox-muted) !important;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.xox-ui .side .row {
  background: #f9fbfd !important;
  border: 1px solid var(--xox-line) !important;
  border-radius: 14px !important;
  padding: 10px !important;
}

body.xox-ui .side .row label {
  color: var(--xox-muted) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

body.xox-ui .side .kv {
  background: #f9fbfd !important;
  border: 1px solid var(--xox-line) !important;
  color: var(--xox-muted) !important;
}

body.xox-ui .side .kv b {
  color: var(--xox-ink) !important;
}

body.xox-ui .side .moves div:nth-child(odd) {
  background: #f5f7fb !important;
  border-color: var(--xox-line) !important;
}

body.xox-ui .side .notice {
  color: var(--xox-muted) !important;
}

body.xox-ui .side .side-block {
  gap: 8px;
}

body.xox-ui .chat-list {
  background: #ffffff !important;
  border: 1px solid var(--xox-line) !important;
}

body.xox-ui .chat-meta.white {
  color: var(--xox-ink) !important;
}

body.xox-ui .chat-meta.black {
  color: var(--xox-accent) !important;
}

body.xox-ui .chip.white,
body.xox-ui .chip.black {
  background: #f0f3f7 !important;
  border: 1px solid var(--xox-line) !important;
  color: var(--xox-ink) !important;
}

body.xox-ui .board,
body.xox-ui #board {
  border-radius: 16px;
}

body.xox-ui .modal-backdrop {
  background: rgba(15, 23, 42, 0.18) !important;
  backdrop-filter: blur(6px) !important;
}

body.xox-ui .modal {
  background: var(--xox-card) !important;
  border: 1px solid var(--xox-line) !important;
  border-radius: var(--xox-radius) !important;
  box-shadow: var(--xox-shadow) !important;
  color: var(--xox-ink) !important;
}

body.xox-ui .modal h3 {
  color: var(--xox-ink) !important;
}

body.xox-ui .modal p {
  color: var(--xox-muted) !important;
}

.modal-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.modal-actions .btn {
  width: 100%;
}

@media (max-width: 640px) {
  .topbar,
  .app-header {
    text-align: center;
  }

  body.xox-ui .xox-shell {
    padding: 20px;
  }

  .modal-actions {
    grid-template-columns: 1fr;
  }
}
