* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 12px;
    font-family: system-ui, -apple-system, sans-serif;
    background: #0c0c0e;
    color: #f4f4f5;
    min-height: 100vh;
}

.nav-links {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-links a {
    display: inline-block;
    padding: 10px 18px;
    background: #16161a;
    color: #22d3ee;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #2a2a2e;
    transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
    background: #27272a;
    color: #f4f4f5;
}

.workout-input {
    max-width: 520px;
    margin: 0 auto;
}

.workout-input h1 {
    margin: 0 0 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.message {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.message.success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.message.error {
    background: rgba(248, 113, 113, 0.12);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.message:empty {
    display: none;
}

#workout-form {
    background: #16161a;
    border: 1px solid #2a2a2e;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    gap: 16px;
}

.form-row.form-meta {
    grid-template-columns: 1fr 1fr 1fr;
    margin-bottom: 16px;
}

.form-row:not(.form-meta) {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    margin-bottom: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 13px;
    color: #a1a1aa;
    font-weight: 500;
}

.field input,
.field select,
.field textarea {
    padding: 10px 12px;
    font-size: 15px;
    background: #0c0c0e;
    border: 1px solid #2a2a2e;
    border-radius: 6px;
    color: #f4f4f5;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #71717a;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: #22d3ee;
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.2);
}

.field textarea {
    resize: vertical;
    min-height: 60px;
}

.form-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #2a2a2e;
}

.form-actions button[type="submit"] {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #0c0c0e;
    background: #22d3ee;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.form-actions button[type="submit"]:hover {
    background: #06b6d4;
    transform: scale(1.01);
}

.form-actions button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.delete-section {
    margin-top: 12px;
}

.btn-delete {
    padding: 8px 16px;
    font-size: 13px;
    color: #f87171;
    background: transparent;
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-delete:hover {
    background: rgba(248, 113, 113, 0.15);
}

@media (max-width: 600px) {
    .form-row.form-meta {
        grid-template-columns: 1fr;
    }

    .form-row:not(.form-meta) {
        grid-template-columns: 1fr 1fr;
    }

    #workout-form {
        padding: 16px;
    }

    .nav-links a {
        padding: 10px 14px;
        font-size: 13px;
    }
}