/* ============================================
   WORKOUT TIMER - LIQUID GLASS DESIGN
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: rgba(0, 0, 0, 0.08);
    --glass-blur: 20px;
    --glass-inner-bg: rgba(255, 255, 255, 0.08);
    --glass-inner-border: rgba(255, 255, 255, 0.15);

    --color-primary: #0072ff;
    --color-primary-light: #00c6ff;
    --color-danger: #ff416c;
    --color-warning: #f7971e;
    --color-success: #00b894;
    --color-text: #1a1a2e;
    --color-text-light: rgba(255, 255, 255, 0.9);
    --color-text-muted: rgba(255, 255, 255, 0.6);

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-full: 50%;

    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --ring-size: min(320px, 75vw, 55vh);
    --nav-height: 64px;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body.workout-active {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

body {
    font-family: var(--font-family);
    background: #0f0c29;
    color: var(--color-text-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Animated Background --- */
.bg-gradient {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    z-index: -3;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: -2;
    animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #0072ff, transparent 70%);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.bg-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #00c6ff, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation-delay: -7s;
}

.bg-orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #7c3aed, transparent 70%);
    top: 40%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 40px) scale(0.95); }
    75% { transform: translate(30px, 20px) scale(1.02); }
}

/* --- Glass Utilities --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow:
        0 8px 32px var(--glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.glass-inner {
    background: var(--glass-inner-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-inner-border);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow:
        0 8px 32px var(--glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 24px;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 1000;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
}

.nav-brand {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    user-select: none;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--color-text-light);
    background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    color: var(--color-text-light);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-light);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile nav overlay */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav {
    position: absolute;
    top: 80px;
    left: 16px;
    right: 16px;
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-link {
    text-decoration: none;
    color: var(--color-text-light);
    font-size: 1.1rem;
    font-weight: 500;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.mobile-nav-link:hover, .mobile-nav-link:active {
    background: rgba(255, 255, 255, 0.1);
}

/* --- Workout Config Modal --- */
.workout-config-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.workout-config-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.workout-config-modal {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.config-header {
    text-align: center;
    margin-bottom: 24px;
}

.config-workout-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 8px;
    line-height: 1;
}

.config-workout-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.config-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

@media (max-width: 600px) {
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
}

/* --- Main Content & Pages --- */
.main-content {
    padding-top: var(--nav-height);
    min-height: 100vh;
    position: relative;
}

.page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    padding: 32px 24px 16px;
    text-align: center;
}

/* --- Motivation Quote --- */
.motivation-quote {
    text-align: center;
    width: 100%;
    max-width: 400px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-8px);
}

.motivation-quote.motivation-fade-in {
    animation: motivationFadeIn 0.4s ease forwards;
}

@keyframes motivationFadeIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.motivation-quote.motivation-supportive {
    color: var(--color-success);
    border-color: rgba(0, 184, 148, 0.3);
    background: rgba(0, 184, 148, 0.08);
}

.motivation-quote.motivation-aggressive {
    color: var(--color-danger);
    border-color: rgba(255, 65, 108, 0.3);
    background: rgba(255, 65, 108, 0.08);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.motivation-quote.motivation-passive {
    color: var(--color-warning);
    border-color: rgba(247, 151, 30, 0.3);
    background: rgba(247, 151, 30, 0.08);
    font-style: italic;
}

/* --- Select Input --- */
.setting-select {
    width: auto;
    min-width: 160px;
    padding: 8px 12px;
    font-size: 0.9rem;
    text-align: left;
    letter-spacing: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='rgba(255,255,255,0.6)'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.setting-select option {
    background: #1a1a2e;
    color: var(--color-text-light);
}

/* --- Timer Section --- */
.timer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-height));
    padding: 24px 16px;
    gap: 24px;
}

.timer-ring-container {
    position: relative;
    width: var(--ring-size);
    height: var(--ring-size);
    flex-shrink: 0;
}

.timer-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 6;
}

.timer-ring-progress {
    fill: none;
    stroke: url(#timerGradient);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 722.566;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.1s linear;
    filter: drop-shadow(0 0 8px rgba(0, 114, 255, 0.4));
}

.timer-ring-progress.paused {
    stroke: url(#pauseGradient);
    filter: drop-shadow(0 0 8px rgba(247, 151, 30, 0.4));
}

.timer-ring-progress.danger {
    stroke: url(#dangerGradient);
    filter: drop-shadow(0 0 8px rgba(255, 65, 108, 0.4));
}

.timer-display {
    position: absolute;
    inset: 20px;
    border-radius: var(--radius-full);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.timer-time {
    font-size: clamp(2.5rem, 12vw, 4.5rem);
    font-weight: 200;
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.timer-time.danger {
    color: var(--color-danger);
}

.timer-time.pause-color {
    color: var(--color-warning);
}

.timer-label {
    font-size: clamp(0.75rem, 2.5vw, 0.95rem);
    color: var(--color-text-muted);
    font-weight: 400;
    text-align: center;
    max-width: 80%;
    line-height: 1.3;
}

/* --- Exercise Info Card --- */
.exercise-info {
    text-align: center;
    width: 100%;
    max-width: 400px;
    padding: 16px 24px;
}

.exercise-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.exercise-counter {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* --- Random Workout Suggestion --- */
.random-workout-suggestion {
    text-align: center;
    width: 100%;
    max-width: 400px;
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.random-workout-suggestion:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.35);
}

.suggestion-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    margin-bottom: 6px;
}

.suggestion-title {
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Timer Input --- */
.timer-input-group {
    width: 100%;
    max-width: 280px;
}

.input-card {
    text-align: center;
    padding: 16px 24px;
}

.input-card label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

.glass-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: var(--color-text-light);
    font-family: var(--font-family);
    font-size: 1.5rem;
    font-weight: 300;
    text-align: center;
    letter-spacing: 0.1em;
    outline: none;
    transition: all 0.3s ease;
}

.glass-input:focus {
    border-color: rgba(0, 114, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 114, 255, 0.15);
    background: rgba(255, 255, 255, 0.1);
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* --- Buttons --- */
.timer-controls {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.btn svg {
    flex-shrink: 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    color: white;
    box-shadow: 0 4px 20px rgba(0, 114, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 28px rgba(0, 114, 255, 0.45);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-glow {
    animation: btnGlow 3s ease-in-out infinite;
}

@keyframes btnGlow {
    0%, 100% { box-shadow: 0 4px 20px rgba(0, 114, 255, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(0, 114, 255, 0.5), 0 0 40px rgba(0, 198, 255, 0.15); }
}

.btn-glass {
    background: var(--glass-bg);
    color: var(--color-text-light);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-danger), #ff4b2b);
    color: white;
    box-shadow: 0 4px 20px rgba(255, 65, 108, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 6px 28px rgba(255, 65, 108, 0.45);
    transform: translateY(-2px);
}

/* --- Skip Buttons --- */
.btn-skip {
    padding: 14px 16px;
    min-width: 48px;
}

/* --- Workout Grid --- */
.workout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 16px 24px 40px;
    max-width: 960px;
    margin: 0 auto;
}

.workout-card {
    border-radius: var(--radius-md);
    padding: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.workout-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--card-color, rgba(0,114,255,0.15)), transparent 60%);
    opacity: 0.6;
    z-index: 0;
}

.workout-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--glass-shadow);
    border-color: rgba(255, 255, 255, 0.35);
}

.workout-card:active {
    transform: translateY(-1px);
}

.workout-card > * {
    position: relative;
    z-index: 1;
}

.workout-card-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    line-height: 1;
}

.workout-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.workout-card-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.workout-card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.workout-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Settings --- */
.settings-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 24px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-card h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.8rem;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 16px;
}

.setting-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.setting-row label {
    font-size: 0.95rem;
    font-weight: 400;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-input {
    width: 70px;
    padding: 8px;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 0;
}

/* Remove number spinner */
.setting-input::-webkit-inner-spin-button,
.setting-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.setting-input[type="number"] {
    -moz-appearance: textfield;
}

.btn-stepper {
    width: 36px;
    height: 36px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    color: var(--color-text-light);
    font-size: 1.2rem;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-stepper:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-stepper:active {
    transform: scale(0.92);
}

/* --- Toggle Switch --- */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    border-color: transparent;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* --- Responsive --- */
@media (max-width: 480px) {
    :root {
        --ring-size: min(280px, 80vw, 50vh);
    }

    .navbar {
        padding: 0 16px;
    }

    .timer-section {
        gap: 16px;
        padding: 16px 12px;
    }

    .timer-controls {
        gap: 8px;
    }

    .timer-controls .btn-label {
        display: none;
    }

    .timer-controls .btn {
        padding: 12px 16px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .glass-card {
        padding: 16px;
    }

    .workout-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .page-title {
        font-size: 1.5rem;
        padding: 24px 16px 12px;
    }
}

@media (max-width: 360px) {
    :root {
        --ring-size: min(240px, 85vw, 45vh);
    }

    .timer-time {
        font-size: 2.2rem;
    }
}

/* --- Legal Pages (Datenschutz) --- */
.legal-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 24px 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.legal-card h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text-light);
}

.legal-card p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 8px;
}

.legal-card p:last-child {
    margin-bottom: 0;
}

.legal-card ul {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.legal-card ul li {
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    padding-left: 16px;
    position: relative;
}

.legal-card ul li::before {
    content: '\2013';
    position: absolute;
    left: 0;
    color: var(--color-text-muted);
}

.legal-card strong {
    color: var(--color-text-light);
    font-weight: 600;
}

.legal-card em {
    color: var(--color-text-muted);
    font-style: italic;
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.footer-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--color-text-light);
}

/* --- Auth Button in Navbar --- */
.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-nav-auth {
    padding: 6px 18px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text-light);
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-nav-auth:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-nav-auth.logged-in {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    border-color: transparent;
    color: white;
}

/* --- Auth Modal --- */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.auth-modal {
    width: 100%;
    max-width: 400px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.auth-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.auth-close:hover {
    color: var(--color-text-light);
}

.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text-muted);
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-text-light);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.auth-input {
    font-size: 1rem !important;
    text-align: left !important;
    letter-spacing: 0 !important;
    padding: 12px 16px !important;
}

.auth-error {
    color: var(--color-danger);
    font-size: 0.85rem;
    min-height: 0;
    transition: all 0.2s;
}

.auth-error:not(:empty) {
    min-height: 20px;
}

.auth-submit {
    width: 100%;
    margin-top: 4px;
}

/* --- Workout Builder --- */
.builder-card {
    margin-bottom: 20px;
}

.builder-heading {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.8rem;
}

.builder-section {
    margin-bottom: 20px;
}

.builder-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--color-text-light);
}

.builder-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.builder-chip {
    padding: 8px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    background: transparent;
    color: var(--color-text-muted);
    font-family: var(--font-family);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.builder-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-light);
}

.builder-chip.selected {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    border-color: transparent;
    color: white;
}

.builder-text-input {
    font-size: 0.9rem !important;
    text-align: left !important;
    letter-spacing: 0 !important;
    padding: 10px 16px !important;
    margin-top: 4px;
}

.builder-error {
    color: var(--color-danger);
    font-size: 0.85rem;
    min-height: 0;
    margin-bottom: 8px;
}

.builder-error:not(:empty) {
    min-height: 20px;
}

.builder-generate-btn {
    width: 100%;
}

.builder-generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* --- Workout Preview --- */
.preview-card {
    margin-bottom: 20px;
}

.preview-header {
    text-align: center;
    margin-bottom: 12px;
}

.preview-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 6px;
    line-height: 1;
}

.preview-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.preview-description {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.preview-exercises {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.preview-exercise {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    gap: 12px;
}

.preview-exercise-info {
    flex: 1;
    min-width: 0;
}

.preview-exercise-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-light);
}

.preview-exercise-desc {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.preview-exercise-num {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.preview-exercise-duration {
    font-size: 0.85rem;
    color: var(--color-primary-light);
    font-weight: 500;
    flex-shrink: 0;
    min-width: 40px;
    text-align: right;
}

.preview-summary {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
}

.preview-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Saved Workouts --- */
.saved-workouts-card {
    margin-bottom: 20px;
}

.saved-workouts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.saved-workout-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    gap: 12px;
}

.saved-workout-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.saved-workout-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.saved-workout-info {
    flex: 1;
    min-width: 0;
}

.saved-workout-title {
    font-size: 0.95rem;
    font-weight: 500;
}

.saved-workout-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.saved-workout-delete {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 1.2rem;
    transition: color 0.2s;
    flex-shrink: 0;
}

.saved-workout-delete:hover {
    color: var(--color-danger);
}

/* --- KI Coach Page --- */
.coach-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px 40px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.coach-card {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 400px;
    max-height: 600px;
}

.coach-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    padding-right: 4px;
}

.coach-message {
    display: flex;
}

.coach-message-content {
    max-width: 85%;
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.coach-bot .coach-message-content {
    background: rgba(0, 114, 255, 0.15);
    border: 1px solid rgba(0, 114, 255, 0.2);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.coach-user {
    justify-content: flex-end;
}

.coach-user .coach-message-content {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom-right-radius: 4px;
}

.coach-input-row {
    display: flex;
    gap: 8px;
}

.coach-text-input {
    flex: 1;
    font-size: 0.95rem !important;
    text-align: left !important;
    letter-spacing: 0 !important;
    padding: 10px 16px !important;
}

.coach-send-btn {
    padding: 10px 16px !important;
    flex-shrink: 0;
}

.coach-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    align-items: center;
}

.coach-typing span {
    width: 6px;
    height: 6px;
    background: var(--color-primary-light);
    border-radius: 50%;
    animation: typingDot 1.2s ease-in-out infinite;
}

.coach-typing span:nth-child(2) { animation-delay: 0.2s; }
.coach-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1); }
}

/* Large screens */
@media (min-width: 1200px) {
    :root {
        --ring-size: 380px;
    }
}

@media (max-width: 480px) {
    .coach-card {
        height: calc(100vh - 180px);
    }
}
