/* Muscle Hacker 2000 — terminal retro 90s */

:root {
    --bg: #050805;
    --fg: #00ff41;
    --fg-dim: #0a8f2e;
    --amber: #ffb000;
    --red: #ff3b30;
    --box: #0a120a;
}

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

[hidden] {
    display: none !important;
}

html {
    background: var(--bg);
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: "Courier New", Courier, monospace;
    font-size: 16px;
    line-height: 1.45;
    max-width: 640px;
    margin: 0 auto;
    padding: 14px 12px 40px;
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.45);
}

/* Scanlines CRT */
.crt {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0) 2px,
        rgba(0, 0, 0, 0.22) 3px
    );
    z-index: 99;
}

header {
    border: 1px solid var(--fg);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.35), inset 0 0 14px rgba(0, 255, 65, 0.08);
    padding: 12px 10px;
    text-align: center;
    margin-bottom: 12px;
}

.logo {
    font-size: 1.35rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.logo-2000 {
    color: var(--amber);
    text-shadow: 0 0 6px rgba(255, 176, 0, 0.55);
    margin-left: 6px;
}

.cursor {
    animation: blink 1s steps(1) infinite;
    margin-left: 4px;
}

@keyframes blink {
    50% { opacity: 0; }
}

.tagline {
    color: var(--fg-dim);
    font-size: 0.8rem;
    margin-top: 4px;
}

nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 14px;
}

button {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--fg-dim);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 8px 10px;
    cursor: pointer;
    text-shadow: inherit;
}

button:active {
    background: var(--fg);
    color: var(--bg);
    text-shadow: none;
}

nav button.active {
    background: var(--fg);
    color: var(--bg);
    text-shadow: none;
    font-weight: bold;
}

.view {
    border: 1px solid var(--fg-dim);
    background: var(--box);
    padding: 12px 10px;
    min-height: 200px;
}

.prompt {
    margin-bottom: 10px;
}

input[type="password"],
input[type="text"],
select {
    background: #000;
    color: var(--fg);
    border: 1px solid var(--fg-dim);
    font-family: inherit;
    font-size: 1rem;
    padding: 8px;
    width: 100%;
    margin-bottom: 8px;
}

input:focus,
select:focus,
button:focus-visible {
    outline: 1px solid var(--fg);
}

.error {
    color: var(--red);
    text-shadow: 0 0 6px rgba(255, 59, 48, 0.5);
    margin-top: 10px;
}

/* ---- HOY ---- */

.day-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}

.day-nav .day-title {
    text-align: center;
    flex: 1;
    font-weight: bold;
}

.day-nav .day-title small {
    display: block;
    color: var(--fg-dim);
    font-weight: normal;
    font-size: 0.75rem;
}

.btn-today {
    display: block;
    margin: 0 auto 12px;
    font-size: 0.75rem;
    border-color: var(--fg-dim);
    color: var(--fg-dim);
}

.exercise {
    border: 1px dashed var(--fg-dim);
    padding: 10px;
    margin-bottom: 10px;
}

.exercise .ex-name {
    font-weight: bold;
    text-transform: uppercase;
}

.exercise .ex-notes {
    color: var(--fg-dim);
    font-size: 0.85rem;
    margin: 2px 0 8px;
    white-space: pre-wrap;
}

.status-buttons {
    display: flex;
    gap: 6px;
}

.status-buttons button {
    flex: 1;
    font-size: 0.85rem;
}

button.st-completo.on {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
    text-shadow: none;
    font-weight: bold;
}

button.st-parcial {
    color: var(--amber);
    border-color: var(--amber);
    text-shadow: 0 0 6px rgba(255, 176, 0, 0.4);
}

button.st-parcial.on {
    background: var(--amber);
    color: var(--bg);
    text-shadow: none;
    font-weight: bold;
}

button.st-no {
    color: var(--red);
    border-color: var(--red);
    text-shadow: 0 0 6px rgba(255, 59, 48, 0.4);
}

button.st-no.on {
    background: var(--red);
    color: var(--bg);
    text-shadow: none;
    font-weight: bold;
}

.rest-day {
    text-align: center;
    color: var(--fg-dim);
    padding: 30px 0;
}

/* ---- RUTINA ---- */

.weekday-block {
    margin-bottom: 16px;
}

.weekday-block h3 {
    border-bottom: 1px solid var(--fg-dim);
    padding-bottom: 3px;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.routine-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}

.routine-item .ri-name {
    flex: 1;
}

.routine-item button {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.routine-add {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.routine-add select {
    flex: 1;
    margin-bottom: 0;
}

/* ---- EJERCICIOS ---- */

.ex-form {
    border: 1px dashed var(--fg-dim);
    padding: 10px;
    margin-bottom: 14px;
}

.ex-form h3 {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.ex-row {
    border-bottom: 1px dashed var(--fg-dim);
    padding: 10px 0;
}

.ex-row .ex-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.ex-row .ex-actions button {
    font-size: 0.8rem;
    padding: 5px 8px;
}

/* ---- STATS ---- */

.stat-box {
    border: 1px solid var(--fg);
    box-shadow: inset 0 0 14px rgba(0, 255, 65, 0.08);
    text-align: center;
    padding: 18px 10px;
    margin-bottom: 12px;
}

.stat-box .stat-label {
    color: var(--fg-dim);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.stat-box .stat-value {
    font-size: 2.6rem;
    font-weight: bold;
    line-height: 1.2;
}

.stat-box .stat-unit {
    font-size: 0.85rem;
    color: var(--fg-dim);
}

footer {
    text-align: center;
    color: var(--fg-dim);
    font-size: 0.75rem;
    margin-top: 18px;
}

footer a {
    color: var(--fg-dim);
}
