/* ============================================
   Popmundo Clone - Retro Web 2.0 Design System
   Verdana 12px, panel-based, soft blue palette
   ============================================ */

:root {
  --bg-page: #b8d4e3;
  --bg-panel: #f1f1f1;
  --bg-panel-soft: #eaf3f8;
  --bg-header: #cfe4ee;
  --bg-stripe: #f4f9fc;

  --border-main: #5a93b3;
  --border-soft: #a8c8db;
  --border-dark: #2c6a8f;

  --text-main: #1a3a4a;
  --text-link: #1668a3;
  --text-link-hover: #c93f1c;
  --text-muted: #6b8a9a;
  --text-label: #4a6b7a;

  --accent-blue: #2c8cc9;
  --accent-orange: #e8893f;
  --bar-green: #7cc24f;
  --bar-yellow: #ebc534;
  --bar-red: #d14545;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 12px;
  line-height: 1.5;
}

a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--text-link-hover); text-decoration: underline; }

/* ----- Container ----- */
.pm-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 12px;
}

/* ----- Panel ----- */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-main);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 2px 4px rgba(0, 0, 0, 0.08);
}

.panel-header {
  background: #c8dee8;
  border-bottom: 1px solid var(--border-main);
  padding: 6px 10px;
  font-weight: bold;
  color: var(--text-main);
  font-size: 12px;
}

.panel-body { padding: 10px; }

/* ----- Logo ----- */
.pm-logo {
  font-family: Verdana, sans-serif;
  font-weight: bold;
  font-size: 32px;
  color: white;
  letter-spacing: -1px;
  text-shadow:
    -1px -1px 0 var(--border-dark),
    1px -1px 0 var(--border-dark),
    -1px 1px 0 var(--border-dark),
    1px 1px 0 var(--border-dark),
    0 0 8px rgba(44, 106, 143, 0.5);
  -webkit-text-stroke: 2px var(--border-dark);
  display: inline-block;
}

a.pm-logo { text-decoration: none; }

/* ----- Nav tabs ----- */
.nav-tabs {
  display: flex;
  background: linear-gradient(to bottom, #cfe4ee 0%, #a8c8db 100%);
  border-bottom: 1px solid var(--border-main);
  padding: 0 8px;
}

.nav-tab {
  padding: 5px 14px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: bold;
  font-size: 12px;
  line-height: 1.3;
  border-right: 1px solid rgba(90, 147, 179, 0.3);
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.4);
  color: var(--text-link-hover);
  text-decoration: none;
}

.nav-tab.active {
  background: var(--bg-panel);
  color: var(--text-main);
  border-bottom: 2px solid var(--accent-orange);
  margin-bottom: -1px;
}

.nav-tab.disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.5;
}

/* ----- Buttons ----- */
.pm-btn {
  display: inline-block;
  padding: 5px 14px;
  background: linear-gradient(to bottom, #ffffff 0%, #d8e8f2 100%);
  border: 1px solid var(--border-main);
  border-radius: 4px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.pm-btn:hover:not(:disabled) {
  background: linear-gradient(to bottom, #ffffff 0%, #b8d4e3 100%);
  color: var(--text-main);
  text-decoration: none;
}

.pm-btn:active:not(:disabled) {
  background: linear-gradient(to bottom, #b8d4e3 0%, #d8e8f2 100%);
}

.pm-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.pm-btn-primary {
  background: linear-gradient(to bottom, #4ca6e0 0%, #2c8cc9 100%);
  border-color: var(--border-dark);
  color: white;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.pm-btn-primary:hover:not(:disabled) {
  background: linear-gradient(to bottom, #5fb5ec 0%, #3a9cd9 100%);
  color: white;
}

.pm-btn-orange {
  background: linear-gradient(to bottom, #f4a86a 0%, #e8893f 100%);
  border-color: #b56f2f;
  color: white;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.pm-btn-orange:hover:not(:disabled) {
  background: linear-gradient(to bottom, #ffba80 0%, #f49850 100%);
  color: white;
}

/* ----- Input ----- */
.pm-input {
  width: 100%;
  padding: 5px 8px;
  background: white;
  border: 1px solid var(--border-main);
  border-radius: 3px;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-main);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) inset;
}

.pm-input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 2px rgba(232, 137, 63, 0.2);
}

/* ----- Stat bar ----- */
.stat-bar {
  height: 12px;
  background: #d6e0e6;
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.stat-bar-fill {
  height: 100%;
  transition: width 0.3s ease;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0%, rgba(0, 0, 0, 0.05) 100%);
}

.stat-bar-fill.green {
  background-color: var(--bar-green);
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.1) 100%);
}
.stat-bar-fill.yellow {
  background-color: var(--bar-yellow);
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.1) 100%);
}
.stat-bar-fill.red {
  background-color: var(--bar-red);
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.1) 100%);
}
.stat-bar-fill.blue {
  background-color: var(--accent-blue);
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0.1) 100%);
}

/* ----- Tablo / Liste ----- */
.pm-table { width: 100%; border-collapse: collapse; }
.pm-table td { padding: 4px 8px; vertical-align: top; }
.pm-table tr:nth-child(even) td { background: var(--bg-stripe); }

/* ----- Seçim kartları ----- */
.choice-card {
  background: white;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-main);
}

.choice-card:hover {
  border-color: var(--accent-orange);
  background: #fff8f0;
}

.choice-card.selected {
  border-color: var(--accent-orange);
  background: #fff0e0;
  box-shadow: 0 0 0 2px rgba(232, 137, 63, 0.3);
}

/* ----- Sidebar menü ----- */
.side-menu-group { margin-bottom: 12px; }

.side-menu-title {
  background: #c8dee8;
  padding: 5px 10px;
  font-weight: bold;
  font-size: 12px;
  border: 1px solid var(--border-main);
  border-bottom: none;
  color: var(--text-main);
}

.side-menu-list {
  background: white;
  border: 1px solid var(--border-main);
}

.side-menu-link {
  display: block;
  padding: 4px 10px;
  color: var(--text-link);
  text-decoration: none;
  border-bottom: 1px solid #eaf3f8;
  font-size: 12px;
}

.side-menu-link:last-child { border-bottom: none; }

.side-menu-link:hover {
  background: var(--bg-panel-soft);
  color: var(--text-link-hover);
  text-decoration: none;
}

.side-menu-link.disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  pointer-events: none;
}

/* ----- Konuşma balonu ----- */
.speech-bubble {
  position: relative;
  background: white;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 8px 12px;
  font-style: italic;
  color: var(--text-main);
}

.speech-bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 12px;
  width: 0; height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid var(--border-soft);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  left: -7px;
  top: 13px;
  width: 0; height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 7px solid white;
}

/* ----- Diary / Log entry ----- */
.diary-entry {
  padding: 6px 0;
  border-bottom: 1px dotted var(--border-soft);
  font-size: 12px;
}

.diary-entry:last-child { border-bottom: none; }

.diary-entry .time {
  color: var(--text-muted);
  font-size: 11px;
  font-family: 'Courier New', monospace;
  margin-right: 6px;
}

/* ----- Hata ve Başarı kutuları ----- */
.alert-error {
  background: #fde8e8;
  border: 1px solid var(--bar-red);
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--bar-red);
  font-size: 11px;
  margin-bottom: 12px;
}

.alert-success {
  background: #e8f4e8;
  border: 1px solid var(--bar-green);
  padding: 6px 10px;
  border-radius: 4px;
  color: #2d6a2d;
  font-size: 11px;
  margin-bottom: 12px;
}

.alert-warning {
  background: #fff8e1;
  border: 1px solid #d4a017;
  padding: 6px 10px;
  border-radius: 4px;
  color: #7a5a0e;
  font-size: 11px;
  margin-bottom: 12px;
}

.alert-info {
  background: var(--bg-panel-soft);
  border: 1px solid var(--border-soft);
  padding: 6px 10px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 11px;
  margin-bottom: 12px;
}

/* ----- Yardımcı utility'ler ----- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: bold; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.my-4 { margin-top: 16px; margin-bottom: 16px; }
.my-6 { margin-top: 24px; margin-bottom: 24px; }
.my-8 { margin-top: 32px; margin-bottom: 32px; }

/* ----- Step indicator (karakter oluşturma için) ----- */
.step-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
}

.step-indicator-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-indicator-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-main);
  background: #e0eaf0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
}

.step-indicator-circle.active {
  background: var(--accent-orange);
  color: white;
}

.step-indicator-circle.done {
  background: var(--bar-green);
  color: white;
}

.step-indicator-label {
  font-size: 11px;
  color: var(--text-muted);
}

.step-indicator-label.active {
  font-weight: bold;
  color: var(--text-main);
}

.step-indicator-line {
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

/* ----- Animasyon ----- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in { animation: fadeIn 0.25s ease; }

/* ----- Footer ----- */
.pm-footer {
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 16px;
  padding-bottom: 16px;
}

/* ----- Üst bar (logo + tarih + kullanıcı) ----- */
.pm-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.pm-topbar-date { font-size: 11px; font-weight: bold; }

/* TopBar ikon (a veya button ortak görünüm) */
.pm-topbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding: 0 4px;
  margin: 0;
  color: var(--text-main);
  vertical-align: middle;
  position: relative;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
  height: 26px;
  width: 30px;
  box-sizing: border-box;
  font-family: inherit;
}
.pm-topbar-icon:hover { text-decoration: none; }
button.pm-topbar-icon { background: none; border: none; }

/* Ortak rozet (sayaç) - tüm topbar ikonlarında eşit boy */
.pm-topbar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  color: white;
  font-size: 9px;
  font-weight: bold;
  border-radius: 10px;
  padding: 1px 5px;
  line-height: 1.2;
  min-width: 14px;
  text-align: center;
  box-sizing: border-box;
}
.pm-badge-red   { background: #c53030; }
.pm-badge-green { background: #2d8a2d; }
.pm-topbar-user { font-size: 11px; font-weight: bold; }
.pm-topbar-actions { display: flex; align-items: center; gap: 10px; }

/* Form içindeki düğmeyi tek başına gönder */
.inline-form { display: inline; margin: 0; padding: 0; }

/* No-bullet list */
.list-plain { list-style: none; padding: 0; margin: 0; }

/* ============================================
   Layout iyileştirmeleri
   - Sayfa daha dar/ortalı görünür (yan boşluklarla)
   - Sağ menü grupları çizgisiz (sade)
   - Navbar sade ortalı, text-only mavi linkler
   - Sol panel header'larında alt çizgi yok (sağ menü stiline uyum)
   ============================================ */

/* Sayfa: yan boşluk için body'ye yumuşak nötr arka plan,
   container biraz daha dar */
html, body {
  background: #a7a6a2;
}

.pm-container {
  max-width: 820px;
  background: #bfc1c3;
  padding: 14px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
}

/* Sağ menü grupları: çizgisiz, sade */
.side-menu-title {
  border: none;
  border-radius: 0;
}

.side-menu-list {
  background: transparent;
  border: none;
  padding: 4px 0;
}

.side-menu-link {
  border-bottom: none;
  padding: 2px 10px;
}

.side-menu-link:hover {
  background: transparent;
  text-decoration: underline;
}

/* Sol panel header'ları side-menu-title ile birebir aynı görünüm */
.panel-header {
  padding: 5px 10px;
  border-bottom: none;
}

/* Panel dış çerçeve çizgisi kaldırılır */
.panel {
  border: none;
  box-shadow: none;
}

/* Sağ menü kapsayıcısı — karakter paneli gibi sınırları olan kutu */
.side-menu-wrap {
  background: var(--bg-panel);
  padding: 0;
  align-self: start;
  border-radius: 6px;
  overflow: hidden;
}

.side-menu-wrap .side-menu-group {
  margin-bottom: 6px;
}

.side-menu-wrap .side-menu-group:last-child {
  margin-bottom: 0;
}

.side-menu-wrap .side-menu-group:last-child .side-menu-list {
  padding-bottom: 0;
}

/* Navbar: sade ortalı, text-only mavi linkler */
.nav-tabs {
  background: transparent;
  border-bottom: 1px solid var(--border-soft);
  justify-content: center;
  gap: 4px;
  padding: 8px 0;
}

.nav-tab {
  border-right: none;
  padding: 3px 12px;
  font-weight: normal;
}

.nav-tab:hover {
  background: transparent;
  text-decoration: underline;
}

.nav-tab.active {
  background: transparent;
  color: var(--text-main);
  font-weight: bold;
  border-bottom: none;
  margin-bottom: 0;
}
