/* ===================================
   Design System & Variables
   FitBudd Brand - v2.0
   =================================== */
:root {
    /* FitBudd Brand Colors - Premium Palette */
    --primary-dark: #0D0D0D;
    --accent-orange: #FF613E;
    --background: #0D0D0D;
    --text-dark: #ffffff;
    --text-light: #94a3b8;
    --white: #ffffff;
    --border: #1e293b;
    --hover-bg: #1e293b;
    --success: #4caf50;

    /* Typography - Compact & Mobile-Optimized */
    --font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 15px;
    --font-size-question: 22px;
    --font-size-headline: 32px;

    /* Spacing - Compact Editorial */
    --spacing-xs: 6px;
    --spacing-sm: 10px;
    --spacing-md: 16px;
    --spacing-lg: 20px;
    --spacing-xl: 28px;
    --spacing-2xl: 36px;

    /* Border Radius */
    --radius: 8px;
    --radius-lg: 12px;

    /* Transitions */
    --transition-fast: 200ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 400ms ease;

    /* Touch targets */
    --touch-target-min: 44px;
}

/* ===================================
   Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-dark);
    background: var(--background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    padding-top: 96px;
}

/* ===================================
   Minimal Top Bar
   =================================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--background);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1001;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    padding: 0 20px;
    max-width: 680px;
    margin: 0 auto;
}

.top-bar-back-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    display: none;
    align-items: center;
    gap: 6px;
    transition: opacity var(--transition-fast);
    font-family: var(--font-family);
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    z-index: 2;
    opacity: 1;
}

.top-bar-back-btn:hover {
    opacity: 0.8;
}

.top-bar-back-btn svg {
    width: 16px;
    height: 16px;
}

.top-bar-back-btn svg path {
    stroke: #ffffff;
}

.top-bar-center {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
}

.top-bar-center > * {
    pointer-events: auto;
}

.fitbudd-logo-nav {
    width: 90px;
    height: auto;
    opacity: 0.85;
}

.top-bar-progress {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
    text-align: center;
    display: none;
}

.top-bar-question-counter {
    font-size: 13px;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.3px;
    opacity: 1;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    z-index: 2;
}

/* ===================================
   Navigation Section (below top bar)
   =================================== */
.nav-section {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--background);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    max-width: 680px;
    margin: 0 auto;
}

.progress-text {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
    text-align: center;
}

/* ===================================
   Progress Bar
   =================================== */
.progress-container {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.03);
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: var(--accent-orange);
    width: 0%;
    transition: width var(--transition-normal);
}

/* ===================================
   Survey Container - Compact & Embedded
   =================================== */
.survey-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12px 16px 4px 16px;
}

.screen {
    width: 100%;
    max-width: 650px;
    animation: fadeInUp var(--transition-normal);
}

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

/* ===================================
   Welcome Screen - Institutional Grade
   =================================== */
.welcome-screen {
    text-align: center;
    padding: var(--spacing-md) 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.welcome-screen .research-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #FF613E;
    text-transform: uppercase;
    margin-bottom: var(--spacing-lg);
    display: inline-block;
    background: white;
    border-radius: 17px;
    padding: 7px 14px;
}

/* Typography: Editorial, balanced, considered */
.headline {
    font-size: 36px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.subheadline {
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    margin-left: auto;
    margin-right: auto;
    white-space: nowrap;
}

.body-text {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.75;
    margin-bottom: var(--spacing-xl);
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.body-text p {
    margin-bottom: var(--spacing-md);
}

.body-text p:last-child {
    margin-bottom: 0;
    font-size: 14px;
}

.footer-text {
    font-size: 12px;
    color: #64748b;
    margin-top: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    opacity: 0.9;
}

/* ===================================
   Transition Screens
   =================================== */
.transition-screen {
    text-align: center;
    padding: var(--spacing-sm) 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.transition-icon {
    font-size: 36px;
    margin-bottom: var(--spacing-xs);
}

.transition-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
    line-height: 1.3;
}

.transition-subtitle {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

/* ===================================
   Question Screens
   =================================== */
.question-screen {
    padding: 8px 0 0 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.question-instruction {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.question-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.45;
    margin-bottom: var(--spacing-md);
}

.question-label {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.question-subtext {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
}

/* ===================================
   Options Container
   =================================== */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

/* ===================================
   Option Buttons (Single Select)
   =================================== */
.option-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 13px 16px;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-dark);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    min-height: var(--touch-target-min);
    display: flex;
    align-items: center;
    font-family: var(--font-family);
}

.option-btn:hover {
    border-color: var(--accent-orange);
    opacity: 0.9;
}

.option-btn.selected {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
    font-weight: 500;
}

/* ===================================
   Likert Scale Options
   =================================== */
.likert-container {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.likert-btn {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 10px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-dark);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    min-height: var(--touch-target-min);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
    line-height: 1.3;
}

.likert-btn:hover {
    border-color: var(--accent-orange);
    opacity: 0.9;
}

.likert-btn.selected {
    background: var(--accent-orange);
    color: white;
    border-color: var(--accent-orange);
    font-weight: 500;
}

/* ===================================
   Multi-Select (Checkboxes)
   =================================== */
.checkbox-option {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
}

.checkbox-option:hover {
    background: rgba(148, 163, 184, 0.05);
    border-color: var(--accent-orange);
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-orange);
    flex-shrink: 0;
}

.checkbox-option label {
    cursor: pointer;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-dark);
    flex: 1;
    line-height: 1.4;
}

.checkbox-option.checked {
    background: rgba(242, 135, 5, 0.08);
    border-color: var(--accent-orange);
}

/* ===================================
   Text Inputs
   =================================== */
.text-input,
.textarea-input {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    width: 100%;
    background: var(--hover-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 15px;
    font-family: var(--font-family);
    color: var(--text-dark);
    transition: border-color var(--transition-fast);
    min-height: var(--touch-target-min);
    margin-top: 20px;
}

.text-input:focus,
.textarea-input:focus {
    outline: none;
    border-color: var(--accent-orange);
}

.textarea-input {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.text-input::placeholder,
.textarea-input::placeholder {
    color: #999;
}

.char-counter {
    text-align: right;
    font-size: 13px;
    color: var(--text-light);
    margin-top: var(--spacing-xs);
}

/* ===================================
   Buttons
   =================================== */
.btn {
    background: var(--accent-orange);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 13px 26px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
    min-height: var(--touch-target-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    background: var(--accent-orange);
    opacity: 0.9;
}

.btn-primary {
    background: var(--accent-orange);
    color: white;
}

.btn-accent {
    background: var(--accent-orange);
    color: white;
}

.btn-accent:hover {
    background: var(--accent-orange);
    opacity: 0.9;
}

.btn-container {
    margin-top: var(--spacing-lg);
    display: flex;
    gap: var(--spacing-sm);
}

.btn-container.center {
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.post-cta-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.coaches-image {
    width: 80px;
    height: auto;
    flex-shrink: 0;
}

.post-cta-text {
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    padding: 0 16px;
}

.cta-subtext {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 0;
    font-weight: 400;
    text-align: center;
}

.welcome-footer {
    font-size: 12px;
    color: var(--text-light);
    margin-top: var(--spacing-2xl);
    text-align: center;
    opacity: 0.7;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--accent-orange);
    color: var(--accent-orange);
}

.btn-secondary:hover {
    background: transparent;
    border: 2px solid var(--accent-orange);
    color: var(--accent-orange);
    opacity: 0.9;
}

/* ===================================
   Toast Notifications
   =================================== */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--accent-orange);
    color: var(--white);
    padding: 10px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: all var(--transition-normal);
    z-index: 2000;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===================================
   Social Proof
   =================================== */
.social-proof {
    text-align: center;
    padding: var(--spacing-sm) 0;
    padding-top: var(--spacing-md);
    font-size: 14px;
    color: var(--text-light);
    font-style: italic;
    line-height: 1.4;
}

/* ===================================
   Thank You Screen
   =================================== */
.thank-you-screen {
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.celebration {
    font-size: 48px;
    margin-bottom: var(--spacing-sm);
    animation: celebrationBounce 0.6s ease;
}

@keyframes celebrationBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.thank-you-headline {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent-orange);
    margin-bottom: var(--spacing-sm);
}

.thank-you-text {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
}

.share-section {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border);
}

.social-share {
    margin-top: var(--spacing-2xl);
}

.social-share-message {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.social-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    border: 1px solid var(--border);
}

.social-btn svg {
    width: 18px;
    height: 18px;
}

.social-btn.linkedin {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
}

.social-btn.linkedin:hover {
    background: #005885;
    border-color: #005885;
}

.social-btn.twitter {
    background: #000000;
    color: white;
    border-color: #000000;
}

.social-btn.twitter:hover {
    background: #333333;
    border-color: #333333;
}

.social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    border: none;
}

.social-btn.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    opacity: 0.9;
    border: none;
}

.social-btn.facebook {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.social-btn.facebook:hover {
    background: #0d5dbf;
    border-color: #0d5dbf;
}

/* ===================================
   Loading Spinner
   =================================== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn .loading {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
}

/* ===================================
   Responsive Design
   =================================== */

/* Tablet and below */
@media (max-width: 768px) {
    :root {
        --font-size-headline: 24px;
        --font-size-question: 18px;
        --spacing-xs: 4px;
        --spacing-sm: 6px;
        --spacing-md: 10px;
        --spacing-lg: 14px;
    }

    .survey-container {
        padding: 20px 16px 4px 16px;
    }

    .headline {
        font-size: 28px;
        line-height: 1.25;
    }

    .subheadline {
        font-size: 16px;
    }

    .body-text {
        font-size: 14px;
    }

    .coaches-image {
        width: 70px;
    }

    .post-cta-text {
        font-size: 14px;
    }

    .question-text {
        font-size: 19px;
        margin-bottom: var(--spacing-sm);
    }

    .options-container {
        gap: 12px;
        margin-top: 16px;
    }

    .likert-container {
        flex-direction: column;
        gap: 12px;
        margin-top: 16px;
    }

    .text-input,
    .textarea-input {
        margin-top: 16px;
    }

    .likert-btn {
        min-height: var(--touch-target-min);
        padding: 14px;
        font-size: 14px;
    }

    .progress-counter {
        font-size: 11px;
        top: 10px;
        right: 10px;
    }

    .option-btn {
        padding: 12px 14px;
        font-size: 14px;
    }

    .checkbox-option {
        padding: 10px 12px;
        gap: 10px;
    }

    .checkbox-option label {
        font-size: 14px;
    }

    .transition-screen {
        padding: var(--spacing-xs) 0;
    }

    .transition-icon {
        font-size: 28px;
        margin-bottom: 2px;
    }

    .transition-title {
        font-size: 17px;
        margin-bottom: 4px;
    }

    .transition-subtitle {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .social-proof {
        padding: 8px 0;
        padding-top: 10px;
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    :root {
        --font-size-headline: 22px;
        --font-size-question: 17px;
        --spacing-xs: 3px;
        --spacing-sm: 6px;
        --spacing-md: 8px;
        --spacing-lg: 12px;
    }

    .nav-section {
        padding: 0 16px;
        height: 36px;
    }

    .progress-text {
        font-size: 11px;
    }

    .top-bar {
        height: 52px;
    }

    .progress-container {
        top: 52px;
    }

    .fitbudd-logo-nav {
        width: 80px;
    }

    body {
        padding-top: 88px;
    }

    .survey-container {
        padding: 12px 16px 4px 16px;
    }

    .headline {
        font-size: 26px;
    }

    .subheadline {
        font-size: 15px;
    }

    .question-text {
        font-size: 18px;
    }

    .coaches-image {
        width: 60px;
    }

    .post-cta-text {
        font-size: 13px;
    }

    .top-bar {
        padding: 0 16px;
    }

    .top-bar-back-btn {
        font-size: 14px;
        font-weight: 600;
    }

    .top-bar-back-btn svg {
        width: 14px;
        height: 14px;
    }

    .top-bar-back-btn svg path {
        stroke: #ffffff;
    }

    .top-bar-question-counter {
        font-size: 12px;
        color: #ffffff;
        font-weight: 600;
        opacity: 1;
    }

    .options-container {
        gap: 10px;
        margin-top: 14px;
    }

    .likert-container {
        gap: 10px;
        margin-top: 14px;
    }

    .text-input,
    .textarea-input {
        margin-top: 14px;
    }

    .option-btn {
        padding: 11px 12px;
        font-size: 14px;
    }

    .checkbox-option {
        padding: 9px 11px;
        gap: 9px;
    }

    .likert-btn {
        padding: 12px 9px;
    }

    .badge {
        font-size: 10px;
        padding: 5px 10px;
        margin-bottom: var(--spacing-xs);
    }

    .thank-you-headline {
        font-size: 26px;
    }

    .celebration {
        font-size: 36px;
    }

    .question-instruction {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .question-text {
        margin-bottom: 6px;
    }
}

/* Extra small mobile */
@media (max-width: 360px) {
    :root {
        --font-size-question: 17px;
    }

    .headline {
        font-size: 24px;
    }

    .question-text {
        font-size: 17px;
    }

    .likert-btn {
        font-size: 13px;
        padding: 12px 8px;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

/* Accessibility */
.option-btn:focus,
.likert-btn:focus,
.btn:focus,
.text-input:focus,
.textarea-input:focus {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
}

/* ===================================
   Embed & Iframe Optimization
   =================================== */

/* Prevent horizontal scroll */
html {
    overflow-x: hidden;
}

/* Optimize body to fit content */
html, body {
    height: auto;
    min-height: 100vh;
}

/* Make it work well in iframes and short viewports */
@media (max-height: 700px) {
    .survey-container {
        padding-top: 20px;
        padding-bottom: 8px;
    }

    .question-screen,
    .transition-screen {
        padding: 0;
    }

    .transition-icon {
        font-size: 32px;
        margin-bottom: 4px;
    }

    .social-proof {
        padding: 6px 0;
        padding-top: 8px;
    }

    .btn-container {
        margin-top: var(--spacing-sm);
    }
}

/* Ensure touch targets are adequate on all devices */
@media (pointer: coarse) {
    .option-btn,
    .likert-btn,
    .checkbox-option,
    .btn {
        min-height: 48px;
    }
}
