/* ===== Roblox Show Skills — ciemny motyw Roblox Studio ===== */
:root {
  --bg: #252525;
  --bg-panel: #2e2e2e;
  --bg-panel-2: #333333;
  --bg-titlebar: #1f1f1f;
  --border: #3f3f3f;
  --border-light: #4a4a4a;
  --text: #d5d5d5;
  --text-dim: #999999;
  --accent: #00a2ff;
  --accent-hover: #33b5ff;
  --accent-down: #0082cc;
  --danger: #c0392b;
  --radius: 6px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "SF Pro Text", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.muted { color: var(--text-dim); font-size: 13px; }

/* ===== Pasek górny ===== */
.topbar {
  background: var(--bg-titlebar);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #ffffff;
  text-decoration: none;
}

.studio-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
  display: inline-block;
  transform: rotate(45deg);
}

.topbar-links { display: flex; gap: 8px; align-items: center; }
.topbar-auth { display: inline-flex; gap: 8px; }

.lang-select {
  background: var(--bg-panel-2);
  color: var(--text);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== Przyciski ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, box-shadow 0.18s ease,
    transform 0.12s ease, border-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
}

.btn svg { flex-shrink: 0; }

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-blue {
  background: linear-gradient(180deg, var(--accent-hover), var(--accent));
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 162, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-blue:hover {
  background: linear-gradient(180deg, #4dc0ff, var(--accent-hover));
  box-shadow: 0 5px 16px rgba(0, 162, 255, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}
.btn-blue:active {
  background: var(--accent-down);
  box-shadow: 0 1px 4px rgba(0, 162, 255, 0.3);
  transform: translateY(0);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-light);
}
.btn-ghost:hover {
  background: rgba(0, 162, 255, 0.12);
  border-color: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
}
.btn-ghost:active { background: rgba(0, 162, 255, 0.06); transform: translateY(0); }

.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-big { padding: 12px 24px; font-size: 16px; }

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  padding: 4px 0;
  text-align: left;
}
.link-btn:hover { color: var(--accent-hover); }

.icon-btn {
  background: var(--bg-panel-2);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  border-radius: 4px;
  cursor: pointer;
  padding: 3px 8px;
  font-size: 13px;
}
.icon-btn:hover { background: var(--danger); color: #ffffff; border-color: var(--danger); }

/* ===== Układ ===== */
.page {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ===== Hero (strona główna) ===== */
.hero {
  padding: 48px 32px;
  text-align: center;
  margin-bottom: 36px;
  background:
    radial-gradient(ellipse at top, rgba(0, 162, 255, 0.08), transparent 60%),
    var(--bg-panel);
}

.hero h1 { font-size: 34px; color: #ffffff; margin-bottom: 10px; }
.hero p { color: var(--text-dim); max-width: 560px; margin: 0 auto 22px; }

/* ===== Lista twórców ===== */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.user-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.user-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.user-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--bg-panel-2);
  border: 1px solid var(--border-light);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.user-card-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-card-name { font-weight: 600; color: #ffffff; }
.user-card-skills { font-size: 12px; color: var(--accent); min-height: 18px; }
.user-card-counts { font-size: 12px; color: var(--text-dim); }

/* ===== Profil ===== */
.profile {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.avatar-wrap { position: relative; width: 128px; height: 128px; flex-shrink: 0; }

#avatar, .avatar-fallback {
  width: 128px;
  height: 128px;
  border-radius: var(--radius);
  border: 2px solid var(--border-light);
  background: var(--bg-panel-2);
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  font-weight: 700;
  color: var(--accent);
}

.profile-info { flex: 1; min-width: 260px; }

.profile-head-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.profile-head-row h1 { font-size: 28px; font-weight: 700; color: #ffffff; }

.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.profile-desc { color: var(--text-dim); margin-bottom: 16px; white-space: pre-line; }

/* ===== Ocena profilu (kciuki) ===== */
.rating-box {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding: 0 4px;
}

.rating-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-light);
  border-radius: 99px;
  padding: 4px;
}

.rating-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}

.rating-btn.like { color: #00b06f; }
.rating-btn.dislike { color: #e0442e; }

.rating-btn.like:hover { background: rgba(0, 176, 111, 0.14); }
.rating-btn.dislike:hover { background: rgba(224, 68, 46, 0.14); }

/* Kciuk pusty w środku; po oddaniu głosu — wypełniony */
.rating-btn svg path { fill: transparent; transition: fill 0.15s ease; }
.rating-btn.voted svg path { fill: currentColor; }
.rating-btn.voted { background: rgba(255, 255, 255, 0.05); }

.rating-btn.disabled { cursor: default; opacity: 0.45; }
.rating-btn.disabled:hover { background: none; }

.rating-score {
  min-width: 40px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dim);
  padding: 0 4px;
}

.rating-score.pos { color: #00b06f; }
.rating-score.neg { color: #e0442e; }

/* ===== Odznaki przy nicku ===== */
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid;
  white-space: nowrap;
}

.badge svg { flex-shrink: 0; }

/* Rangi: brąz → srebro → złoto → diament */
.badge.tier-1 { color: #d9985f; border-color: #8a5a2b; background: rgba(205, 127, 50, 0.12); }
.badge.tier-2 { color: #cfd6dd; border-color: #8a939c; background: rgba(192, 197, 206, 0.12); }
.badge.tier-3 { color: #ffd700; border-color: #a8890b; background: rgba(255, 215, 0, 0.10); }
.badge.tier-4 { color: #7fdbff; border-color: #2b7a9e; background: rgba(127, 219, 255, 0.10); }

.stats { display: flex; gap: 28px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-value { font-size: 24px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 13px; color: var(--text-dim); }

/* ===== Umiejętności ===== */
.skills-card { padding: 20px 24px; margin-bottom: 24px; }

.skills-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px 28px; }

.skill-head { display: flex; justify-content: space-between; margin-bottom: 4px; }
.skill-name { font-weight: 600; color: #ffffff; font-size: 14px; }
.skill-level { color: var(--accent); font-size: 13px; font-weight: 600; }

.skill-bar {
  height: 8px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-down), var(--accent));
  border-radius: 99px;
}

.skill-edit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.skill-edit-row .se-name { flex: 1; min-width: 160px; }
.skill-edit-row .se-level { flex: 1; min-width: 120px; accent-color: var(--accent); }
.skill-edit-row .se-value { width: 44px; text-align: right; color: var(--accent); font-size: 13px; }

/* ===== Zakładki ===== */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.tab {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--text-dim);
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.tab.active {
  background: var(--bg-panel-2);
  color: #ffffff;
  border-bottom: 2px solid var(--accent);
  margin-bottom: -1px;
}

.tab-panel .section-hint { display: block; margin-bottom: 14px; }

/* ===== Formularze ===== */
input[type="text"], input[type="password"], input[type="number"],
input[type="url"], input[type="file"], input[type="search"],
textarea, select {
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text);
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

textarea { resize: vertical; }

/* Subtelny kafelek "+" do dodawania modeli/projektów */
.add-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 150px;
  background: transparent;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.add-tile-plus {
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
}

.add-tile:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 162, 255, 0.05);
}

.form-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-col { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 4px; }

.form-error {
  background: rgba(192, 57, 43, 0.15);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  color: #ff9b8e;
  padding: 8px 12px;
  font-size: 13px;
}

.form-hints p { font-size: 12px; color: var(--text-dim); }

.form-sep { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

.verify-code {
  display: block;
  background: var(--bg-titlebar);
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  padding: 10px 14px;
  font-size: 15px;
  margin: 8px 0;
  text-align: center;
  letter-spacing: 1px;
  user-select: all;
}

/* ===== Sekcje / galeria modeli ===== */
.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section-head h2 { font-size: 20px; color: #ffffff; }
.section-hint { font-size: 13px; color: var(--text-dim); }

/* ===== Wyszukiwarka twórców ===== */
.search-box {
  position: relative;
  margin-left: auto;
}

.search-box .search-ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-box input {
  padding-left: 32px;
  width: 280px;
  max-width: 70vw;
}

/* ===== Pomoc pod ikoną "?" ===== */
.help-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-light);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: inherit;
}

.help-btn:hover {
  border-color: var(--accent);
  background: rgba(0, 162, 255, 0.12);
}

.help-pop {
  background: var(--bg-titlebar);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.steam-row input { flex: 1; min-width: 0; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.model-card {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.model-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.model-thumb {
  height: 150px;
  background:
    linear-gradient(rgba(0, 162, 255, 0.05), rgba(0, 0, 0, 0.25)),
    repeating-linear-gradient(0deg, transparent, transparent 19px, #3a3a3a 19px, #3a3a3a 20px),
    repeating-linear-gradient(90deg, transparent, transparent 19px, #3a3a3a 19px, #3a3a3a 20px),
    var(--bg-panel-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.model-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.model-meta { padding: 12px 14px; }
.model-name { font-weight: 600; color: #ffffff; font-size: 15px; }
.model-desc { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.model-open { font-size: 12px; color: var(--accent); margin-top: 8px; display: inline-block; }

.card-delete { position: absolute; top: 8px; right: 8px; }

.gallery-empty {
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  color: var(--text);
}

/* ===== Projekty ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.project-card {
  position: relative;
  display: flex;
  gap: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color 0.15s ease;
}

.project-card:hover { border-color: var(--accent); }

.project-image {
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-panel-2);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.project-image img { width: 100%; height: 100%; object-fit: cover; }

.project-body { flex: 1; min-width: 0; }
.project-title { font-weight: 700; color: #ffffff; font-size: 16px; margin-bottom: 2px; }

.project-sub {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  margin-bottom: 6px;
}

.project-years { color: var(--text-dim); }

.project-role {
  color: var(--accent);
  background: rgba(0, 162, 255, 0.12);
  border-radius: 99px;
  padding: 0 10px;
  font-weight: 600;
}

.project-desc { font-size: 13px; color: var(--text); margin-bottom: 8px; white-space: pre-line; }
.project-link { font-size: 13px; color: var(--accent); text-decoration: none; }
.project-link:hover { color: var(--accent-hover); }

/* ===== Stopka ===== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-titlebar);
  text-align: center;
  padding: 14px;
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-dc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-dc:hover { color: var(--accent-hover); }

.footer-copyright { font-size: 12px; opacity: 0.75; }

/* ===== Modale ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal-window {
  position: relative;
  width: min(960px, 94vw);
  height: min(640px, 88vh);
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-small {
  width: min(440px, 94vw);
  height: auto;
  max-height: 88vh;
  overflow-y: auto;
}

.modal-titlebar {
  background: var(--bg-titlebar);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
  flex-shrink: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 15px;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
}

.modal-close:hover { background: var(--danger); color: #ffffff; }

.modal-form {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-form label { font-size: 13px; color: var(--text-dim); }
.modal-form h3 { color: #ffffff; font-size: 14px; margin-top: 4px; }

.modal-body {
  flex: 1;
  position: relative;
  background: #232323;
  min-height: 0;
}

#viewer-canvas { width: 100%; height: 100%; display: block; }

.viewer-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(35, 35, 35, 0.85);
  color: var(--text);
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.modal-statusbar {
  background: var(--bg-titlebar);
  border-top: 1px solid var(--border);
  padding: 7px 14px;
  font-size: 12px;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel-2);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 200;
  box-shadow: var(--shadow);
}

/* ===== Mobile ===== */
@media (max-width: 560px) {
  .profile { flex-direction: column; text-align: center; }
  .profile-head-row { justify-content: center; }
  .stats { justify-content: center; }
  .rating-box { margin: 0 auto; }
  .badges { justify-content: center; }
  .project-card { flex-direction: column; }
  .project-image { width: 100%; height: 140px; }
}
