/* ===== Online Guitar Tuner PRO (UI Styles) ===== */

:root{
  --tt-bg: rgba(0,0,0,.40);          /* mehr Kontrast */
  --tt-panel: rgba(0,0,0,.28);
  --tt-border: rgba(255,255,255,.14);
  --tt-border-2: rgba(255,255,255,.18);
  --tt-text: #fff;
  --tt-muted: rgba(255,255,255,.62);

  --tt-blue: rgba(44,130,255,1);
  --tt-blue2: rgba(26,96,214,1);
  --tt-green: rgba(33,208,122,1);
  --tt-red: rgba(255,59,59,1);
}

#tt-tuner-root{
  max-width: 940px;
  margin: 0 auto;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* card container */
.tt-card{
  position: relative;
  border-radius: 22px;
  padding: 18px 18px 14px; /* kompakter */
  color: var(--tt-text);
  background: var(--tt-bg);
  border: 1px solid var(--tt-border);
  backdrop-filter: blur(8px);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* title */
.tt-title{
  text-align:center;
  font-weight: 900;
  letter-spacing: .3px;
  font-size: 26px;   /* etwas kleiner */
  margin-bottom: 14px;
  line-height: 1.05;
}
.tt-title small{
  font-size: 11px;
  opacity: .75;
  font-weight: 900;
  margin-left: 6px;
  vertical-align: super;
}

/* grid for selects */
.tt-grid{
  display:grid;
  grid-template-columns: 1fr 1fr; /* bleibt 2-spaltig auch mobil */
  gap: 12px;
  margin-bottom: 12px;
}

.tt-field{ width:100%; }

.tt-select{
  width:100%;
  border-radius: 14px;
  border: 1px solid var(--tt-border-2);
  background: rgba(0,0,0,.38);  /* dunkler => mehr Kontrast */
  padding: 0px;          /* weniger Höhe */
  overflow:hidden;
}

.tt-select select{
  width:100%;
  border:none;
  outline:none;
  background: transparent;
  color: var(--tt-text);
  font-size: 16px;   /* kleiner => weniger Höhe */
  font-weight: 900;
  letter-spacing: .2px;
  appearance:none;
}

/* button */
.tt-btn{
  width:100%;
  display:block;
  border:none;
  border-radius: 16px;
  padding: 16px 16px; /* kompakter */
  background: linear-gradient(180deg, var(--tt-blue), var(--tt-blue2));
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .6px;
  cursor:pointer;
  margin: 8px 0 12px;
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}
.tt-btn:disabled{
  opacity:.5;
  cursor:not-allowed;
}

/* panel */
.tt-panel{
  border-radius: 16px;
  border: 1px solid var(--tt-border);
  background: var(--tt-panel);
  padding: 12px 10px 10px; /* kompakter */
}

/* strings row */
.tt-stringRow{
  display:flex;
  align-items:stretch;
  justify-content:space-between;
  gap: 8px; /* enger */
}

.tt-cell{
  flex: 1;
  min-width: 0;
  padding: 8px 6px 8px; /* kompakter */
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 6px; /* enger */
}

/* bars */
.tt-bars{
  width: 100%;
  display:flex;
  flex-direction:column;
  gap: 2px; /* enger */
}
.tt-bars span{
  height: 3px;
  border-radius: 4px;
  background: rgba(255,255,255,.10);
  opacity: .38;
  transition: opacity .10s ease, box-shadow .10s ease, background .10s ease;
}
.tt-bars span.on{
  opacity: 1;
}

/* ===== WIE DU WILLST: SHARP (oben) = ROT, FLAT (unten) = BLAU ===== */

/* SHARP = zu hoch = ROT */
.tt-bars.sharp span.on{
  background: rgba(255,59,59,.82);
  box-shadow: 0 0 10px rgba(255,59,59,.18);
}

/* FLAT = zu tief = BLAU */
.tt-bars.flat span.on{
  background: rgba(44,130,255,.86);
  box-shadow: 0 0 10px rgba(44,130,255,.20);
}

#ttTuning option, #ttInstrument option, #ttCapoPos option {background: #000;}

.tt-capo input {
    margin: 0!important;
}

/* note label */
.tt-note{
  font-size: 20px!important; /* kleiner */
	margin-top: 0px!important;
  font-weight: 900;
  letter-spacing: .3px;
  opacity: .88;
}
.tt-note.inactive{ opacity: .62; }
.tt-note.active{ opacity: 1; }
.tt-note.locked{
  opacity: 1;
  color: rgba(33,208,122,1);
  text-shadow: 0 0 12px rgba(33,208,122,.22);
}

/* hz readout */
.tt-hz{
  font-size: 10px;
  font-weight: 900;
  color: var(--tt-muted);
  min-height: 14px;
  width: 72px; /* kleiner => weniger Platz */
  text-align:center;
  letter-spacing: .2px;
}

/* capo */
.tt-capo{
  margin-top: 12px;
  display:flex;
  align-items:center;
  gap: 10px;
}
.tt-capo label{
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.26);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.tt-capo input{
  width: 14px;
  height: 14px;
  accent-color: rgba(44,130,255,1);
}
.tt-capoTitle{
  font-weight: 900;
  opacity: .78;
  letter-spacing: .4px;
}
.tt-capo .tt-select{
  max-width: 160px;
  padding: 10px 10px; /* kompakter */
}
.tt-capo .tt-select select{
  font-size: 15px;
}

/* ===== Responsive: NICHT mehr 1-spaltig bei 760px (war zu hoch).
   Stattdessen erst bei sehr klein (<=420px) auf 1 Spalte gehen. ===== */

@media (max-width: 520px){
  .tt-card{ padding: 14px 14px 12px; }
  .tt-title{ font-size: 22px; margin-bottom: 12px; }
  .tt-select{ padding: 5px 5px; }
  .tt-select select{ font-size: 15px; }
  .tt-btn{ padding: 14px 14px; font-size: 17px; }
  .tt-panel{ padding: 10px 8px 8px; }
  .tt-stringRow{ gap: 6px; }
  .tt-cell{ padding: 7px 5px; gap: 5px; }
  .tt-note{ font-size: 22px; }
  .tt-hz{ width: 66px; font-size: 10px; }
}

@media (max-width: 420px){
  /* ganz kleine Screens: dann lieber 1 Spalte, damit es nicht gequetscht aussieht */
  .tt-grid{ grid-template-columns: 1fr; gap: 10px; }
  .tt-hz{ width: 62px; }
}
