/* =====================================================
   MASAKEYFİ ASİSTAN / OYUN REHBERİ
   Bağımsız dosya - game-guide dosyalarına dokunmaz
===================================================== */

#mk-assistant-root,
#mk-assistant-modal {
  font-family: Arial, sans-serif;
}

#mk-assistant-root {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 2147482500;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

#mk-assistant-btn {
  width: 76px;
  height: 76px;
  border: 2px solid #e8c84a;
  border-radius: 50%;
  padding: 0;
  background:
    radial-gradient(circle at top, rgba(232,200,74,.35), transparent 58%),
    linear-gradient(160deg, #0b314b, #031827);
  overflow: hidden;
  cursor: pointer;
  pointer-events: auto;
  box-shadow:
    0 0 18px rgba(232,200,74,.62),
    0 10px 24px rgba(0,0,0,.65);
  animation: mkAsistanFloat 2.5s ease-in-out infinite;
}

#mk-assistant-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#mk-assistant-bubble {
  margin-bottom: 10px;
  padding: 8px 11px;
  border-radius: 14px 14px 14px 4px;
  border: 1px solid rgba(232,200,74,.58);
  background: rgba(3,18,31,.94);
  color: #fff6c8;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1.1;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(0,0,0,.5);
  animation: mkAsistanBubble 1.9s ease-in-out infinite;
}

#mk-assistant-modal {
  position: fixed;
  inset: 0;
  z-index: 2147482600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 12, 22, .80);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

#mk-assistant-modal.show {
  display: flex;
}

.mk-assistant-card {
  position: relative;
  width: min(780px, 96vw);
  max-height: 92dvh;
  overflow: hidden;
  border: 2px solid #e8c84a;
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(232,200,74,.16), transparent 45%),
    linear-gradient(160deg, #082d46, #031827);
  box-shadow:
    0 22px 80px rgba(0,0,0,.78),
    0 0 34px rgba(232,200,74,.26);
}

.mk-assistant-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 50%;
  background: rgba(0,0,0,.38);
  color: #fff;
  font-size: 22px;
  font-weight: 1000;
  cursor: pointer;
}

.mk-assistant-head {
  padding: 20px 20px 8px;
  text-align: center;
}

.mk-assistant-title {
  color: #e8c84a;
  font-size: 25px;
  font-weight: 1000;
  letter-spacing: .4px;
}

.mk-assistant-subtitle {
  margin-top: 6px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  font-weight: 800;
}

.mk-assistant-games {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 18px 20px 22px;
}

.mk-assistant-game {
  min-height: 148px;
  border: 2px solid rgba(232,200,74,.45);
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.12), transparent 55%),
    rgba(255,255,255,.06);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
  transition:
    transform .15s ease,
    border-color .15s ease,
    background .15s ease;
}

.mk-assistant-game:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: #e8c84a;
  background: rgba(232,200,74,.11);
}

.mk-assistant-game img {
  width: 96px;
  height: 74px;
  object-fit: contain;
  display: block;
  margin: 8px auto 8px;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.55));
}

.mk-assistant-game span {
  display: block;
  color: #fff6c8;
  font-size: 15px;
  font-weight: 1000;
}

.mk-assistant-tutorial {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  padding: 18px;
  align-items: stretch;
}

.mk-assistant-character {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 330px;
}

.mk-assistant-character img {
  max-width: 145px;
  max-height: 330px;
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(0,0,0,.65));
  animation: mkAsistanFloat 2.6s ease-in-out infinite;
}

.mk-assistant-demo-side {
  min-width: 0;
}

.mk-assistant-talk {
  border: 1px solid rgba(232,200,74,.38);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(0,0,0,.24);
  color: #fff;
  margin-bottom: 12px;
}

.mk-assistant-talk-title {
  color: #e8c84a;
  font-size: 18px;
  font-weight: 1000;
  margin-bottom: 5px;
}

#mk-assistant-talk-text {
  color: rgba(255,255,255,.86);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.mk-assistant-table {
  position: relative;
  min-height: 270px;
  border: 2px solid rgba(232,200,74,.24);
  border-radius: 20px;
  background:
    radial-gradient(circle at center, rgba(0,92,70,.75), rgba(0,45,38,.95) 62%, rgba(0,18,25,.98));
  box-shadow:
    inset 0 0 40px rgba(0,0,0,.55),
    0 12px 26px rgba(0,0,0,.45);
  overflow: hidden;
}

.mk-assistant-table-label {
  position: absolute;
  top: 8px;
  left: 12px;
  color: rgba(255,255,255,.55);
  font-size: 11px;
  font-weight: 900;
}

#mk-assistant-deck {
  position: absolute;
  top: 52px;
  left: 52%;
  transform: translateX(-50%);
  width: 58px;
  height: 78px;
  border-radius: 9px;
  border: 2px solid rgba(255,255,255,.35);
  background:
    linear-gradient(135deg, #173b73, #071d3b);
  color: #fff;
  font-size: 11px;
  font-weight: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(0,0,0,.5);
}

#mk-assistant-op-discard {
  position: absolute;
  top: 56px;
  right: 82px;
  min-width: 64px;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#mk-assistant-open-area {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 142px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

#mk-assistant-hand {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  min-height: 62px;
  border-radius: 14px;
  background: rgba(43,24,8,.72);
  border: 1px solid rgba(232,200,74,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px;
  box-shadow: inset 0 4px 12px rgba(0,0,0,.45);
}

.mk-assistant-tile {
  width: 34px;
  height: 48px;
  border-radius: 6px;
  background: linear-gradient(180deg, #fff8d8, #e8d69a);
  border: 1px solid rgba(70,45,10,.45);
  color: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 15px;
  font-weight: 1000;
  box-shadow: 0 3px 7px rgba(0,0,0,.35);
}

.mk-assistant-tile small {
  font-size: 8px;
  font-weight: 1000;
}

.mk-assistant-tile.red {
  color: #d11f1f;
}

.mk-assistant-tile.blue {
  color: #1b63d8;
}

.mk-assistant-tile.black {
  color: #111;
}

.mk-assistant-tile.yellow {
  color: #c68a00;
}

.mk-assistant-tile.hl {
  transform: translateY(-8px);
  box-shadow:
    0 0 0 2px #e8c84a,
    0 0 16px rgba(232,200,74,.9),
    0 6px 12px rgba(0,0,0,.45);
}

.mk-assistant-tile.opened {
  width: 30px;
  height: 42px;
  font-size: 13px;
}

.mk-assistant-discard-title {
  position: absolute;
  top: 36px;
  right: 78px;
  color: rgba(255,255,255,.58);
  font-size: 10px;
  font-weight: 900;
}

.mk-assistant-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.mk-assistant-controls button {
  min-height: 40px;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 1000;
}

.mk-assistant-secondary {
  background: rgba(255,255,255,.10);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18) !important;
}

.mk-assistant-gold {
  background: linear-gradient(135deg, #e8c84a, #b98916);
  color: #251600;
  box-shadow: 0 8px 18px rgba(0,0,0,.38);
}

.mk-assistant-progress {
  margin-top: 8px;
  text-align: center;
  color: rgba(255,255,255,.58);
  font-size: 11px;
  font-weight: 900;
}

.mk-assistant-win {
  color: #72ff9c !important;
  text-shadow: 0 0 10px rgba(80,255,130,.55);
}

@keyframes mkAsistanFloat {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes mkAsistanBubble {
  0%, 100% {
    transform: scale(1);
    opacity: .94;
  }

  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@media (max-width: 760px), (max-height: 540px) {
  #mk-assistant-root {
    left: 8px;
    bottom: 8px;
  }

  #mk-assistant-btn {
    width: 58px;
    height: 58px;
  }

  #mk-assistant-bubble {
    font-size: 10px;
    padding: 6px 8px;
  }

  .mk-assistant-card {
    width: 98vw;
    max-height: 96dvh;
    border-radius: 18px;
  }

  .mk-assistant-title {
    font-size: 18px;
  }

  .mk-assistant-games {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px;
  }

  .mk-assistant-game {
    min-height: 100px;
    border-radius: 14px;
  }

  .mk-assistant-game img {
    width: 66px;
    height: 46px;
    margin-top: 6px;
  }

  .mk-assistant-game span {
    font-size: 11px;
  }

  .mk-assistant-tutorial {
    grid-template-columns: 82px 1fr;
    gap: 8px;
    padding: 10px;
  }

  .mk-assistant-character {
    min-height: 250px;
  }

  .mk-assistant-character img {
    max-width: 82px;
    max-height: 250px;
  }

  .mk-assistant-talk {
    padding: 8px 10px;
    margin-bottom: 8px;
  }

  .mk-assistant-talk-title {
    font-size: 14px;
  }

  #mk-assistant-talk-text {
    font-size: 11px;
  }

  .mk-assistant-table {
    min-height: 225px;
  }

  .mk-assistant-tile {
    width: 25px;
    height: 36px;
    font-size: 11px;
    border-radius: 5px;
  }

  .mk-assistant-tile small {
    font-size: 7px;
  }

  .mk-assistant-tile.opened {
    width: 23px;
    height: 32px;
    font-size: 10px;
  }

  #mk-assistant-hand {
    gap: 2px;
    padding: 5px;
  }

  #mk-assistant-open-area {
    top: 118px;
    gap: 3px;
  }

  #mk-assistant-deck {
    top: 42px;
    width: 44px;
    height: 58px;
    font-size: 9px;
  }

  #mk-assistant-op-discard {
    top: 42px;
    right: 44px;
    min-width: 48px;
    min-height: 60px;
  }

  .mk-assistant-discard-title {
    top: 25px;
    right: 42px;
  }

  .mk-assistant-controls {
    gap: 6px;
    margin-top: 8px;
  }

  .mk-assistant-controls button {
    min-height: 34px;
    font-size: 11px;
  }
}

/* GERÇEK 101 OYUNU TUTORIAL IFRAME */

.mk-assistant-real-game-right {
  padding: 16px 16px 16px 6px !important;
  justify-content: stretch !important;
}

#mk-assistant-real-game-frame {
  width: 100% !important;
  height: 100% !important;
  border: 2px solid rgba(232,200,74,.55) !important;
  border-radius: 18px !important;
  background: #031827 !important;
  display: block !important;
  overflow: hidden !important;
  box-shadow:
    inset 0 0 18px rgba(0,0,0,.55),
    0 12px 24px rgba(0,0,0,.45) !important;
}

@media (max-width: 760px), (max-height: 540px) {
  .mk-assistant-real-game-right {
    padding: 24px 2px 2px 0px !important;
  }

  #mk-assistant-real-game-frame {
    border-radius: 12px !important;
  }
}