/* =========================================================
   Guitar Exercise Trainer — هوية Nasskar Teal (فاتحة/ورقية)
   كل شيء معزول تحت .gtex-player لتفادي التعارض مع تصميم القالب.
   الخطوط (DM Sans + IBM Plex Sans Arabic) مستضافة محليًا بالكامل.
   ========================================================= */

@font-face{
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/dm-sans-variable.woff2') format('woff2');
}
@font-face{
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-arabic-400.woff2') format('woff2');
}
@font-face{
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-arabic-500.woff2') format('woff2');
}
@font-face{
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/ibm-plex-arabic-600.woff2') format('woff2');
}
@font-face{
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/ibm-plex-arabic-700.woff2') format('woff2');
}

.gtex-player{
  --nk-teal: #236373;
  --nk-teal-dark: #184d5c;
  --nk-teal-soft: #d5e7ec;
  --nk-mist: #f1f3f4;
  --nk-paper: #f7f7f7;
  --nk-ink: #121212;
  --nk-muted: #7a7a7a;
  --nk-gold: #d3a24c;
  --nk-border: rgba(35,99,115,0.12);
  --nk-shadow: 0 14px 38px rgba(30,63,72,0.08), 0 2px 8px rgba(30,63,72,0.05);
  --nk-radius-lg: 24px;
  --nk-radius-md: 16px;
  --nk-radius-sm: 10px;
  --nk-font-body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  --nk-font-display: 'DM Sans', 'Segoe UI', Tahoma, Arial, sans-serif;
  --nk-ease: cubic-bezier(0.23, 1, 0.32, 1);

  position: relative;
  width: 863px;
  padding: 0;
  background: var(--nk-paper);
  color: var(--nk-ink);
  font-family: var(--nk-font-body);
  direction: rtl;
  border-radius: var(--nk-radius-lg);
  box-sizing: border-box;
}

.gtex-scale-outer{
  width: 100%;
  max-width: 863px;
  margin: 24px auto;
  position: relative;
}
.gtex-player *{ box-sizing: border-box; }
.gtex-player [hidden]{ display: none !important; }

.gtex-exercise-title{
  font-family: var(--nk-font-display);
  font-size: 18px; font-weight: 800; color: var(--nk-ink);
  margin: 4px 4px 12px;
}

.gtex-loading-overlay{
  display: flex; align-items: center; justify-content: center; padding: 30px 16px;
}
.gtex-loading-banner{
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--nk-border);
  border-radius: var(--nk-radius-md); padding: 18px 20px;
  color: var(--nk-muted); font-size: 14px; box-shadow: var(--nk-shadow);
}
.gtex-spinner{
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid var(--nk-teal-soft); border-top-color: var(--nk-teal);
  animation: gtex-nk-spin 0.9s linear infinite; flex-shrink: 0;
}
@keyframes gtex-nk-spin{ to{ transform: rotate(360deg); } }

.gtex-error-banner{
  margin-top: 14px; background: #fdf1ef; border: 1px solid #e5978a;
  color: #9a3a2c; padding: 10px 14px; border-radius: var(--nk-radius-sm);
  font-size: 13px; text-align: center;
}

.gtex-stage{ display: flex; flex-direction: column; gap: 14px; }

.gtex-fretboard-card, .gtex-notation-card, .gtex-controls-card{
  background: #fff;
  border: 1px solid var(--nk-border);
  border-radius: var(--nk-radius-lg);
  box-shadow: var(--nk-shadow);
  padding: 18px 18px 14px;
}

.gtex-card-title{
  font-family: var(--nk-font-display);
  font-size: 12px; font-weight: 700; letter-spacing: 0.03em;
  color: var(--nk-teal); margin: 0 0 4px;
  display: flex; align-items: center; gap: 7px;
  text-transform: uppercase;
}

.gtex-beat-bar{
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 14px; direction: ltr;
  min-width: 0;
}
.gtex-beat-bar-label{
  font-family: var(--nk-font-display); color: var(--nk-teal);
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.gtex-beat-dots{ display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; justify-content: center; scrollbar-width: none; }
.gtex-beat-dots::-webkit-scrollbar{ display: none; }
.gtex-beat-dot{
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  color: #6d777b; background: var(--nk-mist);
  font-family: var(--nk-font-display); font-size: 13px; font-weight: 700;
  transition: background 160ms var(--nk-ease), color 160ms var(--nk-ease), box-shadow 160ms var(--nk-ease);
}
.gtex-beat-dot.active{ color: #fff; background: var(--nk-teal); box-shadow: 0 5px 14px rgba(35,99,115,0.28); }
.gtex-bar-meter{
  padding: 6px 9px; border-radius: 9px; color: var(--nk-teal);
  background: var(--nk-teal-soft); font-family: var(--nk-font-display);
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}

.gtex-fretboard-wrap{
  background: linear-gradient(180deg, #fbfcfc, #f4f6f6);
  border-radius: var(--nk-radius-md);
  padding: 8px 4px;
  overflow-x: auto;
}
.gtex-fretboard-svg{ width: 100%; height: auto; display: block; }
.gtex-ft-string{ stroke: #acb7ba; }
.gtex-ft-fretwire{ stroke: #9aa5a8; }
.gtex-ft-nut{ stroke: #1a2325; }
.gtex-ft-inlay{ fill: #c7d0d2; }
.gtex-ft-string-badge{ fill: var(--nk-teal); opacity: 0; }
.gtex-ft-string-badge.active{ opacity: 1; }
.gtex-ft-string-label{ fill: #4c5a5f; font-size: 14px; font-weight: 600; font-family: var(--nk-font-display); }
.gtex-ft-string-label.active{ fill: #fff; font-weight: 800; font-size: 14px; }
.gtex-ft-fret-label{ fill: #697578; font-size: 10px; font-family: var(--nk-font-display); }
.gtex-ft-note-marker{
  fill: var(--nk-teal); stroke: #fff; stroke-width: 2.5;
  opacity: 0;
}
.gtex-ft-note-marker.active{ opacity: 1; }
.gtex-ft-note-text{
  fill: #fff; font-size: 11px; font-weight: 700;
  font-family: var(--nk-font-display); text-anchor: middle; dominant-baseline: central;
  opacity: 0; pointer-events: none;
}
.gtex-ft-note-text.active{ opacity: 1; }

.gtex-notation-wrap{
  background: #fcfaf1;
  border: 1px solid #e6e4dc;
  border-radius: var(--nk-radius-md);
  padding: 10px;
  overflow-x: auto;
  min-height: 160px;
  position: relative;
}
.gtex-alphatab-mount{ width: 100%; }
.gtex-notation-wrap .at-cursor-bar{ background: rgba(35,99,115,0.08); }
.gtex-notation-wrap .at-cursor-beat{ background: var(--nk-teal); width: 3px; }
.gtex-notation-wrap .at-highlight *{ fill: var(--nk-teal) !important; stroke: var(--nk-teal) !important; }

.gtex-notation-credit{
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  margin-top: 8px; padding-top: 8px;
  font-family: var(--nk-font-display);
  text-align: center;
  line-height: 1.3;
}
.gtex-notation-credit .gtex-credit-name{
  font-size: 11px; font-weight: 700; color: #121212;
}
.gtex-notation-credit .gtex-credit-powered{
  font-size: 9.5px; font-weight: 400; color: #b7bfc1;
}

.gtex-now-card{
  background: #fff; border: 1px solid var(--nk-border);
  border-radius: var(--nk-radius-lg); box-shadow: var(--nk-shadow);
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 18px;
  align-items: center;
}
.gtex-now-copy{ grid-column: 1 / 2; }
.gtex-now-copy .gtex-eyebrow{
  display: block; color: var(--nk-teal); font-size: 11.5px; font-weight: 700;
  margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.03em;
}
.gtex-now-copy h2{ margin: 0; font-size: 18px; font-weight: 800; color: var(--nk-ink); font-family: var(--nk-font-body); }
.gtex-now-copy p{ margin: 6px 0 0; color: var(--nk-muted); font-size: 13px; }
.gtex-now-copy p .gtex-accent{ color: var(--nk-gold); padding: 0 4px; }

.gtex-transport-controls{ display: flex; align-items: center; gap: 16px; direction: ltr; grid-column: 2 / 3; }
.gtex-transport-button{
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; padding: 0;
  transition: transform 160ms var(--nk-ease), box-shadow 160ms var(--nk-ease);
}
.gtex-transport-button.gtex-stop{
  width: 54px; height: 54px; border: 1.5px solid var(--nk-teal);
  border-radius: 50%; color: var(--nk-teal); background: #fff;
}
.gtex-transport-button.gtex-loop{
  width: 54px; height: 54px; border: 1.5px solid var(--nk-teal);
  border-radius: 50%; color: var(--nk-teal); background: #fff;
}
.gtex-transport-button.gtex-loop.active{ color: #fff; background: var(--nk-teal); }
.gtex-transport-button.gtex-countin{
  width: 54px; height: 54px; border: 1.5px solid var(--nk-teal);
  border-radius: 50%; color: var(--nk-teal); background: #fff;
}
.gtex-transport-button.gtex-countin.active{ color: #fff; background: var(--nk-teal); }
.gtex-transport-button.gtex-primary{
  width: 54px; height: 54px; border-radius: 50%; color: #fff;
  background: var(--nk-teal); box-shadow: 0 9px 20px rgba(35,99,115,0.26);
}
.gtex-transport-button:disabled{ opacity: 0.45; cursor: not-allowed; }
.gtex-transport-button:not(:disabled):hover{ transform: translateY(-2px); }

.gtex-now-progress{ grid-column: 1 / -1; min-width: 0; }
.gtex-progress-caption{
  display: flex; justify-content: space-between; gap: 12px;
  margin-bottom: 7px; color: var(--nk-muted); font-size: 11.5px;
}
.gtex-progress-caption strong{ color: var(--nk-teal); font-family: var(--nk-font-display); direction: ltr; unicode-bidi: isolate; }
.gtex-progress-seek{
  width: 100%; height: 7px; appearance: none; -webkit-appearance: none;
  border-radius: 999px; cursor: pointer; direction: ltr;
  background: linear-gradient(to right, var(--nk-teal) var(--range-fill, 0%), #e8ebec var(--range-fill, 0%));
}
.gtex-progress-seek:disabled{ cursor: not-allowed; opacity: 0.6; }
.gtex-progress-seek::-webkit-slider-thumb{
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  border: 2.5px solid #fff; background: var(--nk-teal);
  box-shadow: 0 2px 6px rgba(20,62,72,0.28);
  margin-top: -4px;
}
.gtex-progress-seek::-moz-range-thumb{
  width: 11px; height: 11px; border: 2.5px solid #fff; border-radius: 50%;
  background: var(--nk-teal); box-shadow: 0 2px 6px rgba(20,62,72,0.28);
}
.gtex-progress-seek::-webkit-slider-runnable-track{ height: 7px; border-radius: 999px; background: transparent; }
.gtex-progress-seek::-moz-range-track{ height: 7px; border-radius: 999px; background: transparent; }

.gtex-controls-card{ padding: 18px; }
.gtex-card-heading{ margin: 2px 0 14px; font-size: 17px; font-weight: 800; color: var(--nk-ink); font-family: var(--nk-font-body); }

.gtex-track-list{
  display: grid; border: 1px solid #e3e8e9; border-radius: var(--nk-radius-md);
  overflow: hidden; margin-top: 10px;
}
.gtex-track-row{
  display: grid;
  grid-template-columns: 30px minmax(100px, 0.75fr) minmax(120px, 1.5fr) auto;
  align-items: center; gap: 12px;
  min-height: 70px; padding: 11px 13px; background: #fafcfc;
}
.gtex-track-row + .gtex-track-row{ border-top: 1px solid #e6ebec; }
.gtex-track-icon{ display: inline-flex; align-items: center; justify-content: center; color: #6f7d80; }
.gtex-track-copy{ min-width: 0; }
.gtex-track-copy span{
  display: block; overflow: hidden; color: #263134; font-size: 13.5px;
  font-weight: 600; text-overflow: ellipsis; white-space: nowrap;
}
.gtex-track-copy strong{
  display: block; margin-top: 3px; color: var(--nk-teal);
  font-family: var(--nk-font-display); font-size: 12.5px;
  direction: ltr; unicode-bidi: isolate;
}
.gtex-icon-button{
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; border: none; cursor: pointer;
  color: #617174; background: #edf0f0;
  transition: color 160ms var(--nk-ease), background 160ms var(--nk-ease);
}
.gtex-icon-button svg{ display: block !important; width: 18px !important; height: 18px !important; flex-shrink: 0; }
.gtex-icon-button:hover{ color: var(--nk-teal); background: var(--nk-teal-soft); }
.gtex-icon-button.is-muted{ color: #8c9698; background: #eceff0; }

.gtex-range-input{
  width: 100%; height: 6px; appearance: none; -webkit-appearance: none;
  border-radius: 999px; cursor: pointer; direction: ltr;
  background: linear-gradient(to right, var(--nk-teal) var(--range-fill, 50%), #e4e9ea var(--range-fill, 50%));
}
.gtex-range-input:disabled{ cursor: not-allowed; opacity: 0.4; }
.gtex-range-input::-webkit-slider-thumb{
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid #fff; background: var(--nk-teal);
  box-shadow: 0 2px 7px rgba(20,62,72,0.22);
}
.gtex-range-input::-moz-range-thumb{
  width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%;
  background: var(--nk-teal); box-shadow: 0 2px 7px rgba(20,62,72,0.22);
}

.gtex-bpm-row{ grid-template-columns: 30px minmax(100px, 0.9fr) minmax(120px, 1.6fr) auto; }
.gtex-bpm-bounds{ color: var(--nk-muted); font-family: var(--nk-font-display); font-size: 11px; white-space: nowrap; }

@media (max-width: 380px){
  .gtex-beat-dot{ width: 24px; height: 24px; font-size: 11px; }
  .gtex-beat-bar-label{ font-size: 11px; }
  .gtex-bar-meter{ font-size: 10px; padding: 5px 7px; }
}

@media (max-width: 600px){
  .gtex-now-card{ padding: 15px; }
  .gtex-now-copy h2{ font-size: 16.5px; }
  .gtex-track-row{
    grid-template-columns: 26px minmax(90px, 1fr) minmax(90px, 1.2fr) auto;
    gap: 8px; min-height: 66px; padding: 10px 9px;
  }
  .gtex-track-copy span, .gtex-track-copy strong{ font-size: 12px; }
  .gtex-bpm-bounds{ display: none; }
}

