/* ============================================
   CIRCLE OF DHUMISANI — circle.css
   ============================================ */

/* ── LAYOUT WRAPPER ──────────────────────── */
.circle-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 60px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── HEADER ──────────────────────────────── */
.circle-header {
  text-align: center;
  margin-bottom: 48px;
  width: 100%;
}

.circle-sigil {
  font-size: 2.8rem;
  opacity: 0.85;
  display: block;
}

/* ── PANELS ──────────────────────────────── */
.circle-panel {
  background: var(--card-bg);
  border: 1px solid var(--tertiary-color);
  border-radius: 8px;
  padding: 28px 28px;
}

.circle-panel.glow {
  border-color: rgba(201, 162, 39, 0.45);
  box-shadow: 0 0 28px rgba(201, 162, 39, 0.08);
}

/* ── LORE TEXT ───────────────────────────── */
.circle-lore {
  font-family: var(--font-serif);
  color: var(--info-color);
  font-size: 1.05rem;
  line-height: 1.8;
  text-align: center;
  margin-bottom: 28px;
  font-style: italic;
}

.circle-lore strong {
  color: var(--secondary-color);
  font-style: normal;
}

/* ── WELCOME PANEL (collassabile) ────────── */
.circle-welcome-panel {
  width: 100%;
  background: rgba(201, 162, 39, 0.04);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 8px;
  margin-bottom: 28px;
  overflow: hidden;
}

.circle-welcome-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  cursor: pointer;
}

.circle-welcome-title {
  font-family: var(--font-serif);
  color: var(--secondary-color);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.circle-welcome-toggle {
  background: none;
  border: none;
  color: var(--secondary-color);
  opacity: 0.6;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.85rem;
  transition: opacity 0.2s;
  line-height: 1;
}

.circle-welcome-toggle:hover { opacity: 1; }

.circle-welcome-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 24px;
}

.circle-welcome-body.welcome-body-open {
  max-height: 600px;
  padding: 0 24px 24px;
}

.circle-welcome-body p {
  color: var(--info-color);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 14px;
}

.circle-welcome-body p:last-child { margin-bottom: 0; }

.circle-welcome-rule {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(201, 162, 39, 0.15);
  font-family: var(--font-serif);
  font-style: italic;
  color: rgba(232, 213, 163, 0.45);
  font-size: 0.88rem;
  line-height: 1.8;
  text-align: center;
}

/* ── DASHBOARD 3-COLUMN LAYOUT ───────────── */
.circle-dash-layout {
  display: grid;
  grid-template-columns: 280px 1fr 1fr;
  gap: 20px;
  width: 100%;
  align-items: start;
}

.circle-col-left,
.circle-col-center,
.circle-col-right {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── GREETING ────────────────────────────── */
.dash-greeting {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-color);
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--tertiary-color);
  line-height: 1.5;
}

.dash-greet-name {
  color: var(--secondary-color);
  font-family: var(--font-serif);
  letter-spacing: 0.06em;
}

.dash-inline-action {
  display: block;
  font-size: 0.75rem;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 6px;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.2s;
  font-family: var(--font-primary);
  font-style: normal;
  font-weight: normal;
}

.dash-inline-action:hover { opacity: 1; text-decoration: underline; }

/* ── IDENTITY CARD ───────────────────────── */
.circle-identity {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.identity-badge {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(201, 162, 39, 0.1);
  border: 2px solid var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.identity-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--secondary-color);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
}

.identity-meta {
  font-size: 0.8rem;
  color: var(--info-color);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.identity-change-prof {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.dash-once-note {
  font-size: 0.68rem;
  color: var(--info-color);
  opacity: 0.5;
  font-style: italic;
}

/* ── STATS ───────────────────────────────── */
.circle-dash-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.circle-dash-stat {
  background: rgba(10, 9, 7, 0.6);
  border: 1px solid var(--tertiary-color);
  border-radius: 6px;
  padding: 14px 16px;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--info-color);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 5px;
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--text-color);
}

/* ── SECTION TITLE ───────────────────────── */
.circle-section-title {
  font-family: var(--font-serif);
  color: var(--secondary-color);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--tertiary-color);
}

/* ── LIBRARY ─────────────────────────────── */
.circle-download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(61, 52, 40, 0.5);
  gap: 12px;
}

.circle-download-item:last-child { border-bottom: none; }

.dl-info { flex: 1; }

.dl-title {
  font-size: 0.92rem;
  color: var(--text-color);
  margin-bottom: 3px;
}

.dl-meta {
  font-size: 0.76rem;
  color: var(--info-color);
}

.circle-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--secondary-color);
  border-radius: 5px;
  color: var(--secondary-color);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: all 0.2s;
  white-space: nowrap;
}

.circle-dl-btn:hover {
  background: var(--secondary-color);
  color: #0f0f0f;
}

/* ── NOTICEBOARD ─────────────────────────── */
.circle-notice-item {
  padding: 14px 0;
  border-bottom: 1px solid rgba(61, 52, 40, 0.5);
}

.circle-notice-item:last-child { border-bottom: none; }

.notice-date {
  font-size: 0.72rem;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 5px;
}

.notice-title {
  font-family: var(--font-serif);
  color: var(--text-color);
  font-size: 0.95rem;
  margin-bottom: 5px;
}

.notice-body {
  font-size: 0.88rem;
  color: var(--info-color);
  line-height: 1.6;
}

/* ── UPDATES ─────────────────────────────── */
.circle-update-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(61, 52, 40, 0.5);
}

.circle-update-item:last-child { border-bottom: none; }

.upd-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--secondary-color);
  flex-shrink: 0;
  margin-top: 7px;
}

.upd-content { flex: 1; }

.upd-title {
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 2px;
}

.upd-date {
  font-size: 0.74rem;
  color: var(--info-color);
}

/* ── EMPTY MESSAGES ──────────────────────── */
.circle-empty-msg {
  color: var(--info-color);
  font-style: italic;
  font-size: 0.9rem;
  padding: 8px 0;
}

/* ── TEASER ──────────────────────────────── */
.circle-teaser {
  margin-top: 32px;
  padding: 20px;
  background: rgba(10, 9, 7, 0.8);
  border: 1px solid rgba(201, 162, 39, 0.12);
  border-radius: 6px;
  text-align: center;
  width: 100%;
}

.circle-teaser p {
  font-family: var(--font-serif);
  font-style: italic;
  color: rgba(232, 213, 163, 0.4);
  font-size: 0.88rem;
  line-height: 1.8;
}

/* ── LOADING ─────────────────────────────── */
.circle-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--info-color);
}

.circle-loading i {
  animation: circle-spin 1s linear infinite;
  font-size: 1.5rem;
  color: var(--secondary-color);
  opacity: 0.6;
}

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

/* ── INPUT / FORM ────────────────────────── */
.circle-input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.circle-input-group label {
  font-size: 0.8rem;
  color: var(--info-color);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.circle-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(10, 9, 7, 0.85);
  border: 1px solid var(--tertiary-color);
  border-radius: 6px;
  color: var(--text-color);
  font-size: 1rem;
  font-family: var(--font-primary);
  transition: border-color 0.25s, box-shadow 0.25s;
  box-sizing: border-box;
}

.circle-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.2);
}

.circle-input::placeholder {
  color: rgba(232, 213, 163, 0.3);
}

/* ── BUTTONS ─────────────────────────────── */
.circle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  background: var(--secondary-color);
  color: #0f0f0f;
  border: none;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  width: 100%;
  margin-top: 8px;
}

.circle-btn:hover {
  background: var(--accent-color);
  transform: translateY(-1px);
}

.circle-btn:active { transform: translateY(0); }

.circle-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.circle-btn-ghost {
  background: transparent;
  border: 1px solid var(--tertiary-color);
  color: var(--info-color);
}

.circle-btn-ghost:hover {
  background: var(--tertiary-color);
  color: var(--text-color);
}

/* ── ERROR ───────────────────────────────── */
.circle-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  padding: 12px 16px;
  color: #fca5a5;
  font-size: 0.88rem;
  margin-top: 12px;
  display: none;
}

.circle-error.show { display: block; }

/* ── NAME REVEAL (onboarding) ────────────── */
.circle-name-reveal { text-align: center; padding: 16px 0; }

.circle-name-reveal .the-name,
.the-name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--secondary-color);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 16px 0;
  text-shadow: 0 0 30px rgba(201, 162, 39, 0.4);
}

.name-whisper {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--info-color);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.circle-name-options {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.circle-name-options .circle-btn {
  width: auto;
  flex: 1;
  min-width: 140px;
  max-width: 220px;
}

/* ── NAME PICKER GRID ────────────────────── */
.name-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding: 4px 2px;
  margin-bottom: 20px;
}

.name-pick-item {
  background: rgba(10,9,7,0.7);
  border: 1px solid var(--tertiary-color);
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
}

.name-pick-item:hover:not(.name-taken) {
  border-color: var(--secondary-color);
  background: rgba(201,162,39,0.07);
}

.name-pick-item.picked {
  border-color: var(--secondary-color);
  background: rgba(201,162,39,0.14);
}

.name-pick-item.name-taken {
  opacity: 0.4;
  cursor: not-allowed;
}

.name-pick-text {
  font-family: var(--font-serif);
  color: var(--text-color);
  font-size: 0.88rem;
}

.name-pick-badge {
  display: block;
  font-size: 0.63rem;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.name-pick-actions {
  display: flex;
  gap: 10px;
}

.name-pick-actions .circle-btn { flex: 1; width: auto; }

/* ── PROFESSION GRID ─────────────────────── */
.profession-intro {
  font-family: var(--font-serif);
  font-style: italic;
  text-align: center;
  color: var(--info-color);
  margin-bottom: 24px;
  font-size: 1rem;
  line-height: 1.7;
}

.profession-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.profession-card {
  background: rgba(10, 9, 7, 0.7);
  border: 1px solid var(--tertiary-color);
  border-radius: 8px;
  padding: 18px 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.profession-card:hover {
  border-color: var(--secondary-color);
  background: rgba(201, 162, 39, 0.07);
  transform: translateY(-2px);
}

.profession-card.selected {
  border-color: var(--secondary-color);
  background: rgba(201, 162, 39, 0.12);
  box-shadow: 0 0 16px rgba(201, 162, 39, 0.15);
}

.prof-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
  display: block;
}

.prof-name {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--secondary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── SCREENS ─────────────────────────────── */
.circle-screen { display: none; }
.circle-screen.active { display: block; width: 100%; }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 900px) {
  .circle-dash-layout {
    grid-template-columns: 1fr 1fr;
  }
  .circle-col-right {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .circle-wrapper { padding: 40px 16px 60px; }
  .circle-panel { padding: 20px 16px; }
  .circle-dash-layout {
    grid-template-columns: 1fr;
  }
  .circle-col-right { grid-column: auto; }
  .circle-identity { flex-direction: column; align-items: center; text-align: center; }
  .identity-change-prof { justify-content: center; }
  .circle-name-options .circle-btn { min-width: 120px; }
  .profession-grid { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════════
   CIRCLE.CSS — AGGIUNTE STADIO 3A + 3B
   Incolla in fondo al circle.css esistente
   ══════════════════════════════════════════════════════ */


/* ── STADIO 3A: PIN ROW ──────────────────────────────── */
.circle-pin-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.circle-pin-input {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  background: rgba(10, 9, 7, 0.85);
  border: 1px solid var(--tertiary-color);
  border-radius: 6px;
  color: var(--secondary-color);
  transition: border-color 0.2s, box-shadow 0.2s;
  caret-color: var(--secondary-color);
}

.circle-pin-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.25);
}

@media (max-width: 400px) {
  .circle-pin-input { width: 36px; height: 44px; font-size: 1.2rem; }
}


/* ── STADIO 3B: LAVAGNA MEMBRANA ─────────────────────── */
.circle-board-wrap {
  width: 100%;
  background: rgba(10, 9, 7, 0.6);
  border: 1px solid var(--tertiary-color);
  border-radius: 8px;
  margin-top: 24px;
  overflow: hidden;
}

.circle-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--tertiary-color);
}

.circle-board-hint {
  font-size: 0.72rem;
  color: var(--info-color);
  opacity: 0.5;
  letter-spacing: 0.03em;
}

/* Area messaggi — altezza fissa con scroll interno */
.board-messages {
  height: 280px;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

/* Scrollbar sottile */
.board-messages::-webkit-scrollbar { width: 4px; }
.board-messages::-webkit-scrollbar-track { background: transparent; }
.board-messages::-webkit-scrollbar-thumb { background: var(--tertiary-color); border-radius: 2px; }

.board-empty {
  color: var(--info-color);
  font-style: italic;
  font-size: 0.88rem;
  text-align: center;
  margin: auto;
  opacity: 0.6;
}

/* Singolo messaggio */
.board-message {
  background: rgba(20, 18, 15, 0.7);
  border: 1px solid var(--tertiary-color);
  border-radius: 6px;
  padding: 10px 14px;
  max-width: 88%;
  align-self: flex-start;
  animation: board-msg-in 0.2s ease;
}

/* Messaggio dell'autore (Kendiro) — allineato a destra, colore diverso */
.board-message-author {
  align-self: flex-end;
  background: rgba(201, 162, 39, 0.08);
  border-color: rgba(201, 162, 39, 0.3);
}

@keyframes board-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.board-msg-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.board-msg-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.board-message-author .board-msg-name {
  color: var(--accent-color);
}

.board-msg-time {
  font-size: 0.68rem;
  color: var(--info-color);
  opacity: 0.5;
}

.board-msg-text {
  font-size: 0.9rem;
  color: var(--text-color);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Composer */
.board-composer {
  padding: 12px 16px;
  border-top: 1px solid var(--tertiary-color);
  background: rgba(10, 9, 7, 0.4);
}

.board-composer-inner {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  position: relative;
}

.board-input {
  flex: 1;
  background: rgba(10, 9, 7, 0.85);
  border: 1px solid var(--tertiary-color);
  border-radius: 6px;
  color: var(--text-color);
  font-family: var(--font-primary);
  font-size: 0.92rem;
  padding: 10px 14px;
  resize: none;
  min-height: 42px;
  max-height: 120px;
  transition: border-color 0.2s;
  overflow-y: auto;
}

.board-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.15);
}

.board-input::placeholder { color: rgba(232, 213, 163, 0.3); }

.board-send-btn {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  background: var(--secondary-color);
  border: none;
  border-radius: 6px;
  color: #0f0f0f;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
}

.board-send-btn:hover   { background: var(--accent-color); transform: translateY(-1px); }
.board-send-btn:active  { transform: translateY(0); }
.board-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Emoji toggle */
.board-emoji-toggle {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background: rgba(10, 9, 7, 0.85);
  border: 1px solid var(--tertiary-color);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
  color: var(--secondary-color);
}
.board-emoji-toggle:hover { border-color: var(--secondary-color); }

/* Emoji picker popup */
.board-emoji-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: var(--card-bg);
  border: 1px solid var(--tertiary-color);
  border-radius: 8px;
  padding: 10px;
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  width: 220px;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.board-emoji-picker.open { display: flex; }

.board-emoji-item {
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.15s;
  line-height: 1;
}
.board-emoji-item:hover { background: rgba(201, 162, 39, 0.15); }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 600px) {
  .board-messages   { height: 220px; padding: 12px 14px; }
  .board-message    { max-width: 95%; }
  .circle-board-hint { display: none; }
}