/* Spartan Workout General Style */

body {
    background: #111;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
}

/* Header */
#header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 3px solid #aa0000;
    margin-bottom: 20px;
}

.logo {
    width: 160px;
    display: block;
    margin: 0 auto 10px auto;
}

/* Login/Register Containers */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-container {
    background: #222;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    width: 120px;
    margin-bottom: 20px;
}

.login-subtext {
    color: #ccc;
    margin-bottom: 20px;
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin: 8px 0 15px 0;
    border-radius: 6px;
    border: 1px solid #555;
    background: #333;
    color: #fff;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #aa0000;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    margin-top: 10px;
}

.btn-primary:hover {
    background: #cc0000;
}

.login-footer {
    margin-top: 20px;
    color: #bbb;
}

/* Day Selector */
.day-select-box {
    width: 90%;
    max-width: 500px;
    margin: 0 auto 20px auto;
}

#day-select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 8px;
}

/* Exercise Card */
.exercise-card {
    background: #222;
    padding: 15px;
    border-radius: 10px;
    margin: 15px auto;
    width: 90%;
    max-width: 600px;
}

.exercise-card h2 {
    margin: 0 0 10px 0;
    font-size: 22px;
}

.ex-img {
    width: 100%;
    max-width: 350px;
    display: block;
    margin: 10px auto;
    border-radius: 10px;
}

/* Save Button */
#save-btn {
    width: 90%;
    max-width: 600px;
    display: block;
    margin: 25px auto;
    padding: 15px;
    background: #aa0000;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 20px;
}

#save-btn:hover {
    background: #cc0000;
}

/* Error Message */
.error-msg {
    background: #550000;
    color: #ffaaaa;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    text-align: left;
}

/* Spartan Workout – Global */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #050505;
    color: #f5f5f5;
}

/* Page wrapper */

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */

.header {
    text-align: center;
    padding: 24px 16px 8px;
}

.header h1 {
    font-size: 2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Day selector */

.day-select-bar {
    display: flex;
    justify-content: center;
    padding: 16px;
}

#day-select {
    width: 320px;
    max-width: 90%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #333;
    background: #111;
    color: #f5f5f5;
}

/* Workout container */

#workout-container {
    max-width: 700px;
    margin: 0 auto 80px;
    padding: 0 16px 40px;
}

/* Exercise card */

.exercise-card {
    background: #151515;
    border-radius: 12px;
    padding: 20px 18px 18px;
    margin-bottom: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.exercise-card h2 {
    font-size: 1.05rem;
    margin-bottom: 12px;
}

.ex-img {
    display: block;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 14px;
    border-radius: 8px;
    background: #000;
    object-fit: contain;
}

/* Sets */

.sets-block {
    margin-top: 4px;
}

/*
  UPDATED GRID:
  Adds a dedicated column for Target reps so kg/reps don't get pushed off.
  Expected DOM inside .set-row:
    - span (Set label)
    - span.target-reps (Target 6–8 etc)
    - input.kg
    - input.reps
    - input.done (checkbox)
*/
.set-row {
    display: grid;
    grid-template-columns: 52px 92px 1fr 1fr 26px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

/* Default span styling inside set rows */
.set-row span {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Target reps display */
.set-row .target-reps {
    font-size: 0.75rem;
    color: #9a9a9a;
    opacity: 0.9;
    white-space: nowrap;
}

/* Inputs */
.set-row input[type="number"] {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #333;
    background: #101010;
    color: #f5f5f5;
    font-size: 0.9rem;
}

.set-row input[type="number"]::placeholder {
    color: #777;
}

.set-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Notes textarea */

.exercise-notes {
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #333;
    background: #101010;
    color: #f5f5f5;
    resize: vertical;
    min-height: 70px;
    font-size: 0.9rem;
}

.exercise-notes::placeholder {
    color: #777;
}

/* Save button */

.save-bar {
    position: sticky;
    bottom: 0;
    padding: 12px 16px 18px;
    background: linear-gradient(to top, #050505 60%, transparent);
    display: flex;
    justify-content: center;
}

#save-btn {
    width: 320px;
    max-width: 90%;
    padding: 12px 16px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #d81919;
    color: #fff;
    box-shadow: 0 10px 24px rgba(216, 25, 25, 0.45);
    transition: transform 0.08s ease-out, box-shadow 0.08s ease-out,
        background 0.15s ease-out;
}

#save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(216, 25, 25, 0.6);
    background: #f02222;
}

#save-btn:active {
    transform: translateY(1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.7);
}

/* Small screens */

@media (max-width: 480px) {
    .exercise-card {
        padding: 16px 14px 14px;
    }

    .set-row {
        grid-template-columns: 48px 78px 1fr 1fr 24px;
        gap: 6px;
    }

    #day-select {
        width: 100%;
    }
}


/* ---- Exercise video preview ---- */
.exercise-video {
  margin-top: 10px;
}

.yt-thumb {
  position: relative;
  display: block;
  max-width: 520px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.yt-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.yt-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  line-height: 1;
}

.yt-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  text-decoration: underline;
}
/* ------------------------------- */
/* ==== Coach tips + technique link (additive) ==== */
.coach-tips {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
}

.coach-tips h4 {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.coach-tips ul {
  margin: 0;
  padding-left: 18px;
}

.coach-tips li {
  margin: 6px 0;
  line-height: 1.35;
  font-size: 0.92rem;
}

.coach-tips li::marker {
  content: "• ";
}

.technique-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-weight: 600;
  text-decoration: underline;
}

.technique-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

/* Rotating quote line (additive) */
.quote-line {
  margin: 8px auto 16px auto;
  opacity: 0.85;
  font-size: 0.95rem;
  text-align: center;
  max-width: 800px;
}
/* ---- Video/technique link presentation (small + clean) ---- */
.exercise-video {
  margin-top: 10px;
  text-align: left;
}

.yt-thumb {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 420px;      /* smaller than the main exercise image */
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  text-decoration: none;
}

.yt-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.yt-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  line-height: 1;
}

.yt-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
/* compact technique link */
.technique-inline {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
  margin-bottom: 6px;
}

.technique-link {
  font-size: 0.9rem;
  text-decoration: underline;
  opacity: 0.9;
}

.technique-link:hover {
  opacity: 1;
}

.tech-icon {
  font-size: 0.9em;
  margin-right: 6px;
  position: relative;
  top: -0.02em;
}
