/* ============================================================
   DOSYA SORUMLULUGU — features-05-muscle-page-overlay.css
   ------------------------------------------------------------
   NE YAPAR   : Kas sayfasi tam ekran katmani: tema renkleri, egzersiz listesi, kutuphane sayfasi.
   KAYNAK     : v3.12.0'da bolundu — kurallar birebir tasindi,
                hicbir kural yeniden yazilmadi veya siralanmadi.
   SIRA       : index.html'deki <link> sirasi kaskadi belirler.
                Bu dosyanin sirasini DEGISTIRME.
   ------------------------------------------------------------
   Tam dosya listesi ve sira: BAGIMLILIK-HARITASI.md
   ============================================================ */

/* ============================================================
   CARDS
   ============================================================ */
/* ============================================================
   MUSCLE PAGE OVERLAY
   ============================================================ */
#mp-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  max-width: 430px;
  margin: 0 auto;
  z-index: 500;
  display: flex;
  flex-direction: column;
  transform: translateY(102%);
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
  overflow: hidden;
  pointer-events: none;
}
#mp-overlay.open { transform: translateY(0); pointer-events: all; }

.mp-bg {
  position: absolute;
  inset: 0;
  transition: background 0.3s ease;
}

/* Per-muscle themes */
#mp-overlay.mp-chest  .mp-bg { background: linear-gradient(160deg, #7a2018 0%, #9e2e22 40%, #b83828 100%); }
#mp-overlay.mp-back-group   .mp-bg { background: linear-gradient(160deg, #153660 0%, #1e4d82 40%, #2660a0 100%); }
#mp-overlay.mp-shoulder .mp-bg { background: linear-gradient(160deg, #5e3c08 0%, #7c5010 40%, #9a6418 100%); }
#mp-overlay.mp-arms   .mp-bg { background: linear-gradient(160deg, #0e4e44 0%, #166858 40%, #1c8470 100%); }
#mp-overlay.mp-legs   .mp-bg { background: linear-gradient(160deg, #341860 0%, #46227e 40%, #582c9c 100%); }

/* Noise texture overlay */
.mp-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.3;
  pointer-events: none;
}

.mp-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.mp-topbar {
  display: flex;
  align-items: center;
  padding: max(env(safe-area-inset-top, 0px) + 14px, 14px) 16px 12px;
  gap: 12px;
  flex-shrink: 0;
}
.mp-back {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: 1.5px solid rgba(255,255,255,0.50);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
  line-height: 1;
}
.mp-back:active { background: rgba(255,255,255,0.40); transform: scale(0.93); }

.mp-header {
  flex: 1;
  min-width: 0;
}
.mp-muscle-name {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.mp-muscle-en { display: none; }

/* accent colors per muscle — EN label uses opacity, PR uses color */
#mp-overlay.mp-chest   .mp-ex-pr { color: #ff9985; }
#mp-overlay.mp-back-group    .mp-ex-pr { color: #8aaddb; }
#mp-overlay.mp-shoulder .mp-ex-pr { color: #ffd080; }
#mp-overlay.mp-arms    .mp-ex-pr { color: #5dd5c8; }
#mp-overlay.mp-legs    .mp-ex-pr { color: #c4a8f0; }

.mp-add-fab {
  position: absolute;
  bottom: 28px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 300;
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 120;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.25);
  transition: transform 0.15s cubic-bezier(0.34,1.56,0.64,1), opacity 0.15s;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255,255,255,0.3);
}
#mp-overlay.mp-chest    .mp-add-fab { background: rgba(255,107,82,0.55);  border-color: #ff6b52; }
#mp-overlay.mp-back-group    .mp-add-fab { background: rgba(80,128,184,0.55); border-color: #5080b8; }
#mp-overlay.mp-shoulder .mp-add-fab { background: rgba(240,176,64,0.55); border-color: #f0b040; }
#mp-overlay.mp-arms     .mp-add-fab { background: rgba(58,184,168,0.55); border-color: #3ab8a8; }
#mp-overlay.mp-legs     .mp-add-fab { background: rgba(152,120,204,0.55);border-color: #9878cc; }
.mp-add-fab:active { transform: scale(0.88); opacity: 0.8; }

/* Sub-pill strip */
.mp-sub-strip {
  display: flex;
  gap: 8px;
  padding: 4px 16px 18px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.mp-sub-strip::-webkit-scrollbar { display: none; }
.mp-sub-pill {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.60);
  background: rgba(255,255,255,0.25);
  transition: all 0.2s;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.mp-sub-pill.active {
  color: #fff;
  border-color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.40);
}

/* Exercise list */
.mp-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 100px;
  scrollbar-width: none;
}
.mp-list::-webkit-scrollbar { display: none; }

.mp-ex-item {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.32);
  border: 1.5px solid rgba(255,255,255,0.55);
  border-radius: 18px;
  margin-bottom: 10px;
  overflow: hidden;
  position: relative;
  transition: transform 0.28s cubic-bezier(0.25,0.46,0.45,0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.40);
}
.mp-ex-main {
  flex: 1;
  padding: 16px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mp-ex-main:active { background: rgba(255,255,255,0.05); }

.mp-ex-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  border: 1.5px solid rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.mp-ex-info { flex: 1; min-width: 0; }
.mp-ex-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mp-ex-pr {
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
  color: rgba(255,255,255,0.95);
}
#mp-overlay.mp-chest    .mp-ex-pr { color: rgba(255,255,255,0.95); }
#mp-overlay.mp-back-group     .mp-ex-pr { color: rgba(255,255,255,0.95); }
#mp-overlay.mp-shoulder .mp-ex-pr { color: rgba(255,255,255,0.95); }
#mp-overlay.mp-arms     .mp-ex-pr { color: rgba(255,255,255,0.95); }
#mp-overlay.mp-legs     .mp-ex-pr { color: rgba(255,255,255,0.95); }

.mp-ex-arrow {
  font-size: 20px;
  color: rgba(255,255,255,0.90);
  flex-shrink: 0;
}

/* Swipe-to-delete */
.mp-ex-del {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: #DC2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.25,0.46,0.45,0.94);
  border-radius: 0 18px 18px 0;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}
.mp-ex-item.swiped .mp-ex-del { transform: translateX(0); }
.mp-ex-item.swiped { transform: translateX(-80px); }

/* Empty state */
.mp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 30px;
  text-align: center;
  gap: 12px;
}
.mp-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 4px;
}
.mp-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}
.mp-empty-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
}

/* Add exercise input bar */
/* Library Sheet */
.mp-lib-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 10;
  pointer-events: none;
  transition: background 0.3s ease;
}
.mp-lib-backdrop.open {
  background: rgba(0,0,0,0.5);
  pointer-events: all;
}
.mp-lib-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 11;
  border-radius: 24px 24px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.32,0.72,0,1);
  display: flex;
  flex-direction: column;
  max-height: 72%;
}
.mp-lib-sheet.open { transform: translateY(0); }
#mp-overlay.mp-chest    .mp-lib-sheet { background: #7a2418; }
#mp-overlay.mp-back-group .mp-lib-sheet { background: #183e64; }
#mp-overlay.mp-shoulder .mp-lib-sheet { background: #624010; }
#mp-overlay.mp-arms     .mp-lib-sheet { background: #104e42; }
#mp-overlay.mp-legs     .mp-lib-sheet { background: #321860; }
.mp-lib-handle {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.2);
  margin: 12px auto 0;
  flex-shrink: 0;
}
.mp-lib-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  flex-shrink: 0;
}
.mp-lib-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.mp-lib-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mp-lib-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 16px 8px;
  scrollbar-width: none;
}
.mp-lib-list::-webkit-scrollbar { display: none; }
.mp-lib-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 6px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.38);
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.mp-lib-item:active { background: rgba(255,255,255,0.34); }
.mp-lib-item-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.mp-lib-item-del {
  font-size: 14px;
  color: rgba(255,255,255,0.90);
  padding: 4px 6px;
  cursor: pointer;
}
.mp-lib-empty {
  text-align: center;
  padding: 28px 0 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}
.mp-lib-add-row {
  display: flex;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
}
.mp-lib-input {
  flex: 1;
  height: 46px;
  background: rgba(255,255,255,0.20);
  border: 1.5px solid rgba(255,255,255,0.40);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  outline: none;
}
.mp-lib-input::placeholder { color: rgba(255,255,255,0.65); }
.mp-lib-input:focus { border-color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.28); }
.mp-lib-add-btn {
  height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
#mp-overlay.mp-chest    .mp-lib-add-btn { background: #E8503A; }
#mp-overlay.mp-back-group .mp-lib-add-btn { background: #3A5A8C; }
#mp-overlay.mp-shoulder .mp-lib-add-btn { background: #E8A030; }
#mp-overlay.mp-arms     .mp-lib-add-btn { background: #2A9D8F; }
#mp-overlay.mp-legs     .mp-lib-add-btn { background: #7B5EA7; }

