/* <!-- style.css --> */

@font-face {
   font-family: 'JetBrains';
   src: url('../fonts/JetBrainsMono-Thin.woff2') format('woff2');
   font-weight: 100;
   font-style: normal;
   font-display: swap;
}

:root {
   --card: #f1f1f1;
   --text: #1f2933;
   --text-contrast: #e7e7e7;
   --shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
   --font-main: "JetBrains", "JetBrains Mono", "IBM Plex Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
}

html {
   background: #0f172a;
   min-height: 100%;
}

body {
   font-family: var(--font-main);
   color: var(--text);
   background: var(--card);
   box-sizing: border-box;
   max-width: 1056px;
   width: min(1056px, calc(100% - 2.5rem));
   margin: 1.5rem auto;
   min-height: calc(100vh - 3rem);
   padding: 2rem 2.3rem;
   border-radius: 18px;
   box-shadow: var(--shadow);
   line-height: 1.7;
   font-weight: 100;
}

h1 {
   letter-spacing: 0.01em;
   color: #0f1f38;
   text-align: center;
   margin: 0 0 0.6rem 0;
   font-weight: 100;
}

.tuner-wrapper {
   display: flex;
   justify-content: center;
   margin: 1.5rem 0;
}

.tuner-box {
   background: #0f172a;
   color: var(--text-contrast);
   border-radius: 18px;
   padding: 22px 26px;
   box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
   width: min(396px, 100%);
   text-align: center;
}

.tuner-title {
   font-family: var(--font-main);
   font-size: 1.1rem;
   margin-bottom: 6px;
   opacity: 0.9;
   font-weight: 100;
}

.tuner-title a {
   color: var(--text-contrast);
   text-decoration: none;
   transition: color 0.15s ease, opacity 0.15s ease;
}

.tuner-title a:hover,
.tuner-title a:focus-visible {
   color: #cbd5e1;
   opacity: 1;
}

.note-display {
   font-size: 3.5rem;
   font-weight: 100;
   margin: 8px 0;
   color: var(--text-contrast);
   transition: color 0.12s ease;
}

.note-hit {
   color: #22c55e;
}

.note-miss {
   color: #ef4444;
}

.bar-wrapper {
   position: relative;
   height: 6px;
   background: rgba(255, 255, 255, 0.08);
   border-radius: 999px;
   overflow: hidden;
   margin-bottom: 6px;
}

.bar-indicator {
   position: absolute;
   top: 0;
   height: 100%;
   width: 4px;
   border-radius: 999px;
   background: var(--text-contrast);
   left: 50%;
   transform: translateX(-50%);
   transition: left 0.08s linear;
}

.bar-center-line {
   position: absolute;
   top: -4px;
   left: 50%;
   width: 2px;
   height: 14px;
   background: rgba(255, 255, 255, 0.35);
   transform: translateX(-50%);
}

.bar-labels {
   display: flex;
   justify-content: space-between;
   font-size: 0.7rem;
   opacity: 0.7;
   margin-bottom: 12px;
}

.key-switcher {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 0.5rem;
   margin: 0 0 12px 0;
}

.key-button {
   font-family: var(--font-main);
   display: flex;
   align-items: center;
   justify-content: center;
   border: 1px solid rgba(255, 255, 255, 0.18);
   background: rgba(255, 255, 255, 0.06);
   color: var(--text-contrast);
   border-radius: 12px;
   padding: 9px 12px;
   font-size: 1rem;
   font-weight: 100;
   cursor: pointer;
   transition: border-color 0.15s ease, background 0.15s ease, transform 0.08s ease;
   width: min(242px, 100%);
   min-height: 46px;
}

.key-button:hover {
   transform: translateY(-1px);
}

.key-button.active {
   border-color: #22c55e;
   background: rgba(34, 197, 94, 0.14);
   color: #befae2;
}

.tuner-actions {
   display: flex;
   flex-direction: column;
   align-items: center;
}

.tuner-button {
   font-family: var(--font-main);
   border: none;
   border-radius: 999px;
   padding: 11px 18px;
   font-size: 1.05rem;
   cursor: pointer;
   background: #22c55e;
   color: #0b1220;
   font-weight: 100;
   transition: transform 0.08s ease, box-shadow 0.12s ease;
   box-shadow: 0 7px 18px rgba(34, 197, 94, 0.3);
   width: min(242px, 100%);
}

.tuner-button.stop {
   background: #ef4444;
   color: #fff;
   box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

.tuner-button:active {
   transform: translateY(1px);
}

.error {
   margin-top: 12px;
   font-size: 0.8rem;
   color: #ef4444;
   min-height: 16px;
}

.cta {
   display: flex;
   gap: 0.75rem;
   align-items: center;
   justify-content: center;
   flex-wrap: wrap;
}

.link {
   color: var(--accent);
   text-decoration: none;
   font-weight: 600;
   font-size: 1.15rem;
   padding: 0.6rem 0.85rem;
   border-radius: 10px;
   transition: background 120ms ease, color 120ms ease;
}

.link:hover {
   background: rgba(176, 70, 194, 0.08);
   color: #7c3aed;
}

.jazzChordLab-extra {
   margin-top: 1.4rem;
   text-align: center;
   width: min(400px, 100%);
   box-sizing: border-box;
}

.secondary-link {
   display: block;
   padding: 0.65rem 1.1rem;
   border-radius: 12px;
   border: 1px solid rgba(176, 70, 194, 0.7);
   color: #e7e7e7;
   background: rgba(176, 70, 194, 0.08);
   text-decoration: none;
   font-weight: 600;
   letter-spacing: 0.01em;
   transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, color 140ms ease;
   box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
   width: 100%;
   box-sizing: border-box;
}

.secondary-link:hover {
   transform: translateY(-2px);
   background: rgba(176, 70, 194, 0.16);
   color: #e7e7e7;
   box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}
