/* Indie Game Dev Panel — dark gamer vibe (Tailwind + mevcut tema) */

.gd-panel {
  --gd-bg: #0b0f1a;
  --gd-panel: rgba(15, 23, 42, 0.72);
  --gd-border: rgba(56, 189, 248, 0.22);
  --gd-accent: #22d3ee;
  --gd-accent-2: #34d399;
  --gd-danger: #f87171;
  --gd-warn: #fbbf24;
  --gd-ok: #4ade80;
  --gd-text: #e2e8f0;
  --gd-muted: #94a3b8;
  color: var(--gd-text);
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

.gd-leaderboard {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gd-border);
  border-radius: 14px;
  background:
    linear-gradient(120deg, rgba(34, 211, 238, 0.08), rgba(52, 211, 153, 0.05)),
    var(--gd-panel);
  backdrop-filter: blur(10px);
}

.gd-leader-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 140px;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.55);
}

.gd-leader-chip.is-me {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.2);
}

.gd-leader-chip .lvl {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gd-accent);
  text-transform: uppercase;
}

.gd-leader-chip .name {
  font-weight: 600;
  font-size: 0.88rem;
}

.gd-leader-chip .xp {
  font-size: 0.75rem;
  color: var(--gd-muted);
}

.gd-leader-chip .bar {
  width: 64px;
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.gd-leader-chip .bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gd-accent), var(--gd-accent-2));
}

.gd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

@media (max-width: 980px) {
  .gd-grid {
    grid-template-columns: 1fr;
  }
}

.gd-card {
  border: 1px solid var(--gd-border);
  border-radius: 16px;
  background: var(--gd-panel);
  backdrop-filter: blur(12px);
  padding: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.gd-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.gd-card .sub {
  margin: 0 0 0.9rem;
  color: var(--gd-muted);
  font-size: 0.82rem;
}

.gd-task {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem;
  margin-bottom: 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.45);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.gd-task:hover {
  border-color: rgba(34, 211, 238, 0.35);
  transform: translateY(-1px);
}

.gd-task.is-done {
  opacity: 0.72;
}

.gd-task-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.gd-task-title {
  font-weight: 650;
  font-size: 0.95rem;
}

.gd-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.75rem;
  color: var(--gd-muted);
}

.gd-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.gd-badge.xp {
  color: #083344;
  background: linear-gradient(90deg, #67e8f9, #6ee7b7);
}

.gd-badge.bekliyor { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.gd-badge.yapiliyor { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; }
.gd-badge.tamamlandi { background: rgba(52, 211, 153, 0.2); color: #6ee7b7; }

.gd-btn {
  appearance: none;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(52, 211, 153, 0.12));
  color: var(--gd-text);
  border-radius: 10px;
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.gd-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.gd-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.gd-btn.ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.3);
}

.gd-btn.danger {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(127, 29, 29, 0.35);
}

.gd-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.gd-form-row input,
.gd-form-row select,
.gd-form-row textarea,
.gd-ai-input {
  flex: 1 1 140px;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.65);
  color: var(--gd-text);
  padding: 0.55rem 0.7rem;
  font-size: 0.88rem;
}

.gd-form-row textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
}

.gd-file-list,
.gd-bug-list,
.gd-task-list {
  max-height: 420px;
  overflow: auto;
}

.gd-file-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0.2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.86rem;
}

.gd-file-item a {
  color: var(--gd-accent);
  text-decoration: none;
  font-weight: 600;
}

.gd-file-item a:hover {
  text-decoration: underline;
}

.gd-bug {
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.gd-bug:hover {
  transform: translateX(2px);
}

.gd-bug.kirmizi { background: #7f1d1d; }
.gd-bug.sari { background: #713f12; }
.gd-bug.yesil { background: #14532d; }

.gd-bug.is-closed {
  text-decoration: line-through;
  opacity: 0.65;
}

.gd-bug .meta {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  opacity: 0.85;
}

/* AI floating assistant */
.gd-ai-fab {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 1px solid rgba(34, 211, 238, 0.45);
  background:
    radial-gradient(circle at 30% 30%, rgba(110, 231, 183, 0.35), transparent 50%),
    linear-gradient(145deg, #0f172a, #164e63);
  color: #ecfeff;
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(8, 47, 73, 0.55);
  animation: gd-pulse 2.4s ease-in-out infinite;
}

.gd-ai-fab:hover {
  filter: brightness(1.1);
}

@keyframes gd-pulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(8, 47, 73, 0.55), 0 0 0 0 rgba(34, 211, 238, 0.35); }
  50% { box-shadow: 0 12px 30px rgba(8, 47, 73, 0.55), 0 0 0 10px rgba(34, 211, 238, 0); }
}

.gd-ai-box {
  position: fixed;
  right: 1.1rem;
  bottom: 5rem;
  z-index: 61;
  width: min(360px, calc(100vw - 1.5rem));
  max-height: min(480px, calc(100vh - 7rem));
  display: none;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(2, 6, 23, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.gd-ai-box.open {
  display: flex;
  animation: gd-rise 0.22s ease-out;
}

@keyframes gd-rise {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.gd-ai-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.12), rgba(52, 211, 153, 0.08));
}

.gd-ai-head strong {
  font-size: 0.9rem;
}

.gd-ai-messages {
  flex: 1;
  overflow: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 180px;
}

.gd-ai-msg {
  max-width: 92%;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.gd-ai-msg.user {
  align-self: flex-end;
  background: rgba(34, 211, 238, 0.18);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.gd-ai-msg.bot {
  align-self: flex-start;
  background: rgba(51, 65, 85, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.gd-ai-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.gd-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gd-empty {
  color: var(--gd-muted);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

body.chat-view-active .gd-ai-fab,
body.chat-view-active .gd-ai-box,
body.focus-room-active .gd-ai-fab,
body.focus-room-active .gd-ai-box,
#login-screen.active ~ #gd-ai-fab,
#login-screen.active ~ #gd-ai-box {
  display: none !important;
}
