/* FITBODY Design System Stylesheet */
:root {
    --bg-darker: #121212;
    --bg-dark: #1c1c1e;
    --bg-card: rgba(37, 37, 40, 0.82);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(208, 253, 62, 0.2);
    
    /* FITBODY Brand Colors */
    --accent-purple: #8f70ff;
    --accent-purple-rgb: 143, 112, 255;
    --accent-yellow: #d0fd3e;
    --accent-yellow-rgb: 208, 253, 62;
    --accent-cyan: #00e5ff;
    --accent-cyan-rgb: 0, 229, 255;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #6e6e73;
    
    /* Animation Speeds */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-darker);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Base style overrides */
.text-cyan { color: var(--accent-cyan); }
.text-lime, .text-yellow { color: var(--accent-yellow); }
.text-purple { color: var(--accent-purple); }
.bg-cyan { background-color: var(--accent-cyan); }
.bg-lime, .bg-yellow { background-color: var(--accent-yellow); }

/* Ambient Background Glows */
.glow-bg {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}
.glow-bg.purple {
    top: 10%;
    left: calc(50% - 450px);
    background-color: var(--accent-purple);
}
.glow-bg.yellow {
    bottom: 15%;
    right: calc(50% - 450px);
    background-color: var(--accent-yellow);
}

/* App Containers */
.app-container {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

@media (min-width: 480px) {
    .app-container {
        height: 880px;
    }
    
    .phone-frame {
        border: 11px solid #2c2c2e;
        border-radius: 44px;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7),
                    0 0 0 1px rgba(255, 255, 255, 0.05),
                    0 0 30px rgba(143, 112, 255, 0.05);
        background: var(--bg-dark);
        overflow: hidden;
        width: 100%;
        height: 100%;
        position: relative;
    }
}

@media (max-width: 479px) {
    .phone-frame {
        width: 100%;
        height: 100vh;
        position: relative;
        background: var(--bg-darker);
    }
    
    .status-bar {
        display: none;
    }
    
    .app-screen {
        height: calc(100vh - 76px) !important;
        padding-top: 15px !important;
    }
}

/* Status Bar */
.status-bar {
    height: 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    z-index: 10;
    position: relative;
    user-select: none;
}

.status-bar .notch {
    width: 110px;
    height: 25px;
    background: #2c2c2e;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}

.status-icons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.status-icon {
    width: 14px;
    height: 14px;
}

/* Screen */
.app-screen {
    height: calc(100% - 44px - 76px);
    overflow-y: auto;
    padding: 10px 20px 20px 20px;
    position: relative;
}

/* View switcher */
.app-view {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.app-view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Headers */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.view-header-static {
    margin-bottom: 25px;
    margin-top: 5px;
}

.view-header-static h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 26px;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.view-header-static p {
    font-size: 13px;
    color: var(--text-secondary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-yellow));
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--bg-darker);
    box-shadow: 0 0 10px rgba(143, 112, 255, 0.2);
    border: 2px solid transparent;
}

.avatar.border-active {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 12px rgba(208, 253, 62, 0.3);
}

.welcome-text .greeting {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.welcome-text .username {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
}

.icon-btn:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.icon-btn .badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-yellow);
    box-shadow: 0 0 8px var(--accent-yellow);
}

/* 0.1 SPLASH SCREEN VIEW */
#view-splash {
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-darker);
    z-index: 200;
}

.splash-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.fb-logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.fb-logo-mark {
    position: relative;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    border-radius: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 15px 30px rgba(124, 58, 237, 0.3);
}

.fb-logo-mark .fb-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 46px;
    color: var(--text-primary);
    z-index: 2;
    font-style: italic;
    letter-spacing: -2px;
}

.athlete-silhouette {
    position: absolute;
    bottom: 12px;
    right: 12px;
    color: var(--accent-yellow);
    width: 24px;
    height: 24px;
    z-index: 3;
    filter: drop-shadow(0 0 4px rgba(208, 253, 62, 0.6));
}

.fb-logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 32px;
    color: var(--accent-yellow);
    letter-spacing: 2px;
    font-style: italic;
    filter: drop-shadow(0 0 10px rgba(208, 253, 62, 0.2));
}

.animate-logo {
    animation: pulse-logo 2s infinite ease-in-out;
}

@keyframes pulse-logo {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.03); filter: brightness(1.15); }
}

.splash-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--accent-yellow);
    border-radius: 50%;
    animation: spin-loader 0.8s linear infinite;
}

@keyframes spin-loader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 0.2 ONBOARDING SLIDES VIEW */
#view-onboarding {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 150;
    background: var(--bg-darker);
}

.onboarding-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.onboarding-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: flex-end;
}

.onboarding-slide.active {
    display: flex;
}

.slide-image-mock {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 62%;
    background-size: cover;
    background-position: center;
}

/* High quality CSS gradients/abstract design to look like premium photographs */
.slide-image-mock.img-1 {
    background: linear-gradient(180deg, rgba(28, 28, 30, 0.1), rgba(28, 28, 30, 1)),
                radial-gradient(circle at 70% 30%, rgba(143, 112, 255, 0.4), transparent),
                linear-gradient(135deg, #121212 0%, #2c2c2e 100%);
}

.slide-image-mock.img-2 {
    background: linear-gradient(180deg, rgba(28, 28, 30, 0.1), rgba(28, 28, 30, 1)),
                radial-gradient(circle at 30% 40%, rgba(208, 253, 62, 0.35), transparent),
                linear-gradient(135deg, #2c2c2e 0%, #121212 100%);
}

.slide-image-mock.img-3 {
    background: linear-gradient(180deg, rgba(28, 28, 30, 0.1), rgba(28, 28, 30, 1)),
                radial-gradient(circle at 60% 50%, rgba(0, 229, 255, 0.3), transparent),
                linear-gradient(135deg, #121212 0%, #3a3a3c 100%);
}

/* Graphic Overlay text over background mockups to look organic */
.slide-image-mock::after {
    content: "FITBODY ATHLETE";
    position: absolute;
    top: 60px;
    left: 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 54px;
    line-height: 0.9;
    color: rgba(255, 255, 255, 0.05);
    transform: rotate(-5deg);
    pointer-events: none;
}

.slide-card {
    background: var(--bg-dark);
    padding: 30px 24px;
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    z-index: 10;
    text-align: center;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -15px 30px rgba(0, 0, 0, 0.4);
}

.slide-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 15px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.slide-logo .accent-logo {
    color: var(--accent-yellow);
    background: var(--accent-purple);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 12px;
    margin-right: 4px;
}

.slide-card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.slide-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
}

.slide-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

.slide-dots .dot.active {
    background: var(--accent-yellow);
    width: 24px;
    border-radius: 4px;
    box-shadow: 0 0 8px var(--accent-yellow);
}

.onboard-next-btn {
    width: 100%;
    background: var(--accent-yellow);
    color: var(--bg-darker);
    border: none;
    border-radius: 16px;
    padding: 15px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: 0 4px 15px rgba(208, 253, 62, 0.2);
}

.onboard-next-btn:hover {
    transform: scale(1.01);
}

/* 0.3 INTERACTIVE PROFILE SETUP STEP-BY-STEP */
#view-setup {
    height: 100%;
    background: var(--bg-dark);
}

.setup-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.setup-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 15px;
}

.setup-back-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.setup-steps-indicator {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-purple);
}

.setup-step-panel {
    display: none;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    padding-bottom: 10px;
}

.setup-step-panel.active {
    display: flex;
}

.setup-title {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
    text-align: center;
}

.setup-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
    margin-bottom: 25px;
}

.setup-image-promo {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(143, 112, 255, 0.1), rgba(208, 253, 62, 0.1)),
                repeating-linear-gradient(45deg, rgba(255,255,255,0.01) 0px, rgba(255,255,255,0.01) 2px, transparent 2px, transparent 10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.setup-image-promo::before {
    content: "CONSISTÊNCIA";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 32px;
    color: var(--accent-yellow);
    opacity: 0.15;
    letter-spacing: 2px;
}

.setup-action-btn {
    width: 100%;
    background: var(--accent-yellow);
    color: var(--bg-darker);
    border: none;
    border-radius: 16px;
    padding: 15px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: 0 4px 15px rgba(208, 253, 62, 0.2);
    text-align: center;
    margin-top: 20px;
}

.setup-action-btn.disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none;
}

/* Gender Step Selector */
.gender-selector {
    display: flex;
    gap: 16px;
    margin: 20px 0;
}

.gender-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.gender-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.gender-card.selected {
    border-color: var(--accent-purple);
    background: rgba(143, 112, 255, 0.05);
    box-shadow: 0 0 15px rgba(143, 112, 255, 0.2);
}

.gender-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.gender-card.selected .gender-icon-box {
    background: var(--accent-purple);
    color: var(--text-primary);
    box-shadow: 0 0 12px rgba(143, 112, 255, 0.4);
}

.gender-card span {
    font-weight: 700;
    font-size: 14px;
}

/* Scroll Age Picker */
.scroll-select-container {
    height: 180px;
    position: relative;
    overflow-y: auto;
    margin: 20px auto;
    width: 120px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    scroll-snap-type: y mandatory;
}

.scroll-select-container::-webkit-scrollbar {
    width: 0px;
}

.ruler-indicator {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 40px;
    transform: translateY(-50%);
    border-top: 1.5px solid var(--accent-yellow);
    border-bottom: 1.5px solid var(--accent-yellow);
    pointer-events: none;
    background: rgba(208, 253, 62, 0.03);
}

.scroll-values {
    padding: 70px 0;
}

.scroll-item {
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    scroll-snap-align: center;
    transition: var(--transition-smooth);
}

.scroll-item.selected {
    color: var(--accent-yellow);
    font-size: 24px;
    font-weight: 800;
}

/* Horizontal Weight Ruler */
.weight-unit-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.unit-pill {
    padding: 6px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.unit-pill.active {
    background: var(--accent-purple);
    color: var(--text-primary);
    border-color: var(--accent-purple);
}

.horizontal-ruler-container {
    width: 100%;
    height: 70px;
    position: relative;
    overflow-x: auto;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    scroll-snap-type: x mandatory;
    margin-bottom: 12px;
}

.horizontal-ruler-container::-webkit-scrollbar {
    height: 0px;
}

.ruler-pointer {
    position: absolute;
    left: 50%;
    top: 0;
    width: 3px;
    height: 35px;
    background: var(--accent-yellow);
    transform: translateX(-50%);
    z-index: 5;
    box-shadow: 0 0 6px var(--accent-yellow);
}

.horizontal-ruler {
    display: flex;
    padding: 0 calc(50% - 15px);
    height: 100%;
    align-items: flex-end;
}

.ruler-tick {
    flex: 0 0 15px;
    height: 15px;
    border-left: 1px solid var(--text-muted);
    position: relative;
    scroll-snap-align: center;
}

.ruler-tick.major {
    height: 28px;
    border-left-color: var(--text-secondary);
}

.ruler-tick-num {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 600;
    color: var(--text-secondary);
}

.ruler-display-value {
    text-align: center;
    margin: 15px 0;
}

.ruler-display-value .val {
    font-family: 'Outfit', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
}

.ruler-display-value .unit {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-yellow);
    margin-left: 4px;
}

/* Height Ruler Vertical */
.height-ruler-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 15px 0;
    height: 200px;
}

.height-pointer {
    width: 15px;
    height: 3px;
    background: var(--accent-yellow);
    box-shadow: 0 0 6px var(--accent-yellow);
}

.height-ruler-scroll {
    height: 100%;
    width: 60px;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.height-ruler-scroll::-webkit-scrollbar {
    width: 0px;
}

.height-tick {
    height: 20px;
    border-bottom: 1.5px solid var(--text-muted);
    width: 30px;
    margin-left: auto;
    position: relative;
    scroll-snap-align: center;
}

.height-tick.major {
    width: 45px;
    border-bottom-color: var(--text-secondary);
}

.height-tick-num {
    position: absolute;
    left: -35px;
    bottom: -6px;
    font-size: 9px;
    font-weight: 600;
    color: var(--text-secondary);
}

.height-display .val {
    font-family: 'Outfit', sans-serif;
    font-size: 36px;
    font-weight: 800;
}

.height-display .unit {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-yellow);
    margin-left: 3px;
}

/* Goals checklist */
.goals-checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 10px 0;
}

.goal-check-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.goal-check-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.goal-check-item.selected {
    border-color: var(--accent-purple);
    background: rgba(143, 112, 255, 0.05);
}

.goal-check-item .check-box {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    position: relative;
    transition: var(--transition-smooth);
}

.goal-check-item.selected .check-box {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
}

.goal-check-item.selected .check-box::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 900;
    color: var(--text-primary);
}

.goal-check-item span {
    font-size: 13px;
    font-weight: 600;
}

/* Step 6 form inputs & level selection */
.form-group-setup {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    text-align: left;
}

.form-group-setup label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.form-group-setup input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    font-size: 14px;
    transition: var(--transition-smooth);
}

.form-group-setup input:focus {
    border-color: var(--accent-purple);
}

.level-cards-selector {
    display: flex;
    gap: 8px;
}

.level-card-item {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.level-card-item.active {
    border-color: var(--accent-yellow);
    background: rgba(208, 253, 62, 0.05);
    box-shadow: 0 0 10px rgba(208, 253, 62, 0.15);
}

.level-card-item h4 {
    font-size: 12px;
    font-weight: 700;
}

/* 1. DASHBOARD VIEW & PROGRESS */
.progress-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 14px;
    margin-bottom: 20px;
}

.progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 16px;
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
}

.progress-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.progress-card.main-card {
    align-items: center;
    text-align: center;
    padding: 20px 16px;
}

.ring-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 12px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.ring-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.04);
    stroke-width: 8;
}

.ring-bar {
    fill: none;
    stroke: var(--accent-yellow);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.yellow-glow {
    filter: drop-shadow(0 0 6px rgba(208, 253, 62, 0.6));
}

.ring-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ring-label .value {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.ring-label .unit {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 2px;
}

.card-info h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-info p {
    font-size: 11px;
    color: var(--text-secondary);
}

.small-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.progress-card.small {
    padding: 14px;
    height: calc(50% - 7px);
}

.card-header-small {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.card-header-small i {
    width: 16px;
    height: 16px;
}

.card-body-small {
    margin-top: 8px;
}

.card-body-small .value {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}

.unit-small {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 2px;
}

.mini-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s ease;
}

.status-label {
    font-size: 10px;
    font-weight: 700;
    display: inline-block;
    margin-top: 6px;
    padding: 2px 6px;
    background: rgba(143, 112, 255, 0.1);
    border-radius: 6px;
}

/* Weekly Challenge Card (9-A) */
.weekly-challenge-card {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.25);
    cursor: pointer;
    transition: var(--transition-bounce);
}

.weekly-challenge-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(124, 58, 237, 0.35);
}

.challenge-glow {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    background: var(--accent-yellow);
    filter: blur(50px);
    opacity: 0.25;
    pointer-events: none;
}

.challenge-content-left {
    flex-grow: 1;
    z-index: 2;
    padding-right: 15px;
}

.challenge-tag {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.challenge-tag i {
    width: 10px;
    height: 10px;
}

.weekly-challenge-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 4px;
}

.weekly-challenge-card p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

.challenge-action {
    z-index: 2;
}

.challenge-btn {
    background: var(--accent-yellow);
    color: var(--bg-darker);
    border: none;
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

/* Sections */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    margin-top: 8px;
}

.section-title h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
}

.see-all-link {
    font-size: 12px;
    color: var(--accent-yellow);
    text-decoration: none;
    font-weight: 700;
}

.quick-levels {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.level-pill {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.level-pill.active {
    background: var(--accent-yellow);
    color: var(--bg-darker);
    border-color: var(--accent-yellow);
    box-shadow: 0 4px 15px rgba(208, 253, 62, 0.2);
}

/* Slider */
.workout-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    margin-bottom: 25px;
}

.workout-slider::-webkit-scrollbar {
    height: 4px;
}

.workout-card-slide {
    flex: 0 0 240px;
    scroll-snap-align: start;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 16px;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.workout-card-slide:hover {
    transform: translateY(-4px);
    border-color: var(--accent-yellow);
}

.slide-tag {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 12px;
    background: rgba(208, 253, 62, 0.08);
    color: var(--accent-yellow);
}

.workout-card-slide h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.3;
}

.workout-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.workout-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.workout-meta i {
    width: 14px;
    height: 14px;
}

.routine-promo-card {
    background: var(--bg-card);
    border: 1px dashed var(--accent-purple);
    border-radius: 20px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.routine-promo-card:hover {
    border-style: solid;
    transform: scale(1.02);
}

.promo-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 2px;
}

.promo-content p {
    font-size: 11px;
    color: var(--text-secondary);
}

.promo-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-purple);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 12px rgba(143, 112, 255, 0.3);
}

/* 2. EXPLORE WORKOUTS */
.workout-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-bottom: 20px;
    padding-bottom: 4px;
}

.workout-tabs::-webkit-scrollbar {
    height: 2px;
}

.tab-btn {
    padding: 8px 14px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.tab-btn.active {
    background: var(--bg-card);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.workout-list-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.workout-list-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.workout-list-card:hover {
    border-color: var(--border-glow);
    transform: scale(1.01);
}

.workout-list-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.workout-list-info h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
}

.workout-list-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-secondary);
}

.workout-list-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.workout-list-meta i {
    width: 12px;
    height: 12px;
}

.workout-list-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.workout-list-card:hover .workout-list-btn {
    background: var(--accent-yellow);
    color: var(--bg-darker);
    box-shadow: 0 0 10px rgba(208, 253, 62, 0.4);
}

/* Drawer Detail round divisions (Figma) */
.drawer-round-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 900;
    color: var(--accent-yellow);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 15px;
    margin-bottom: 10px;
    border-left: 3px solid var(--accent-yellow);
    padding-left: 8px;
}

/* 4. NUTRITION TAB (New) */
.nutrition-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.nutri-tab {
    flex: 1;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: var(--transition-smooth);
}

.nutri-tab.active {
    background: var(--bg-card);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.recipes-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recipe-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 14px;
    display: flex;
    gap: 14px;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.recipe-card:hover {
    border-color: rgba(143, 112, 255, 0.15);
    transform: translateY(-2px);
}

.recipe-img-mock {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3a3a3c, #2c2c2e);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
}

.recipe-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.recipe-info h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 800;
}

.recipe-info .kcal {
    font-size: 11px;
    color: var(--accent-yellow);
    font-weight: 700;
}

.recipe-meta {
    display: flex;
    gap: 10px;
    font-size: 10px;
    color: var(--text-secondary);
}

.recipe-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.recipe-meta i {
    width: 11px;
    height: 11px;
}

/* Ingredients Checklist inside Detailed Recipe drawer */
.ingredients-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0 20px 0;
}

.ingredient-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.ingredient-item.checked {
    background: rgba(143, 112, 255, 0.04);
    border-color: rgba(143, 112, 255, 0.12);
}

.ingredient-item span {
    font-size: 12px;
    font-weight: 600;
}

.ingredient-item .check {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid var(--border-color);
    position: relative;
}

.ingredient-item.checked .check {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
}

.ingredient-item.checked .check::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 900;
    color: var(--text-primary);
}

.prep-instructions-box {
    margin-top: 15px;
}

.prep-step {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.prep-step-num {
    flex: 0 0 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(143, 112, 255, 0.08);
    color: var(--accent-purple);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
}

.prep-step-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 7. WEEKLY CHALLENGE INFO & PLAYER VIEW */
.challenge-view-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.challenge-details-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.challenge-visual-badge {
    font-size: 54px;
    margin-bottom: 12px;
    animation: rotate-trophy 3s infinite alternate ease-in-out;
}

@keyframes rotate-trophy {
    0% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}

.challenge-details-card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.challenge-details-card .desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 20px;
}

.challenge-metrics {
    display: flex;
    justify-content: center;
    gap: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

.metric-item i {
    width: 16px;
    height: 16px;
    color: var(--accent-purple);
}

.start-challenge-btn {
    width: 100%;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: var(--text-primary);
    border: none;
    border-radius: 16px;
    padding: 15px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.25);
    transition: var(--transition-bounce);
}

.start-challenge-btn:hover {
    transform: scale(1.01);
}

/* Interactive Trophy pulse finish */
.trophy-badge-pulse {
    width: 100px;
    height: 100px;
    background: rgba(208, 253, 62, 0.06);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px auto;
    border: 1px solid rgba(208, 253, 62, 0.15);
    animation: pulse-badge 2s infinite ease-in-out;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(208, 253, 62, 0); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(208, 253, 62, 0.2); }
}

/* Navigation bottom bar */
.nav-bar {
    height: 76px;
    background: rgba(28, 28, 30, 0.95);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 5px;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 10px;
    transition: var(--transition-smooth);
    border-radius: 12px;
}

.nav-item:hover {
    color: var(--text-secondary);
}

.nav-item.active {
    color: var(--accent-yellow);
}

.nav-item i {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.nav-item.active i {
    transform: scale(1.1);
}

.nav-item span {
    font-size: 9px;
    font-weight: 700;
}

/* Toast */
.toast {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c2c2e;
    border: 1px solid var(--accent-yellow);
    border-radius: 30px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    top: 25px;
}

.toast-icon {
    width: 18px;
    height: 18px;
    color: var(--accent-yellow);
}

.toast-message {
    font-size: 12px;
    font-weight: 700;
}

/* Modals Drawer */
.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;
    display: none;
    backdrop-filter: blur(5px);
}

.drawer {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    max-height: 85%;
    background: #1c1c1e;
    border-top: 1px solid var(--border-color);
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    transition: bottom 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
}

.drawer-overlay.active {
    display: block;
}

.drawer-overlay.active .drawer {
    bottom: 0;
}

.drawer-handle {
    width: 36px;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 12px auto;
}

.drawer-content {
    padding: 0 20px 24px 20px;
    overflow-y: auto;
    flex-grow: 1;
}

/* Detail Workout items */
.ex-item-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.ex-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 14px;
}

.ex-item-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(143, 112, 255, 0.1);
    color: var(--accent-purple);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
}

.ex-item-info {
    flex-grow: 1;
}

.ex-item-info .name {
    font-size: 13px;
    font-weight: 700;
}

.ex-item-info .muscles {
    font-size: 10px;
    color: var(--text-secondary);
}

.ex-item-reps {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-yellow);
}

.drawer-action-btn {
    width: 100%;
    background: var(--accent-yellow);
    color: var(--bg-darker);
    border: none;
    border-radius: 16px;
    padding: 14px;
    font-weight: 700;
    font-family: inherit;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(208, 253, 62, 0.3);
    transition: var(--transition-bounce);
}

.drawer-action-btn:hover {
    transform: scale(1.02);
}

/* Celebration Overlay */
.celebration-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 12, 14, 0.96);
    z-index: 500;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 24px;
    backdrop-filter: blur(10px);
}

.celebration-overlay.active {
    display: flex;
}

.celebration-card {
    text-align: center;
    width: 100%;
    max-width: 320px;
    position: relative;
    animation: scale-up 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.congrats-glow {
    position: absolute;
    width: 180px;
    height: 180px;
    background: var(--accent-yellow);
    filter: blur(80px);
    opacity: 0.15;
    left: 50%;
    top: 40px;
    transform: translateX(-50%);
    pointer-events: none;
}

.trophy-icon {
    width: 80px;
    height: 80px;
    color: var(--accent-yellow);
    margin: 0 auto;
    filter: drop-shadow(0 0 15px rgba(208, 253, 62, 0.5));
}

.celebration-card h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 24px;
    margin-bottom: 6px;
}

.celebration-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.finish-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

.finish-stats .stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.finish-stats i {
    width: 20px;
    height: 20px;
    color: var(--accent-purple);
}

.finish-stats .stat-val {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.finish-stats .stat-lbl {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.celebration-close-btn {
    width: 100%;
    background: var(--text-primary);
    color: var(--bg-darker);
    border: none;
    border-radius: 16px;
    padding: 14px;
    font-weight: 700;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.celebration-close-btn:hover {
    background: var(--accent-yellow);
    box-shadow: 0 4px 15px rgba(208, 253, 62, 0.3);
}

/* Active Timer */
.player-timer-ring {
    position: relative;
    width: 180px;
    height: 180px;
}

.timer-ring-svg {
    transform: rotate(-90deg);
}

.timer-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.03);
    stroke-width: 8;
}

.timer-bar {
    fill: none;
    stroke: var(--accent-purple);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 515;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.1s linear;
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.time-left {
    font-family: 'Outfit', sans-serif;
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.time-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: block;
}

/* SVG curve chart weight / cals overrides */
.chart-line {
    stroke: var(--accent-yellow);
    filter: drop-shadow(0 4px 8px rgba(208, 253, 62, 0.2));
}

.chart-dot {
    stroke: var(--accent-yellow);
}

.chart-gradient stop {
    stop-color: var(--accent-yellow);
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 16px;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.chart-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
}

.chart-header .timeframe {
    font-size: 11px;
    color: var(--text-secondary);
}

.chart-container {
    height: 120px;
    width: 100%;
}

.chart-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.chart-grid-line {
    stroke: rgba(255, 255, 255, 0.03);
    stroke-width: 1;
}

.chart-label {
    font-size: 9px;
    fill: var(--text-secondary);
    text-anchor: middle;
    font-weight: 600;
}

/* =========================================================
   PERSONAL TRAINER SYSTEM STYLES
   ========================================================= */

/* ── Access Banner in Progress View ── */
.pt-access-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(143, 112, 255, 0.08), rgba(143, 112, 255, 0.02));
    border: 1px solid rgba(143, 112, 255, 0.2);
    border-radius: 18px;
    padding: 16px 18px;
    margin-top: 24px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.pt-access-banner:hover {
    border-color: rgba(143, 112, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(143, 112, 255, 0.1);
}

.pt-access-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent-purple), #6d52e0);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(143, 112, 255, 0.3);
}

.pt-access-icon i { width: 20px; height: 20px; }

.pt-access-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pt-access-text strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.pt-access-text span {
    font-size: 11px;
    color: var(--text-secondary);
}

.pt-access-arrow {
    color: var(--accent-purple);
    width: 18px;
    height: 18px;
}

/* ── Portal Container ── */
#view-personal-portal {
    padding: 0;
}

#personal-portal-container {
    padding: 0 4px 20px;
    min-height: 100%;
}

/* ── Portal Header ── */
.pt-portal-header {
    text-align: center;
    padding: 10px 0 20px;
    position: relative;
}

.pt-portal-header.compact {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 10px 0 20px;
}

.pt-portal-header.compact h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
}

.pt-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    flex-shrink: 0;
}

.pt-back-btn i { width: 16px; height: 16px; }

.pt-logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pt-logo-badge {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--accent-purple), #6d52e0);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 24px rgba(143, 112, 255, 0.35);
}

.pt-logo-badge i { width: 30px; height: 30px; }

.pt-logo-area h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.pt-logo-area p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ── Auth Tabs ── */
.pt-auth-tabs {
    display: flex;
    background: var(--bg-card);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.pt-auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    padding: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.pt-auth-tab.active {
    background: var(--accent-purple);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(143, 112, 255, 0.3);
}

/* ── Auth Forms ── */
.pt-auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pt-auth-form.hidden { display: none; }

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

.pt-field-group label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pt-field-group label i { width: 12px; height: 12px; }

.pt-field-group input,
.pt-field-group select,
.pt-field-group textarea {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    transition: var(--transition-smooth);
    outline: none;
    -webkit-appearance: none;
}

.pt-field-group input:focus,
.pt-field-group select:focus,
.pt-field-group textarea:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(143, 112, 255, 0.12);
}

.pt-field-group select option { background: #2c2c2e; color: #fff; }

.pt-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pt-action-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-purple), #6d52e0);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-bounce);
    box-shadow: 0 4px 18px rgba(143, 112, 255, 0.3);
    margin-top: 6px;
}

.pt-action-btn:hover { transform: translateY(-2px); }
.pt-action-btn i { width: 18px; height: 18px; }

.pt-form-hint {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
}

/* ── Trainer Dashboard Header ── */
.pt-dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.pt-trainer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pt-trainer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), #6d52e0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 14px rgba(143, 112, 255, 0.3);
}

.pt-trainer-info h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
}

.pt-code-badge {
    font-size: 11px;
    color: var(--accent-purple);
    font-weight: 600;
}

.pt-logout-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.pt-logout-btn:hover { border-color: rgba(255, 80, 80, 0.4); color: #ff5050; }
.pt-logout-btn i { width: 16px; height: 16px; }

/* ── Stats Row ── */
.pt-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.pt-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.pt-stat-card i { width: 18px; height: 18px; color: var(--accent-purple); }

.pt-stat-val {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.pt-stat-label {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ── Create Plan Button ── */
.pt-create-plan-btn {
    width: 100%;
    background: linear-gradient(135deg, rgba(208, 253, 62, 0.08), rgba(208, 253, 62, 0.03));
    border: 1px dashed rgba(208, 253, 62, 0.35);
    border-radius: 16px;
    color: var(--accent-yellow);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    transition: var(--transition-smooth);
}

.pt-create-plan-btn:hover {
    background: rgba(208, 253, 62, 0.1);
    border-color: var(--accent-yellow);
}

.pt-create-plan-btn i { width: 18px; height: 18px; }

/* ── Sections ── */
.pt-section {
    margin-bottom: 22px;
}

.pt-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.pt-section-title i { width: 14px; height: 14px; }

/* ── Plan Cards ── */
.pt-plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    transition: var(--transition-smooth);
}

.pt-plan-card:hover {
    border-color: rgba(143, 112, 255, 0.2);
}

.pt-plan-info h4 {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 5px;
}

.pt-plan-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.pt-plan-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.pt-plan-meta i { width: 11px; height: 11px; }

.pt-assigned-badge {
    font-size: 10px;
    background: rgba(143, 112, 255, 0.1);
    color: var(--accent-purple);
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 700;
}

.pt-open-badge {
    font-size: 10px;
    background: rgba(208, 253, 62, 0.1);
    color: var(--accent-yellow);
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 700;
}

.pt-delete-plan-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.pt-delete-plan-btn:hover { color: #ff5050; background: rgba(255, 80, 80, 0.08); }
.pt-delete-plan-btn i { width: 15px; height: 15px; }

/* ── Student Cards ── */
.pt-student-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 10px;
    transition: var(--transition-smooth);
}

.pt-student-card:hover { border-color: rgba(143, 112, 255, 0.25); }

.pt-student-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.pt-student-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}

.pt-student-avatar.large {
    width: 60px;
    height: 60px;
    font-size: 22px;
}

.pt-student-info {
    flex: 1;
}

.pt-student-info h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.pt-student-info span {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
}

.pt-student-quick-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.qs-cal, .qs-sessions {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
}

.qs-cal i, .qs-sessions i { width: 11px; height: 11px; }
.qs-cal { color: var(--accent-yellow); }
.qs-sessions { color: #4ade80; }

.pt-last-workout {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 10px;
}

.pt-last-workout.muted { color: var(--text-muted); font-style: italic; }

.pt-student-actions {
    display: flex;
    gap: 8px;
}

.pt-btn-sm {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: var(--transition-smooth);
}

.pt-btn-sm i { width: 13px; height: 13px; }
.pt-btn-sm:hover { border-color: rgba(255, 255, 255, 0.2); color: var(--text-primary); }
.pt-btn-sm.accent { border-color: rgba(143, 112, 255, 0.3); color: var(--accent-purple); }
.pt-btn-sm.accent:hover { background: rgba(143, 112, 255, 0.08); }

/* ── Share Banner ── */
.pt-share-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(143, 112, 255, 0.06), rgba(208, 253, 62, 0.03));
    border: 1px solid rgba(143, 112, 255, 0.2);
    border-radius: 14px;
    padding: 14px 16px;
    margin-top: 10px;
}

.pt-share-banner i { width: 18px; height: 18px; color: var(--accent-purple); flex-shrink: 0; }

.pt-share-banner div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pt-share-banner span {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pt-share-banner strong {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-yellow);
}

.pt-copy-btn {
    background: rgba(143, 112, 255, 0.1);
    border: 1px solid rgba(143, 112, 255, 0.3);
    border-radius: 10px;
    color: var(--accent-purple);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.pt-copy-btn:hover { background: rgba(143, 112, 255, 0.2); }
.pt-copy-btn i { width: 14px; height: 14px; }

/* ── Empty States ── */
.pt-empty-state {
    text-align: center;
    padding: 28px 16px;
    color: var(--text-secondary);
}

.pt-empty-state i {
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.pt-empty-state p {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
}

/* ── Exercise Selector (Create Plan) ── */
.pt-exercise-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 8px;
}

.pt-ex-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.pt-ex-toggle:hover { background: rgba(255, 255, 255, 0.04); }

.pt-ex-toggle.selected {
    background: rgba(143, 112, 255, 0.08);
    border-color: rgba(143, 112, 255, 0.25);
}

.pt-ex-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pt-ex-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.pt-ex-group {
    font-size: 10px;
    color: var(--text-muted);
}

.pt-ex-toggle-check {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.pt-ex-toggle.selected .pt-ex-toggle-check {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
}

.pt-ex-toggle-check i { width: 14px; height: 14px; }

.pt-selected-count {
    font-size: 11px;
    color: var(--accent-purple);
    font-weight: 700;
    text-align: center;
    margin-top: 6px;
}

/* ── Student Detail View ── */
.pt-student-overview-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.pt-student-overview-card div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pt-student-overview-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
}

.pt-student-overview-card span {
    font-size: 11px;
    color: var(--text-secondary);
}

.pt-history-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.pt-history-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-purple);
    flex-shrink: 0;
    margin-top: 4px;
}

.pt-history-info strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.pt-history-info span {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ── Note Section ── */
.pt-note-section { margin-top: 20px; }

.pt-saved-note {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(208, 253, 62, 0.04);
    border: 1px solid rgba(208, 253, 62, 0.1);
    border-radius: 10px;
    padding: 10px;
}

.pt-saved-note i { width: 14px; height: 14px; color: var(--accent-yellow); flex-shrink: 0; }
.pt-saved-note em { font-style: italic; }

/* ── Modal Overlay ── */
.pt-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: flex-end;
    z-index: 300;
    backdrop-filter: blur(4px);
}

.pt-modal-overlay.active {
    display: flex;
}

.pt-modal {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px;
    width: 100%;
    max-width: 420px;
    max-height: 70vh;
    overflow-y: auto;
}

.pt-modal h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 16px;
    text-align: center;
}

.pt-modal-plans { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.pt-modal-plan-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
    gap: 12px;
}

.pt-modal-plan-item div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pt-modal-plan-item strong { font-size: 13px; font-weight: 700; }
.pt-modal-plan-item span { font-size: 11px; color: var(--text-secondary); }

.pt-btn-assign {
    background: var(--accent-purple);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.pt-btn-assign:hover { background: #7c5ee0; }

.pt-modal-close {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 12px;
    cursor: pointer;
}

/* ── Dashboard Trainer Banner ── */
.dash-trainer-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(143, 112, 255, 0.1), rgba(143, 112, 255, 0.03));
    border: 1px solid rgba(143, 112, 255, 0.25);
    border-radius: 16px;
    padding: 14px 16px;
    margin: 16px 0;
    gap: 12px;
    animation: slideInDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.trainer-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.trainer-banner-icon {
    font-size: 24px;
    line-height: 1;
}

.trainer-banner-left div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trainer-banner-left strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.trainer-banner-left span {
    font-size: 11px;
    color: var(--accent-purple);
    font-weight: 600;
}

.trainer-banner-btn {
    background: var(--accent-purple);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.trainer-banner-btn:hover { background: #7c5ee0; }
.trainer-banner-btn i { width: 14px; height: 14px; }

/* ── Workout Tab: Personal ── */
.tab-btn-personal {
    background: linear-gradient(135deg, var(--accent-purple), #6d52e0) !important;
    color: #fff !important;
    border-color: var(--accent-purple) !important;
}

.tab-btn-personal.active {
    box-shadow: 0 4px 16px rgba(143, 112, 255, 0.35);
}

/* ── Personal Plan Cards in Workout List ── */
.personal-plan-header {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(143, 112, 255, 0.08), rgba(208, 253, 62, 0.03));
    border: 1px solid rgba(143, 112, 255, 0.2);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.personal-plan-badge {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--accent-purple), #4f46e5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.personal-plan-badge i { width: 20px; height: 20px; }

.personal-plan-header div h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 3px;
}

.personal-plan-header div p {
    font-size: 11px;
    color: var(--text-secondary);
}

.personal-plan-card {
    border-color: rgba(143, 112, 255, 0.2) !important;
    background: linear-gradient(135deg, rgba(143, 112, 255, 0.05), rgba(28, 28, 30, 0.9)) !important;
}

.personal-plan-label {
    font-size: 10px;
    color: var(--accent-purple);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.personal-plan-note {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 8px;
    font-style: italic;
}

.personal-plan-note i { width: 12px; height: 12px; flex-shrink: 0; margin-top: 1px; }

.workout-list-btn.personal-btn {
    color: var(--accent-purple) !important;
}

.personal-empty-state {
    text-align: center;
    padding: 48px 20px;
}

.pt-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.personal-empty-state h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

.personal-empty-state p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Setup Step 7: Trainer Link ── */
.trainer-link-icon {
    font-size: 56px;
    text-align: center;
    margin: 10px 0 20px;
    filter: drop-shadow(0 0 12px rgba(143, 112, 255, 0.2));
}

.trainer-choice-btns {
    display: flex;
    gap: 14px;
    margin: 10px 0 20px;
}

.trainer-choice-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

.trainer-choice-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.trainer-choice-card.selected {
    border-color: var(--accent-purple);
    background: rgba(143, 112, 255, 0.06);
    box-shadow: 0 0 18px rgba(143, 112, 255, 0.2);
}

.trainer-choice-icon { font-size: 28px; }

.trainer-code-section {
    margin-bottom: 8px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.trainer-code-hint {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    line-height: 1.4;
}

.pt-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* =========================================================
   ROUTINE BUILDER — PREMIUM REDESIGN + SPOTIFY
   ========================================================= */

/* ── New Builder Form Container ── */
.builder-form-new {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 20px;
}

/* ── Steps ── */
.builder-step {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition-smooth);
}

.builder-step:focus-within {
    border-color: rgba(143, 112, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(143, 112, 255, 0.06);
}

.builder-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.builder-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), #6d52e0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(143, 112, 255, 0.3);
}

/* ── Builder Inputs ── */
.builder-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 13px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.builder-input:focus {
    border-color: var(--accent-purple);
    background: rgba(143, 112, 255, 0.04);
    box-shadow: 0 0 0 3px rgba(143, 112, 255, 0.1);
}

.builder-input::placeholder { color: var(--text-muted); }

/* ── Row layout ── */
.builder-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.builder-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: opacity 0.3s ease;
}

.builder-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.builder-select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 11px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    -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='none' stroke='%236e6e73' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.builder-select:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(143, 112, 255, 0.1);
}

.builder-select option { background: #2c2c2e; color: #fff; }

/* ── Selected Count Info ── */
.builder-selected-info {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 11px;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.builder-selected-info i { width: 13px; height: 13px; flex-shrink: 0; }

.builder-selected-info.has-selection {
    background: rgba(208, 253, 62, 0.06);
    border-color: rgba(208, 253, 62, 0.2);
    color: var(--accent-yellow);
}

/* ── Search Box ── */
.builder-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 10px 14px;
    transition: var(--transition-smooth);
}

.builder-search-box:focus-within {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(143, 112, 255, 0.08);
}

.builder-search-box i { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }

.builder-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    width: 100%;
}

.builder-search-box input::placeholder { color: var(--text-muted); }

/* ── Group Header ── */
.ex-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px 6px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 4px;
}

.ex-group-icon { font-size: 14px; }

/* ── New Exercise Select Item ── */
.exercise-select-item-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.01);
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-bottom: 4px;
}

.exercise-select-item-new:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.exercise-select-item-new.selected {
    background: rgba(143, 112, 255, 0.08);
    border-color: rgba(143, 112, 255, 0.25);
}

.ex-select-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ex-select-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.ex-select-group {
    font-size: 10px;
    color: var(--text-muted);
}

.ex-select-check {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.ex-select-check i { width: 14px; height: 14px; color: transparent; }

.exercise-select-item-new.selected .ex-select-check {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    box-shadow: 0 0 10px rgba(143, 112, 255, 0.35);
}

.exercise-select-item-new.selected .ex-select-check i { color: #fff; }

@keyframes selectPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* ── Exercise List Container ── */
.exercise-selector-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 4px 2px;
    border-radius: 12px;
}

.exercise-selector-list::-webkit-scrollbar { width: 4px; }
.exercise-selector-list::-webkit-scrollbar-track { background: transparent; }
.exercise-selector-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

/* ── Submit Button ── */
.builder-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-yellow), #b8e032);
    color: var(--bg-darker);
    border: none;
    border-radius: 18px;
    padding: 16px 20px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-bounce);
    box-shadow: 0 6px 20px rgba(208, 253, 62, 0.25);
    position: relative;
    overflow: hidden;
}

.builder-submit-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.builder-submit-btn:hover::before { opacity: 1; }
.builder-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(208, 253, 62, 0.35); }
.builder-submit-btn i { width: 20px; height: 20px; }

.spotify-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

/* ── Spotify Connect Banner ── */
.spotify-connect-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(30, 215, 96, 0.08), rgba(30, 215, 96, 0.02));
    border: 1px solid rgba(30, 215, 96, 0.2);
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 14px;
    gap: 12px;
    transition: var(--transition-smooth);
}

.spotify-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.spotify-logo-icon {
    width: 42px;
    height: 42px;
    background: #1ed760;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(30, 215, 96, 0.35);
}

.spotify-logo-icon svg { width: 22px; height: 22px; }

.spotify-banner-left div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.spotify-banner-left strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.spotify-banner-left span {
    font-size: 11px;
    color: var(--text-secondary);
}

.spotify-connect-btn {
    background: #1ed760;
    border: none;
    border-radius: 20px;
    color: #000;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    padding: 8px 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(30, 215, 96, 0.3);
}

.spotify-connect-btn:hover {
    background: #1fdf64;
    transform: scale(1.03);
}

/* ── Connected Card ── */
.spotify-connected-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(30, 215, 96, 0.08), rgba(30, 215, 96, 0.02));
    border: 1px solid rgba(30, 215, 96, 0.25);
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 14px;
    gap: 12px;
    animation: slideInGreen 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideInGreen {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.spotify-user-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.spotify-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1ed760;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #000;
    flex-shrink: 0;
}

.spotify-user-left div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.spotify-connected-label {
    font-size: 10px;
    color: #1ed760;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spotify-user-left strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.spotify-disconnect-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.spotify-disconnect-btn:hover { border-color: #ff5050; color: #ff5050; }
.spotify-disconnect-btn i { width: 14px; height: 14px; }

/* ── Spotify Auth Modal ── */
.spotify-auth-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    justify-content: center;
    align-items: flex-end;
    z-index: 400;
    backdrop-filter: blur(6px);
    border-radius: inherit;
}

.spotify-auth-modal.active { display: flex; }

.spotify-auth-card {
    background: var(--bg-dark);
    border: 1px solid rgba(30, 215, 96, 0.2);
    border-radius: 28px 28px 0 0;
    padding: 28px 24px 32px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    animation: slideUpSpotify 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUpSpotify {
    from { transform: translateY(60px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.spotify-auth-logo {
    width: 64px;
    height: 64px;
    background: #1ed760;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(30, 215, 96, 0.4);
    animation: pulseSpotify 2s infinite ease-in-out;
}

@keyframes pulseSpotify {
    0%, 100% { box-shadow: 0 8px 24px rgba(30, 215, 96, 0.4); }
    50% { box-shadow: 0 8px 36px rgba(30, 215, 96, 0.65); }
}

.spotify-auth-logo svg { width: 34px; height: 34px; }

.spotify-auth-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.spotify-auth-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.spotify-auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spotify-auth-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(30, 215, 96, 0.2);
    border-radius: 14px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    text-align: center;
    transition: var(--transition-smooth);
}

.spotify-auth-input:focus {
    border-color: #1ed760;
    box-shadow: 0 0 0 3px rgba(30, 215, 96, 0.12);
}

.spotify-auth-input.shake {
    animation: shakeInput 0.4s ease;
}

@keyframes shakeInput {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.spotify-auth-confirm-btn {
    width: 100%;
    background: #1ed760;
    border: none;
    border-radius: 14px;
    color: #000;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    padding: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-bounce);
    box-shadow: 0 4px 16px rgba(30, 215, 96, 0.3);
}

.spotify-auth-confirm-btn:hover {
    background: #1fdf64;
    transform: scale(1.01);
}

.spotify-auth-cancel-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.spotify-auth-cancel-btn:hover { border-color: rgba(255,255,255,0.2); color: var(--text-secondary); }

/* ── Playlist Created Toast ── */
.playlist-created-toast {
    position: absolute;
    bottom: 90px;
    left: 12px;
    right: 12px;
    background: linear-gradient(135deg, #1c1c1e, #2c2c2e);
    border: 1px solid rgba(30, 215, 96, 0.35);
    border-radius: 18px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 500;
    box-shadow: 0 8px 30px rgba(30, 215, 96, 0.15);
}

.playlist-created-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.playlist-toast-icon {
    width: 42px;
    height: 42px;
    background: #1ed760;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    flex-shrink: 0;
}

.playlist-toast-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.playlist-toast-text strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.playlist-toast-text span {
    font-size: 11px;
    color: var(--text-secondary);
}

.playlist-toast-open {
    background: #1ed760;
    border-radius: 10px;
    color: #000;
    font-size: 11px;
    font-weight: 800;
    padding: 7px 12px;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.playlist-toast-open:hover { background: #1fdf64; }

