/* ===================================================
   MINECRAFT THEME STYLESHEET - ASENA YOKLAMA
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  /* Minecraft Renk Paleti */
  --mc-dirt: #866043;
  --mc-dirt-dark: #573d26;
  --mc-stone: #686868;
  --mc-stone-light: #8b8b8b;
  --mc-stone-dark: #373737;
  --mc-gui-bg: #c6c6c6;
  --mc-gui-dark: #555555;
  --mc-gui-border-light: #ffffff;
  --mc-gui-border-shadow: #373737;
  --mc-btn-bg: #7f7f7f;
  --mc-btn-hover: #9e9e9e;
  --mc-btn-active: #5f5f5f;
  --mc-gold: #f5b700;
  --mc-silver: #d1d5db;
  --mc-bronze: #cd7f32;
  --mc-green: #55ff55;
  --mc-dark-green: #00aa00;
  --mc-red: #ff5555;
  --mc-dark-red: #aa0000;
  --mc-blue: #55ffff;
  --mc-diamond: #4deeea;
  --mc-text-shadow: 2px 2px #000000;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

body {
  font-family: 'Press Start 2P', monospace;
  background-color: #1e1e1e;
  /* Retro Minecraft Dirt / Stone deseni */
  background-image: 
    linear-gradient(45deg, #181818 25%, transparent 25%), 
    linear-gradient(-45deg, #181818 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #181818 75%), 
    linear-gradient(-45deg, transparent 75%, #181818 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  font-size: 12px;
}

/* --- KONTEYNER & HEADER --- */
.container, .mc-container {
  width: 100%;
  max-width: 900px;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 0;
  margin-bottom: 0;
  padding: 16px;
  flex: 1;
  box-sizing: border-box;
}

.mc-header {
  text-align: center;
  padding: 16px 10px;
  margin-bottom: 12px;
}

.mc-title {
  font-size: 20px;
  color: #ffaa00;
  text-shadow: 3px 3px 0px #000;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.mc-subtitle {
  font-size: 10px;
  color: #aaaaaa;
  text-shadow: 2px 2px 0px #000;
}

/* --- MINECRAFT NAV MENÜ --- */
.mc-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.mc-nav-link {
  font-size: 9px;
  padding: 8px 12px;
  border: 2px solid #000;
  background: #373737;
  color: #ffffff;
  text-decoration: none;
  box-shadow: inset 2px 2px 0px #777, inset -2px -2px 0px #111;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mc-nav-link:hover, .mc-nav-link.active {
  background: #ffaa00;
  color: #000;
  box-shadow: inset 2px 2px 0px #fff, inset -2px -2px 0px #996500;
}

/* --- MINECRAFT GUI PANEL --- */
.mc-panel {
  background-color: var(--mc-gui-bg);
  border: 4px solid #000;
  box-shadow: 
    inset -4px -4px 0px 0px var(--mc-gui-border-shadow),
    inset 4px 4px 0px 0px var(--mc-gui-border-light),
    0 8px 16px rgba(0,0,0,0.6);
  padding: 20px;
  margin-bottom: 24px;
  color: #333333;
  position: relative;
}

.mc-panel-title {
  color: #2b2b2b;
  font-size: 13px;
  margin-bottom: 16px;
  text-transform: uppercase;
  border-bottom: 3px solid #8b8b8b;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- MINECRAFT BUTONLAR --- */
.mc-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  padding: 12px 16px;
  border: 3px solid #000;
  background-color: #999999;
  color: #ffffff;
  text-shadow: 2px 2px 0px #222222;
  box-shadow: 
    inset 3px 3px 0px 0px #cfcfcf,
    inset -3px -3px 0px 0px #4d4d4d;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: none;
  user-select: none;
  outline: none;
}

.mc-btn:hover {
  background-color: #ababab;
  box-shadow: 
    inset 3px 3px 0px 0px #e0e0e0,
    inset -3px -3px 0px 0px #3d3d3d;
}

.mc-btn:active, .mc-btn.pressed {
  background-color: #636363;
  box-shadow: 
    inset -3px -3px 0px 0px #ababab,
    inset 3px 3px 0px 0px #2a2a2a;
  transform: translate(1px, 1px);
}

.mc-btn-block {
  width: 100%;
  display: flex;
}

.mc-btn-green {
  background-color: #2e7d32;
  box-shadow: 
    inset 3px 3px 0px 0px #66bb6a,
    inset -3px -3px 0px 0px #1b5e20;
}

.mc-btn-green:hover {
  background-color: #388e3c;
  box-shadow: 
    inset 3px 3px 0px 0px #81c784,
    inset -3px -3px 0px 0px #1b5e20;
}

.mc-btn-red {
  background-color: #c62828;
  box-shadow: 
    inset 3px 3px 0px 0px #ef5350,
    inset -3px -3px 0px 0px #7f0000;
}

.mc-btn-red:hover {
  background-color: #d32f2f;
  box-shadow: 
    inset 3px 3px 0px 0px #e57373,
    inset -3px -3px 0px 0px #7f0000;
}

.mc-btn-gold {
  background-color: #b78103;
  box-shadow: 
    inset 3px 3px 0px 0px #ffd54f,
    inset -3px -3px 0px 0px #795548;
}

/* --- FORM ELEMANLARI --- */
.mc-form-group {
  margin-bottom: 16px;
}

.mc-label {
  display: block;
  font-size: 10px;
  color: #2b2b2b;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.mc-input {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  width: 100%;
  padding: 10px;
  background-color: #000000;
  color: #ffffff;
  border: 3px solid #6b6b6b;
  box-shadow: inset 2px 2px 0px 0px #373737;
  outline: none;
}

.mc-input:focus {
  border-color: #ffffff;
}

/* --- DİNAMİK DÖNEN QR PROGRESS BAR --- */
.qr-timer-wrap {
  width: 100%;
  max-width: 240px;
  margin: 8px auto 0 auto;
  background: #333;
  border: 2px solid #000;
  height: 12px;
  position: relative;
  overflow: hidden;
}

.qr-timer-bar {
  height: 100%;
  background: #55ff55;
  width: 100%;
  transition: width 0.3s linear, background-color 0.3s ease;
}

.qr-timer-bar.warning {
  background: #ffaa00;
}

.qr-timer-bar.danger {
  background: #ff5555;
}

/* --- MINECRAFT ENVANTER SLOTLARI / ÜYE KARTLARI --- */
.member-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}

@media (min-width: 540px) {
  .member-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.member-slot {
  background-color: #8b8b8b;
  border: 3px solid #000;
  box-shadow: 
    inset 3px 3px 0px 0px #373737,
    inset -3px -3px 0px 0px #ffffff;
  padding: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.05s ease;
  position: relative;
  user-select: none;
}

.member-slot:hover {
  background-color: #a0a0a0;
}

.member-slot.selected {
  background-color: #ffd54f;
  box-shadow: 
    inset 3px 3px 0px 0px #ffffff,
    inset -3px -3px 0px 0px #b78103,
    0 0 8px rgba(255, 213, 79, 0.8);
}

.member-slot.status-checked-in {
  background-color: #ffe082;
  border-color: #f57f17;
  cursor: pointer;
  box-shadow: 
    inset 2px 2px 0px 0px #fff9c4,
    inset -2px -2px 0px 0px #f57f17;
}

.member-slot.status-checked-in:hover {
  background-color: #ffd54f;
  transform: translateY(-2px);
}

.member-slot.status-completed {
  opacity: 0.85;
  background-color: #c8e6c9;
  border-color: #2e7d32;
  cursor: pointer;
  box-shadow: 
    inset 2px 2px 0px 0px #e8f5e9,
    inset -2px -2px 0px 0px #2e7d32;
}

.member-slot.attended {
  opacity: 0.85;
}

.mc-file-box {
  background: #000;
  border: 3px solid #555;
  padding: 10px;
  position: relative;
  text-align: center;
  cursor: pointer;
}

.mc-file-box:hover {
  border-color: #ffd54f;
}

.member-avatar {
  width: 36px;
  height: 36px;
  background-color: #373737;
  border: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.member-info {
  flex: 1;
  overflow: hidden;
}

.member-name {
  font-size: 10px;
  color: #111111;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.member-role-badge {
  font-size: 8px;
  display: inline-block;
  padding: 2px 4px;
  background: #111111;
  color: #55ff55;
  border: 1px solid #000;
  text-shadow: 1px 1px #000;
}

#userList li {
  color: #ffffff;
}

.role-yazilim { color: #55ffff; }
.role-mekanik { color: #ffaa00; }
.role-aviyonik { color: #ff5555; }
.role-pilotaj { color: #55ff55; }

/* --- CANLI KATILIMCI TABLOSU (ADMIN) --- */
.mc-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 3px solid #000;
}

.mc-table {
  width: 100%;
  border-collapse: collapse;
  background: #2b2b2b;
  color: #fff;
  font-size: 9px;
}

.mc-table th {
  background: #181818;
  padding: 8px;
  text-align: left;
  border-bottom: 2px solid #555;
  color: #ffaa00;
}

.mc-table td {
  padding: 8px;
  border-bottom: 1px solid #3d3d3d;
}

.mc-table tr:hover {
  background: #3a3a3a;
}

/* --- QR KOD GÖRSELİ ÇERÇEVESİ --- */
.qr-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 4px solid #000;
  box-shadow: inset 4px 4px 0px 0px #c6c6c6, inset -4px -4px 0px 0px #555;
  padding: 16px;
  margin: 16px auto;
  max-width: 280px;
}

.qr-image {
  width: 220px;
  height: 220px;
  image-rendering: pixelated;
  border: 2px solid #000;
}

/* --- LEAFLET HARİTA KAPSAYICISI (ÖZELLİK 4) --- */
.mc-map-wrapper {
  border: 4px solid #000;
  box-shadow: 
    inset 3px 3px 0px #ffffff,
    inset -3px -3px 0px #373737,
    0 6px 12px rgba(0,0,0,0.5);
  margin-top: 14px;
  overflow: hidden;
  position: relative;
}

#sessionMap {
  width: 100%;
  height: 320px;
  z-index: 1;
}

/* Leaflet Popup Minecraft Style */
.leaflet-popup-content-wrapper {
  background: #c6c6c6 !important;
  color: #000 !important;
  border: 3px solid #000 !important;
  border-radius: 0 !important;
  font-family: 'Press Start 2P', monospace !important;
  font-size: 9px !important;
  box-shadow: inset 2px 2px 0px #fff, inset -2px -2px 0px #555 !important;
}

.leaflet-popup-tip {
  background: #c6c6c6 !important;
}

/* --- LİDERLİK TABLOSU & PODYUM (ÖZELLİK 6) --- */
.podium-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
  text-align: center;
}

.podium-step {
  flex: 1;
  max-width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.podium-user {
  background: #333;
  color: #fff;
  border: 2px solid #000;
  padding: 6px 4px;
  font-size: 9px;
  margin-bottom: 6px;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-block {
  width: 100%;
  border: 3px solid #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  padding: 10px 4px;
}

.podium-first {
  height: 120px;
  background: #f5b700;
  box-shadow: inset 3px 3px 0px #fff, inset -3px -3px 0px #b78103;
  color: #000;
}

.podium-second {
  height: 90px;
  background: #b0bec5;
  box-shadow: inset 3px 3px 0px #fff, inset -3px -3px 0px #546e7a;
  color: #000;
}

.podium-third {
  height: 70px;
  background: #cd7f32;
  box-shadow: inset 3px 3px 0px #fff, inset -3px -3px 0px #8d4f18;
  color: #fff;
}

.stat-bar-wrap {
  background: #333;
  border: 2px solid #000;
  height: 16px;
  margin-top: 4px;
  position: relative;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  background: #55ff55;
  box-shadow: inset 1px 1px 0px #fff, inset -1px -1px 0px #1b5e20;
}

/* --- STATUS & BADGES --- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 9px;
  border: 2px solid #000;
  text-transform: uppercase;
}

.status-active {
  background-color: #2e7d32;
  color: #ffffff;
}

.status-inactive {
  background-color: #c62828;
  color: #ffffff;
}

.status-pulse {
  width: 8px;
  height: 8px;
  background-color: #55ff55;
  box-shadow: 0 0 6px #55ff55;
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* --- ACHIEVEMENT UNLOCKED BANNER --- */
.mc-achievement-box {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 320px;
  background-color: #212121;
  border: 3px solid #555555;
  box-shadow: 
    inset 2px 2px 0px 0px #777777,
    inset -2px -2px 0px 0px #000000,
    0 8px 24px rgba(0,0,0,0.8);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  transform: translateY(-120px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.mc-achievement-box.show {
  transform: translateY(0);
  opacity: 1;
}

.mc-achievement-icon {
  width: 38px;
  height: 38px;
  background-color: #ffaa00;
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0px #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.mc-achievement-content {
  overflow: hidden;
}

.mc-achievement-title {
  color: #ffff55;
  font-size: 9px;
  margin-bottom: 4px;
  text-shadow: 1px 1px 0px #000;
}

.mc-achievement-desc {
  color: #ffffff;
  font-size: 8px;
  line-height: 1.4;
  text-shadow: 1px 1px 0px #000;
}

/* --- MINECRAFT HATA / UYARI MODAL DİYALOGU --- */
.mc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mc-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mc-modal-dialog {
  background-color: var(--mc-gui-bg);
  border: 4px solid #000;
  box-shadow: 
    inset -4px -4px 0px 0px var(--mc-gui-border-shadow),
    inset 4px 4px 0px 0px var(--mc-gui-border-light),
    0 12px 30px rgba(0,0,0,0.8);
  width: 100%;
  max-width: 440px;
  padding: 20px;
  color: #222;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.mc-modal-overlay.active .mc-modal-dialog {
  transform: scale(1);
}

.mc-modal-title {
  font-size: 12px;
  color: #aa0000;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.mc-modal-message {
  font-size: 10px;
  line-height: 1.6;
  color: #222222;
  margin-bottom: 20px;
  padding: 12px;
  background: #e0e0e0;
  border: 2px solid #555;
}

/* --- FOOTER --- */
.mc-footer {
  text-align: center;
  padding: 16px;
  font-size: 8px;
  color: #777777;
  text-shadow: 1px 1px 0px #000;
}

/* --- MOBİL UYARLAMA --- */
@media (max-width: 480px) {
  .mc-title {
    font-size: 16px;
  }
  .mc-panel {
    padding: 14px;
  }
  .mc-btn {
    font-size: 9px;
    padding: 10px 12px;
  }
  .member-slot {
    padding: 10px;
  }
  .member-name {
    font-size: 9px;
  }
  .podium-container {
    gap: 6px;
  }
  .podium-user {
    font-size: 7px;
  }
}
