a {
    color: #59a5f5;
    text-decoration: underline;

}

input {
    border: none;
    outline: none;
    width: 200px;
    border-bottom: 2px solid gray;
    background: gray;
    color: white;
    font-family: "inter", sans-serif;
    font-weight: 200;
}

a:visited {
    color: #59a5f5;
    text-decoration: underline;

}

body {
    margin: 0;
    font-family: "inter", sans-serif;
    font-weight: 200;
}

.home-page{
    display: flex;
    flex-direction: column;
    background: rgb(82, 78, 78); /* I'm adding this background as gray in case users cant load the image. However note that it is putting gray then the image is OVERRIDING IT, so maybe look into that. */
    background-image: url("./images/urban-vintage-78A265wPiO4-unsplash.jpg");
    background-repeat: no-repeat; /* This is crucial so that it doesn't focus on some rando ahh part of the image */
    background-size: cover;
    background-position: center;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: clamp(64px, 14vh, 140px) 24px 24px;
}

.home-hero {
    width: min(880px, 92vw);
    text-align: center;
    color: #ffffff;
    background: rgba(20, 22, 26, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 34px 28px;
    backdrop-filter: blur(1.5px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.home-title {
    margin: 0 0 18px;
    font-weight: 300;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    letter-spacing: 0.2px;
}

.home-copy {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.94);
}

.home-cta {
    margin-top: 30px;
}

.home-signup-link {
    text-decoration: none;
}

.home-signup-btn {
    font-size: 1.75rem;
    padding: 12px 24px;
    border-radius: 14px;
    background: rgba(101, 193, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.42);
    color: #ffffff;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.home-signup-btn:hover {
    transform: translateY(-1px);
    background: rgba(101, 193, 255, 0.88);
}

.home-signin-text {
    margin: 16px 0 0;
    font-size: 1rem;
    color: #ffffff;
}

.flex-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    align-items: center;
    background-image: url("./images/oscar-aguilar-elias-B5p9If-Xic8-unsplash.jpg");
    background-repeat: no-repeat; /* This is crucial so that it doesn't focus on some rando ahh part of the image */
    background-size: cover;
}

.login {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(255,255,255,0.4);
    padding: 50px;
    margin: 100px;
    height: 500px;
    width: 500px;
    border-radius: 100px;
}

.sign {
    font-family: "inter", sans-serif;
    color: white;
    font-weight: 200;
    font-size: 40px;
    align-items: baseline;
    padding:40px;
    box-sizing: border-box;
}

img {
    height: auto;
    width: 1000px;
}

button {
    cursor: pointer;
    background-color: rgb(101, 193, 255, 0.6);
    color: white;
    border: none;
    font-family: "inter", sans-serif;
    font-weight: 300;
    border-radius: 20px;
}

/* ----- Dashboard only: Cursor-ish dark UI (home / sign-in use their own classes) ----- */
.dashboard {
    min-height: 100vh;
    background-color: #1e1e1e;
    color: #cccccc;
    box-sizing: border-box;
}

.dashboard *,
.dashboard *::before,
.dashboard *::after {
    box-sizing: inherit;
}

.header-tab{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-family: "inter", sans-serif;
    font-weight: 300;
    background-color: #252526;
    border: 1px solid #3e3e42;
    border-radius: 8px;
    margin: 16px 20px 0;
    padding: 8px 12px;

    opacity: 1;
    transition: opacity 0.3s ease;
}

.header-tab.header-hidden{
    opacity: 0;
}

.dashboard-main {
    padding: 24px 20px 40px;
    max-width: 1240px;
    margin: 0 auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.dashboard-body {
    display: grid;
    grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
    gap: 28px 36px;
    align-items: start;
}

.stats-section {
    min-width: 0;
}

.stats-card {
    background: #252526;
    border: 1px solid #3e3e42;
    border-radius: 8px;
    padding: 16px 18px;
}

.stats-card .section-title {
    margin-bottom: 6px;
}

.stats-card__hint {
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.stats-heatmap-wrap {
    overflow-x: auto;
    margin: 0 -4px;
    padding: 4px;
    -webkit-overflow-scrolling: touch;
}

.stats-heatmap {
    --stats-cell: 11px;
    --stats-gap: 3px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--stats-cell);
    grid-template-rows: repeat(7, var(--stats-cell));
    gap: var(--stats-gap);
    width: max-content;
    min-height: calc(7 * var(--stats-cell) + 6 * var(--stats-gap));
}

.stats-heatmap-cell {
    width: var(--stats-cell);
    height: var(--stats-cell);
    border-radius: 2px;
    box-sizing: border-box;
}

.stats-heatmap-cell--empty {
    background-color: #2d333b;
    border: 1px solid #444c56;
}

.stats-heatmap-cell--future {
    background-color: #1e1e1e;
    border: 1px solid #2d2d30;
    opacity: 0.35;
}

.stats-heatmap-cell--lvl1 {
    background-color: #0e4429;
    border: 1px solid #196c2e;
}

.stats-heatmap-cell--lvl2 {
    background-color: #006d32;
    border: 1px solid #26a641;
}

.stats-heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 10px;
    font-size: 0.75rem;
    color: #858585;
}

.stats-heatmap-legend__swatch {
    width: 11px;
    height: 11px;
    border-radius: 2px;
}

.stats-heatmap-legend__label:first-child {
    margin-right: 4px;
}

.stats-heatmap-legend__label:last-child {
    margin-left: 4px;
}

.workouts-section {
    min-width: 0;
}

.workouts-body {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px 28px;
}

.workouts-main {
    flex: 1 1 min(0, 560px);
    min-width: min(100%, 280px);
}

.workouts-main .section-hint {
    margin-bottom: 16px;
}

.workouts-main .workouts-feed {
    margin-top: 0;
}

@media (max-width: 768px) {
    .dashboard-body {
        grid-template-columns: 1fr;
    }

    .workouts-body {
        flex-direction: column;
    }

    .workouts-main {
        flex: 1 1 auto;
        width: 100%;
    }

    .stats-heatmap {
        --stats-cell: 10px;
        --stats-gap: 2px;
    }
}

.connect-devices-panel {
    background: #252526;
    border: 1px solid #3e3e42;
    border-radius: 8px;
    padding: 16px 18px;
    max-width: 320px;
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .connect-devices-panel {
        max-width: none;
        width: 100%;
    }
}

.dashboard a.connect-devices-link.log-activity-btn {
    display: inline-block;
    text-decoration: none;
    margin-top: 4px;
    cursor: pointer;
    background-color: #3d3d40;
    color: #e8e8ea;
    border: 1px solid #5a5a5e;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.dashboard a.connect-devices-link.log-activity-btn:visited {
    color: #e8e8ea;
}

.dashboard a.connect-devices-link.log-activity-btn:hover {
    background-color: #4a4a4f;
    border-color: #6e6e73;
    color: #ffffff;
}

.dashboard a.connect-devices-link.log-activity-btn:focus-visible {
    outline: 2px solid #7eb8ff;
    outline-offset: 2px;
}

.dashboard a.connect-devices-header-link.log-activity-btn {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    background-color: #3d3d40;
    color: #e8e8ea;
    border: 1px solid #5a5a5e;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.dashboard a.connect-devices-header-link.log-activity-btn:visited {
    color: #e8e8ea;
}

.dashboard a.connect-devices-header-link.log-activity-btn:hover {
    background-color: #4a4a4f;
    border-color: #6e6e73;
    color: #ffffff;
}

.dashboard a.connect-devices-header-link.log-activity-btn:focus-visible {
    outline: 2px solid #7eb8ff;
    outline-offset: 2px;
}

.connect-devices-content {
    max-width: 640px;
}

.connect-devices-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.connect-devices-status:not(:empty) {
    margin-top: 14px;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #cccccc;
}

.connect-devices-status.connect-devices-status--error {
    color: #f48771;
}

.dashboard-main.header-hidden {
    opacity: 0;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard .log-activity-btn {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.dashboard button.log-activity-btn {
    background-color: #1f6b45;
    color: #f4fcf7;
    border: 1px solid #2a8556;
}

.dashboard button.log-activity-btn:hover {
    background-color: #258550;
    border-color: #319f62;
}

.dashboard button.log-activity-btn:focus-visible {
    outline: 2px solid #6fdc9b;
    outline-offset: 2px;
}

.dashboard .header-tab .logout {
    margin-left: 0;
    border-radius: 6px;
    background: #2d2d30;
    border: 1px solid #3e3e42;
    color: #cccccc;
}

.dashboard .header-tab .logout:hover {
    background: #3e3e42;
}

.dashboard h1 {
    margin: 12px 16px;
    font-size: 1.25rem;
    color: #e0e0e0;
}

.user-name-edit {
    display: inline;
    vertical-align: baseline;
    margin-left: 0.28em;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.user-name-edit.user-name-edit--active {
    display: inline-block;
    background-color: #3c3c3c;
    padding: 2px 6px;
    margin: -2px -6px;
    border-radius: 4px;
}

.user-name-edit--saving .user-name-display:not(:disabled) {
    opacity: 0.72;
    cursor: progress;
}

.user-name-display {
    margin: 0;
    padding: 2px 0;
    border: none;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    cursor: pointer;
    text-align: left;
}

.user-name-display:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.08);
}

.user-name-display:focus-visible {
    outline: 2px solid #3794ff;
    outline-offset: 2px;
}

.user-name-display:disabled {
    cursor: default;
    opacity: 1;
    text-decoration: none;
}

.user-name-display:disabled:hover {
    background-color: transparent;
}

.user-name-field {
    margin: 0;
    padding: 0;
    min-width: 12ch;
    max-width: min(40ch, 100%);
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #e0e0e0;
    font: inherit;
    font-weight: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(224, 224, 224, 0.55);
    text-underline-offset: 3px;
}

.user-name-field:focus {
    outline: none;
}

.section-title {
    font-size: 1rem;
    font-weight: 500;
    color: #e0e0e0;
    margin: 0 0 8px;
}

.section-hint {
    margin: 0 0 16px;
    font-size: 0.9rem;
    color: #858585;
}

.workouts-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.workout-card {
    background: #252526;
    border: 1px solid #3e3e42;
    border-radius: 8px;
    padding: 14px 16px;
}

.workout-card__sport {
    font-weight: 500;
    color: #e0e0e0;
    margin-bottom: 4px;
}

.workout-card__meta {
    font-size: 0.9rem;
    color: #cccccc;
}

.workout-card__time {
    font-size: 0.75rem;
    color: #858585;
    margin-top: 8px;
}

.workout-card__actions {
    margin-top: 12px;
}

/* Soft destructive action — scoped so global `button` blue doesn’t win */
body.dashboard .workout-card-delete {
    background-color: rgba(200, 90, 95, 0.45);
    color: #f5e0e1;
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: 8px;
}

body.dashboard .workout-card-delete:hover {
    background-color: rgba(210, 105, 110, 0.55);
    color: #fff;
}

h1{
    margin: 30px;
    font-family: "inter", sans-serif;
    font-weight: 300;
}

.header-tab .logout {
    margin-left: auto;
    cursor: pointer;

    padding: 8px 14px;

    border-radius: 8px;

    background: rgba(255,255,255,0.1);

    transition: 0.2s;
}

.modal{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.hidden{
    display: none;
}

.modal-content{
    background: rgb(104, 105, 106);
    padding: 30px;
    border-radius: 16px;
    width: 320px;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-content input{
    padding: 10px;
    font-size: 16px;
}

.modal-content button{
    padding: 10px;
    cursor: pointer;
}

#setupError{
    color: red;
    font-size: 14px;
    margin: 0;
}

#setupModal {
    color: white;
}

input::placeholder {
    color: rgba(255,255,255,0.8);
}

/* Dashboard modals: match editor-style panels */
body.dashboard .modal {
    background: rgba(0, 0, 0, 0.55);
}

body.dashboard .modal-content {
    position: relative;
    background: #252526;
    border: 1px solid #3e3e42;
    border-radius: 8px;
    color: #cccccc;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

body.dashboard .modal-content--wide {
    width: min(400px, 92vw);
}

body.dashboard .modal-content h2 {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #e0e0e0;
}

body.dashboard .modal-content input {
    width: 100%;
    max-width: none;
    background: #3c3c3c;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 10px 12px;
}

body.dashboard .modal-content input:focus {
    outline: 1px solid #0e639c;
    outline-offset: 1px;
}

body.dashboard .modal-content button {
    border-radius: 6px;
}

body.dashboard #setupModal .modal-content button,
body.dashboard #setupSubmit {
    background-color: #0e639c;
    border: 1px solid #1177bb;
    color: #fff;
}

.modal-label {
    margin: 0 0 10px;
    font-size: 0.85rem;
    color: #858585;
}

.field-label {
    display: block;
    font-size: 0.8rem;
    color: #858585;
    margin: 10px 0 4px;
}

.field-label:first-of-type {
    margin-top: 0;
}

.sport-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sport-pill {
    flex: 1;
    min-width: 90px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #3e3e42;
    background: #2d2d30;
    color: #e0e0e0;
    font-family: "inter", sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
}

.sport-pill:hover:not(:disabled) {
    background: #3e3e42;
    border-color: #505050;
}

.sport-pill--disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    flex: 1;
    min-width: 120px;
    padding: 10px 14px;
    background: #0e639c;
    color: #fff;
    border: 1px solid #1177bb;
    font-family: "inter", sans-serif;
    font-weight: 500;
}

.btn-primary:hover {
    background: #1177bb;
}

.btn-secondary {
    padding: 10px 14px;
    background: #2d2d30;
    color: #cccccc;
    border: 1px solid #3e3e42;
    font-family: "inter", sans-serif;
}

.btn-secondary:hover {
    background: #3e3e42;
}

.btn-text {
    background: transparent;
    border: none;
    color: #858585;
    font-size: 1.25rem;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
}

.btn-text:hover {
    color: #cccccc;
}

.modal-close-corner {
    position: absolute;
    top: 10px;
    right: 10px;
}

.form-error {
    color: #f48771;
    font-size: 0.85rem;
    margin: 12px 0 0;
    min-height: 1.2em;
}