      /* Analysis-specific styles only */
      body {
        background: linear-gradient(180deg, #000000 0%, #05101e 100%);
        min-height: 100vh;
        color: #ffffff;
        font-family: "Nunito Sans", sans-serif;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: center;
      }

      .on-demand-headline {
        display: none !important; /* Hide legacy headline across all breakpoints */
      }
      
      .headline-static {
        background: -webkit-linear-gradient(#fff, #aaa);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        -webkit-text-fill-color: transparent;
      }

      .headline-rotating {
        background: linear-gradient(135deg, #b8860b 0%, #dfa400 25%, #f4c84a 75%, #ffd700 100%);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        display: inline-block;
        transition: opacity 0.3s ease-in-out;
      }

      @media (max-width: 768px) {
        body {
          justify-content: flex-start; /* Don't center on mobile, start from top */
          padding-top: 70px; /* Account for fixed header (~50-60px) + some spacing */
        }
      }

      .upload-section {
        padding: 1rem;
        text-align: center;
        margin-bottom: 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
      }

      .upload-section h2 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
      }

      .upload-section p {
        font-size: 1.2rem;
      }

      .upload-instructions {
        margin-bottom: 2rem;
        color: rgba(255, 255, 255, 0.7);
        font-size: 1.3rem !important;
      }

      .upload-area {
        width: 55vw;
        max-width: 220px;
        aspect-ratio: 9 / 16;
        max-height: 50vh;
        padding: 1.5rem 1rem;
        border: 2px dashed rgba(255, 255, 255, 0.2);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.03);
        transition: all 0.3s ease;
        margin-top: 1rem;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
      }

      .upload-area:active {
        transform: scale(0.98);
        background: rgba(255, 255, 255, 0.08);
      }

      .upload-area.disabled {
        pointer-events: none;
        opacity: 0.45;
        border-color: rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.02);
      }

      .upload-area.upgrade-mode {
        border-color: rgba(33, 150, 243, 0.5);
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.15), rgba(33, 150, 243, 0.05));
        box-shadow: 0 8px 32px rgba(33, 150, 243, 0.15);
        transform: scale(1.02);
        animation: pulse-subtle 3s infinite ease-in-out;
        pointer-events: auto;
        opacity: 1;
      }

      .upload-area.upgrade-mode:hover {
        border-color: rgba(33, 150, 243, 0.8);
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.25), rgba(33, 150, 243, 0.1));
        box-shadow: 0 12px 40px rgba(33, 150, 243, 0.25);
        transform: scale(1.03);
      }

      .upload-area.upgrade-mode .upload-text {
        color: #ffffff;
        text-shadow: 0 2px 10px rgba(33, 150, 243, 0.3);
      }

      .upload-area.upgrade-mode .upload-icon {
        filter: drop-shadow(0 0 15px rgba(33, 150, 243, 0.4));
      }

      @keyframes pulse-subtle {
        0% { box-shadow: 0 8px 32px rgba(33, 150, 243, 0.15); }
        50% { box-shadow: 0 8px 32px rgba(33, 150, 243, 0.3); }
        100% { box-shadow: 0 8px 32px rgba(33, 150, 243, 0.15); }
      }

      .upload-icon {
        font-size: 3rem;
        margin-bottom: 0.8rem;
        display: block;
      }

      .upload-text {
        font-size: 1.4rem;
        font-weight: bold;
        margin-bottom: 0.3rem;
        display: block;
        color: #fff;
      }

      .upload-subtext {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.6);
        display: block;
      }

      /* Mobile scaling for upload area */
      @media (max-width: 480px) {
        .upload-section {
          padding: 1rem;
        }

        .upload-area {
          padding: 1.5rem 1rem;
          border-radius: 14px;
          max-height: 45vh;
          width: 60vw;
          max-width: 250px;
        }

        .upload-icon {
          font-size: 2.8rem;
          margin-bottom: 0.8rem;
        }

        .upload-text {
          font-size: 1.3rem;
          font-weight: 700;
        }

        .upload-subtext {
          font-size: 0.9rem;
        }
      }

      .video-preview-container {
        margin-top: 1rem;
        display: none;
        text-align: center;
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 0 1rem;
        box-sizing: border-box;
        overflow-x: hidden;
      }
      
      /* Scoped to analysis.html only - override global video styles from styles.css */
      /* Video should maintain its natural aspect ratio, not be forced to 16:9 or 9:16 */
      .video-preview-container video,
      body.has-navbar .video-preview-container video,
      #videoPreview {
        position: relative !important; /* Override absolute from styles.css */
        top: auto !important;
        left: auto !important;
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
        max-height: 50vh !important;
        min-width: 0 !important;
        min-height: 0 !important;
        object-fit: contain !important;
        object-position: center !important;
        border-radius: 16px;
        transform: none !important;
        -webkit-transform: none !important;
        -moz-transform: none !important;
        display: block;
        /* NO aspect-ratio - let video maintain its natural aspect ratio */
      }

      /* Scoped to analysis.html only - .video-wrapper within .video-preview-container */
      /* Note: video-wrapper should NOT have max-height - it sizes to fit the video */
      .video-preview-container .video-wrapper,
      body.has-navbar .video-preview-container .video-wrapper {
        box-sizing: border-box;
        position: relative;
        border-radius: 20px;
        overflow: hidden;
        margin-bottom: 0.3rem; /* Minimal margin to keep video close to controls */
        padding: 0;
        transition: padding 0.3s ease, box-shadow 0.3s ease;
        width: auto;
        max-width: 100%;
        display: inline-block;
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
        background: rgba(0,0,0,0.5);
        line-height: 0;
        /* NO max-height - wrapper sizes to fit video */
        /* NO aspect-ratio - let video maintain its natural aspect ratio */
      }
      
      /* Video Skeleton Loader */
      .video-skeleton-loader {
        position: relative;
        width: auto;
        max-width: 100%;
        background: rgba(30, 30, 30, 0.8);
        border-radius: 20px;
        overflow: hidden;
        z-index: 5;
        display: none; /* Hidden by default, shown via JavaScript */
        /* Aspect ratio will be set dynamically via JavaScript to match video */
        aspect-ratio: 16 / 9; /* Default fallback */
        max-height: 50vh;
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
        line-height: 0; /* Match video-wrapper line-height */
        /* Ensure it's visible and covers the video area */
        margin: 0;
        padding: 0;
      }
      
      .skeleton-shimmer {
        width: 100%;
        height: 100%;
        background: linear-gradient(
          90deg,
          rgba(255, 255, 255, 0.05) 0%,
          rgba(255, 255, 255, 0.1) 50%,
          rgba(255, 255, 255, 0.05) 100%
        );
        background-size: 200% 100%;
        animation: skeleton-shimmer 1.5s ease-in-out infinite;
      }
      
      @keyframes skeleton-shimmer {
        0% {
          background-position: -200% 0;
        }
        100% {
          background-position: 200% 0;
        }
      }
      
      .video-preview-container .video-wrapper video,
      body.has-navbar .video-preview-container .video-wrapper video,
      .video-preview-container .video-wrapper #videoPreview {
        display: block;
        position: relative;
        z-index: 2;
        margin-bottom: 0;
        box-shadow: none;
        /* Inherit all video styles from parent selector above */
      }

      /* Feedback overlay canvas - scoped to analysis.html only */
      /* Canvas should be 100% of video-wrapper (no max-height) to properly overlay the video */
      .video-preview-container .feedback-overlay-canvas,
      body.has-navbar .video-preview-container .feedback-overlay-canvas,
      #feedbackOverlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: none !important; /* No max-height - fills wrapper completely */
        z-index: 3;
        pointer-events: none;
        border-radius: 16px;
        transform: none !important; /* No transform - align with video */
        -webkit-transform: none !important;
        -moz-transform: none !important;
        object-fit: contain !important;
        /* NO aspect-ratio - canvas should match video dimensions exactly */
      }

      /* Dark gradient overlay at bottom of video for progress bar */
      .video-progress-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 4; /* Above video and feedback canvas */
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.6), transparent);
        padding: 1.5rem 1.5rem 1rem 1.5rem;
        pointer-events: none; /* Allow clicks to pass through to video */
        border-radius: 0 0 20px 20px; /* Match video-wrapper border-radius */
        display: none; /* Hidden by default, shown when upload starts */
      }

      /* .video-wrapper.analyzing - Fire-trail effect */
      .video-preview-container .video-wrapper.analyzing,
      body.has-navbar .video-preview-container .video-wrapper.analyzing {
        padding: 4px;
        box-shadow: 0 0 30px rgba(33, 150, 243, 0.4);
      }

      .video-preview-container .video-wrapper.analyzing::before,
      body.has-navbar .video-preview-container .video-wrapper.analyzing::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: conic-gradient(
          from 0deg,
          transparent 0%, 
          transparent 70%, 
          #1565C0 85%, 
          #2196F3 92%, 
          #64B5F6 96%, 
          #FFFFFF 100%
        );
        animation: border-rotate 2s linear infinite;
        z-index: 1;
        border-radius: 20px;
        pointer-events: none;
      }

      @keyframes border-rotate {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
      }

      /* Spartan Legend Barbell Loader Styles */
      .barbell-loader-container {
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        margin: 0 0 0.5rem 0; /* Reduced bottom margin since prompt bar is always visible */
        width: 100%;
      }

      .barbell-loader-container h3 {
        display: none;
        font-size: 1.8rem;
        text-align: center;
        margin: 0 1rem;
        line-height: 1.3;
      }

      .money-buttons-loader {
        display: none;
      }

      .interaction-message {
        display: none;
      }

      .barbell-container-loader {
        display: none;
      }

      .money-buttons-loader {
        display: flex;
        gap: 1.5rem;
        justify-content: center;
        flex-wrap: wrap;
        margin: 1rem 0;
      }

      .money-btn-loader {
        border: 3px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        color: white;
        position: relative;
        overflow: hidden;
      }

      /* Increased sizes for mobile */
      .money-btn-loader[data-amount="25"] {
        width: 90px;
        height: 90px;
        background: #dfa400;
        font-size: 1.2rem;
      }

      .money-btn-loader[data-amount="50"] {
        width: 100px;
        height: 100px;
        background: #2196F3;
        font-size: 1.3rem;
      }

      .money-btn-loader[data-amount="100"] {
        width: 110px;
        height: 110px;
        background: #4CAF50;
        font-size: 1.4rem;
      }

      .money-btn-loader[data-amount="200"] {
        width: 120px;
        height: 120px;
        background: #FF5722;
        font-size: 1.5rem;
      }

      .money-btn-loader:hover {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
        border-color: rgba(255, 255, 255, 0.8);
      }

      .money-btn-loader.clicked {
        transform: scale(0.95);
      }

      /* Hide amounts as requested */
      .money-amount-loader {
        display: none;
      }

      .barbell-container-loader {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-top: 3rem;
        pointer-events: auto;
        width: 100%;
      }

      .barbell-loader {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 120px;
        opacity: 0.6;
        transition: opacity 0.3s ease;
        width: 100%;
        max-width: 400px;
      }

      .barbell-loader.shake {
        animation: barbellShake 0.5s ease-in-out;
      }

      .barbell-bar-loader {
        width: 100%;
        height: 12px;
        background: linear-gradient(90deg, #666, #999, #666);
        border-radius: 6px;
        position: relative;
        z-index: 2;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
      }

      .barbell-bar-loader::before,
      .barbell-bar-loader::after {
        content: '';
        position: absolute;
        top: -10px;
        width: 24px;
        height: 32px;
        background: linear-gradient(90deg, #555, #777, #555);
        border-radius: 6px;
      }

      .barbell-bar-loader::before {
        left: -12px;
      }

      .barbell-bar-loader::after {
        right: -12px;
      }

      .weight-plates-loader {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        gap: 4px;
      }

      .left-plates-loader {
        right: 50%;
        margin-right: 20px;
        flex-direction: row-reverse;
      }

      .right-plates-loader {
        left: 50%;
        margin-left: 20px;
        flex-direction: row;
      }

      .weight-plate-loader {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
        opacity: 0;
        transform: scale(0.5);
        transition: all 0.3s ease;
      }

      .weight-plate-loader.plate-entrance {
        opacity: 1;
        transform: scale(1);
        animation: plateEntrance 0.6s ease-out;
      }

      .reset-button-loader {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        padding: 1rem;
        border-radius: 12px;
        font-family: "Nunito Sans", sans-serif;
        font-weight: 700;
        font-size: 1.5rem;
        cursor: pointer;
        width: 60px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        opacity: 0.9;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 100;
        transition: all 0.2s ease;
        margin-top: 60px;
      }

      .reset-button-loader:hover {
        background: rgba(0, 0, 0, 0.6);
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 1;
      }

      .interaction-message {
        color: rgba(255, 255, 255, 0.9);
        font-size: 1.4rem;
        margin-top: 1.5rem;
        min-height: 1.5em;
        font-weight: 600;
        text-shadow: 0 2px 4px rgba(0,0,0,0.5);
      }

      @keyframes barbellShake {
        0%, 100% { transform: translateX(0); }
        25% { transform: translateX(-5px); }
        75% { transform: translateX(5px); }
      }

      @keyframes plateEntrance {
        0% {
          opacity: 0;
          transform: scale(0.5) translateY(20px);
        }
        60% {
          transform: scale(1.1) translateY(-5px);
        }
        100% {
          opacity: 1;
          transform: scale(1) translateY(0);
        }
      }

      /* Confetti Animation Styles */
      .confetti-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        pointer-events: none;
        z-index: 9999;
        overflow: hidden;
      }

      .confetti-piece {
        position: absolute;
        width: 6px; /* Scaled down 50% from 12px */
        height: 6px; /* Scaled down 50% from 12px */
        background: #ff6b35;
        animation: confetti-fall 3s linear infinite;
      }

      .confetti-piece:nth-child(2n) {
        background: #4ade80;
        animation-delay: 0.1s;
      }

      .confetti-piece:nth-child(3n) {
        background: #fbbf24;
        animation-delay: 0.2s;
      }

      .confetti-piece:nth-child(4n) {
        background: #8b5cf6;
        animation-delay: 0.3s;
      }

      .confetti-piece:nth-child(5n) {
        background: #06b6d4;
        animation-delay: 0.4s;
      }

      @keyframes confetti-fall {
        0% {
          transform: translateY(-100vh) rotate(0deg);
          opacity: 1;
        }
        100% {
          transform: translateY(100vh) rotate(720deg);
          opacity: 0;
        }
      }

      @media (max-width: 768px) {
        /* Scoped to analysis.html only - maintain natural aspect ratio */
        .video-preview-container video,
        body.has-navbar .video-preview-container video,
        #videoPreview {
          max-height: 50vh !important;
          width: auto !important;
          height: auto !important;
          /* NO aspect-ratio - let video maintain its natural aspect ratio */
        }
        
        /* Video wrapper should NOT have max-height - it sizes to fit video */
        .video-preview-container .video-wrapper,
        body.has-navbar .video-preview-container .video-wrapper {
          /* No max-height constraint */
          /* NO aspect-ratio - let video maintain its natural aspect ratio */
        }
        
        .video-preview-container .video-wrapper video,
        body.has-navbar .video-preview-container .video-wrapper video,
        .video-preview-container .video-wrapper #videoPreview {
          max-height: 50vh !important;
          height: auto !important;
          width: auto !important;
          /* NO aspect-ratio - let video maintain its natural aspect ratio */
        }
        
        /* Canvas should fill wrapper completely (no max-height) */
        .video-preview-container .feedback-overlay-canvas,
        body.has-navbar .video-preview-container .feedback-overlay-canvas,
        #feedbackOverlay {
          /* No max-height - fills wrapper which sizes to video */
        }

        .upload-section {
          padding: 1.5rem 1rem;
        }
        
        /* Video controls - ensure 48px minimum for mobile touch targets */
        .frame-navigation-buttons {
          gap: 0.5rem;
        }

        .frame-nav-btn {
          min-width: 48px;
          height: 48px;
          padding: 0.6rem;
          font-size: 1rem;
        }

        .upload-section h2 {
          font-size: 2rem;
        }

        .money-btn-loader[data-amount="25"] { width: 80px; height: 80px; }
        .money-btn-loader[data-amount="50"] { width: 90px; height: 90px; }
        .money-btn-loader[data-amount="100"] { width: 100px; height: 100px; }
        .money-btn-loader[data-amount="200"] { width: 110px; height: 110px; }
        
        .barbell-bar-loader { width: 90%; }

        .barbell-loader-container h3 {
          font-size: 1.5rem;
        }

        .interaction-message {
          font-size: 1.2rem;
        }

        .upload-container {
          padding: 1rem;
        }

        .feedback-section {
          padding: 1.75rem;
          margin-bottom: 1.5rem;
          border-radius: 18px;
        }

        .feedback-header {
          font-size: 1.4rem;
          margin-bottom: 1.5rem;
        }

        .feedback-icon {
          width: 36px;
          height: 36px;
          font-size: 2rem;
          margin-right: 16px;
        }

        .feedback-item {
          padding: 1.5rem;
          font-size: 1.1rem;
          margin-bottom: 1rem;
          border-radius: 14px;
        }

        .exercise-title {
          font-size: 1.9rem;
          margin-bottom: 0.5rem;
        }

        .visibility-notice {
          font-size: 1.1rem;
          padding: 1rem 1.5rem;
          margin-top: 1.5rem;
          margin-bottom: 1rem;
          border-radius: 14px;
        }

        .analysis-results {
          padding: 0 1.5rem;
          max-width: 100%;
        }

        #repSummary {
          font-size: 1.2rem;
        }

        .change-video-btn {
          padding: 1.2rem 2rem;
          font-size: 1.1rem;
          margin: 2rem auto 0 auto;
          border-radius: 60px;
        }
      }

      @media (max-width: 430px) {
        .upload-section {
          padding: 1rem 0.5rem;
        }

        .upload-area {
          padding: 3rem 1rem;
        }

        .money-btn-loader[data-amount="25"] { width: 70px; height: 70px; font-size: 1rem; }
        .money-btn-loader[data-amount="50"] { width: 80px; height: 80px; font-size: 1.1rem; }
        .money-btn-loader[data-amount="100"] { width: 90px; height: 90px; font-size: 1.2rem; }
        .money-btn-loader[data-amount="200"] { width: 100px; height: 100px; font-size: 1.3rem; }
        
        .barbell-bar-loader { width: 100%; }
        
        .reset-button-loader {
           width: 50px;
           height: 50px;
           font-size: 1.2rem;
        }
        
        /* Video controls - maintain 48px minimum for small mobile */
        .frame-nav-btn {
          min-width: 48px;
          height: 48px;
          padding: 0.7rem;
          font-size: 1.1rem;
        }

        .visibility-notice {
          font-size: 1.1rem;
        }
      }

      /* Reuse modal styles for feedback */
      .feedback-section {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 20px;
        padding: 2rem;
        margin-bottom: 1.5rem;
        text-align: left;
        border: 1px solid rgba(255, 255, 255, 0.05);
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
      }

      .feedback-header {
        display: flex;
        align-items: center;
        margin-bottom: 1.5rem;
        font-size: 1.5rem;
        font-weight: bold;
      }

      .feedback-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        margin-right: 16px;
      }

      .feedback-icon svg {
        width: 20px;
        height: 20px;
      }

      .positive-icon {
        background: rgba(46, 204, 113, 0.2);
        color: #2ecc71;
      }

      .improvement-icon {
        background: rgba(241, 196, 15, 0.2);
        color: #f1c40f;
      }

      .rep-info-icon {
        background: rgba(52, 152, 219, 0.2);
        color: #3498db;
      }

      .feedback-list {
        list-style: none;
        padding: 0;
        margin: 0;
      }

      .feedback-item {
        margin-bottom: 1rem;
        padding: 1.5rem;
        position: relative;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.95);
        background: rgba(0, 0, 0, 0.2);
        border-radius: 16px;
        font-size: 1.1rem;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-left: 0;
        margin-right: 0;
        overflow-wrap: anywhere;
        word-wrap: break-word;
        word-break: break-word;
        white-space: normal;
        hyphens: auto;
      }

      .feedback-item::before {
        display: none;
      }

      #positiveFeedback .feedback-item {
        border-left: 3px solid #2ecc71;
        background: linear-gradient(90deg, rgba(46, 204, 113, 0.1) 0%, rgba(46, 204, 113, 0.05) 100%);
      }

      #improvementFeedback .feedback-item {
        border-left: 3px solid #f1c40f;
        background: linear-gradient(90deg, rgba(241, 196, 15, 0.1) 0%, rgba(241, 196, 15, 0.05) 100%);
      }

      /* Severity-specific styles for improvements */
      #improvementFeedback .feedback-item.severity-critical {
        border-left: 4px solid #e74c3c;
        background: linear-gradient(90deg, rgba(231, 76, 60, 0.12) 0%, rgba(231, 76, 60, 0.05) 100%);
      }

      #improvementFeedback .feedback-item.severity-minor {
        border-left: 2px solid rgba(241, 196, 15, 0.6);
        background: linear-gradient(90deg, rgba(241, 196, 15, 0.06) 0%, rgba(241, 196, 15, 0.02) 100%);
      }

      /* Severity tag styling */
      .severity-tag {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        margin-bottom: 0.5rem;
      }

      .severity-tag-critical {
        background: rgba(231, 76, 60, 0.2);
        color: #e74c3c;
        border: 1px solid rgba(231, 76, 60, 0.3);
      }

      .severity-tag-important {
        background: rgba(241, 196, 15, 0.2);
        color: #f1c40f;
        border: 1px solid rgba(241, 196, 15, 0.3);
      }

      .severity-tag-minor {
        background: rgba(149, 165, 166, 0.15);
        color: rgba(255, 255, 255, 0.6);
        border: 1px solid rgba(149, 165, 166, 0.25);
      }

      .severity-tag .severity-icon {
        font-size: 0.85rem;
        line-height: 1;
      }

      /* Feedback text after severity tag */
      .feedback-text {
        display: block;
        line-height: 1.5;
      }

      /* Clickable feedback items */
      .clickable-feedback {
        cursor: pointer;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
      }
      
      .clickable-feedback:hover {
        transform: translateX(4px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
      }
      
      .clickable-feedback:active {
        transform: translateX(2px);
      }
      
      /* Timestamp badges */
      .timestamp-badge {
        display: block; /* Changed to block for better spacing */
        background: rgba(255, 255, 255, 0.15);
        border-radius: 6px;
        padding: 0.2rem 0.6rem;
        font-size: 0.7em;
        font-weight: 600;
        margin-top: 0.5rem; /* Added top margin for better organization */
        margin-left: 0; /* Removed left margin since it's now block */
        color: rgba(255, 255, 255, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.2);
        width: fit-content; /* Only take up needed width */
      }
      
      #positiveFeedback .timestamp-badge {
        background: rgba(46, 204, 113, 0.2);
        border-color: rgba(46, 204, 113, 0.3);
        color: #2ecc71;
      }
      
      #improvementFeedback .timestamp-badge {
        background: rgba(241, 196, 15, 0.2);
        border-color: rgba(241, 196, 15, 0.3);
        color: #f1c40f;
      }

      .stopwatch-container {
        text-align: center;
        margin-top: 0;
        margin-bottom: 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
      }

      .stopwatch-time {
        font-size: 0.85rem; /* Small size */
        color: rgba(255, 255, 255, 0.6);
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        display: inline-block; /* Show in small size */
      }

      .stopwatch-note {
        font-size: 1.1rem; /* Match countdown-text font size */
        color: rgba(255, 255, 255, 0.7); /* Match countdown-text color */
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 600; /* Match countdown-text weight */
        display: block;
      }

      .status-message {
        font-size: 1.1rem; /* Match countdown-text font size */
        color: rgba(255, 255, 255, 0.7); /* Match countdown-text color */
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 600; /* Match countdown-text weight */
        display: block;
      }

      /* ============================================
         ANALYSIS TIPS IN VIDEO OVERLAY
         ============================================ */
      .analysis-tips-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
        width: 100%;
      }

      .analysis-tip-wrapper {
        min-height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        position: relative;
        overflow: hidden;
      }

      .analysis-tip {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.95);
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 600;
        text-align: center;
        line-height: 1.4;
        padding: 0 1rem;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
        animation: tip-fade-in 0.5s ease-out;
      }

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

      .tip-progress-dots {
        display: flex;
        gap: 0.5rem;
        align-items: center;
        justify-content: center;
      }

      .tip-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
      }

      .tip-dot.active {
        background: linear-gradient(135deg, #2196F3, #64B5F6);
        box-shadow: 0 0 8px rgba(33, 150, 243, 0.5);
        transform: scale(1.2);
      }

      .tip-dot.completed {
        background: rgba(33, 150, 243, 0.5);
      }

      @media (max-width: 768px) {
        .analysis-tips-container {
          padding: 0.8rem 1rem;
        }
        
        .analysis-tip {
          font-size: 0.95rem;
        }
        
        .tip-dot {
          width: 6px;
          height: 6px;
        }
      }

      @media (max-width: 430px) {
        .analysis-tips-container {
          padding: 0.6rem 0.8rem;
        }
        
        .analysis-tip {
          font-size: 0.9rem;
        }
      }

      /* Video controls wrapper - matches video wrapper width exactly */
      .video-controls-wrapper {
        width: 100%;
        max-width: 100%;
        margin: 0.5rem auto 0.3rem auto; /* Reduced top margin and added bottom margin for tighter spacing */
        padding: 0;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem; /* Match analysis-specs-container gap */
      }

      .frame-navigation-buttons {
        display: flex;
        justify-content: center;
        gap: 0.3rem;
        margin-top: 0; /* Gap handled by parent */
        flex-wrap: wrap;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
        overflow-x: visible;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
      }

      .frame-nav-btn {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1));
        border: 1px solid rgba(33, 150, 243, 0.4);
        color: #ffffff;
        padding: 0.4rem;
        border-radius: 8px;
        font-size: 0.85rem;
        font-weight: 600;
        font-family: 'Nunito Sans', sans-serif;
        cursor: pointer;
        transition: all 0.2s ease;
        min-width: 36px;
        height: 36px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(33, 150, 243, 0.2);
      }

      .frame-nav-btn:hover {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.4), rgba(33, 150, 243, 0.2));
        border-color: rgba(33, 150, 243, 0.6);
        color: #2196F3;
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(33, 150, 243, 0.3);
      }

      .frame-nav-btn:active {
        transform: translateY(0);
        background: rgba(255, 255, 255, 0.05);
      }

      .change-video-btn {
          background: linear-gradient(135deg, #0d47a1 0%, #1565c0 30%, #1976d2 70%, #1e88e5 100%);
          color: #ffffff;
          border: 1px solid rgba(25, 118, 210, 0.3);
          padding: 1.2rem 2rem;
          font-size: 1.1rem;
          font-weight: 600;
          cursor: pointer;
          transition: all 0.3s ease;
          font-family: "Nunito Sans", sans-serif;
          border-radius: 50px;
          margin: 2rem auto 0 auto;
          display: flex;
          align-items: center;
          gap: 0.5rem;
          box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
      }

      .change-video-btn:hover {
          background: linear-gradient(135deg, #1565c0 0%, #1976d2 35%, #1e88e5 75%, #2196f3 100%);
          border-color: rgba(25, 118, 210, 0.5);
          transform: translateY(-2px);
          box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
      }

      .analysis-results {
        display: none;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
        box-sizing: border-box;
        padding: 0 1.5rem;
        overflow-x: hidden;
      }

      .exercise-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
        text-transform: capitalize;
        background: -webkit-linear-gradient(#fff, #aaa);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        font-weight: 800;
      }

      .visibility-notice {
        background: rgba(255, 193, 7, 0.15);
        border: 1px solid rgba(255, 193, 7, 0.4);
        border-radius: 12px;
        padding: 1rem 1.5rem;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
        font-size: 1.1rem;
        color: rgba(255, 220, 150, 0.95);
        text-align: center;
        line-height: 1.4;
      }

      .visibility-notice::before {
        content: '⚠️ ';
      }
      
      .rep-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        margin-top: 1rem;
        font-size: 0.9rem;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 12px;
        overflow: hidden;
      }
      
      .rep-table th, .rep-table td {
        text-align: left;
        padding: 0.8rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 0.9rem;
      }
      
      .rep-table th {
        background: rgba(255,255,255,0.05);
        color: rgba(255,255,255,0.8);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
      }
      
      #repSummary {
        font-size: 1.2rem;
        color: rgba(255,255,255,0.8) !important; /* Brighter color */
        margin-top: 0.5rem;
        font-weight: 600;
      }

      .rep-table tr:last-child td {
        border-bottom: none;
      }
      
      .rep-watch-btn {
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 6px;
        padding: 0.2rem 0.6rem;
        font-family: 'Nunito Sans', sans-serif;
        font-size: 0.7em;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.7);
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
      }
      
      .rep-watch-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.3);
        color: rgba(255, 255, 255, 1);
        transform: translateY(-1px);
      }
      
      .rep-watch-btn:active {
        transform: translateY(0);
      }

      .error-message {
        color: #ff6b6b;
        background: linear-gradient(90deg, rgba(231, 76, 60, 0.15) 0%, rgba(231, 76, 60, 0.08) 100%);
        border: 1px solid rgba(231, 76, 60, 0.4);
        border-left: 3px solid #e74c3c;
        padding: 1rem;
        border-radius: 12px;
        margin: 1rem auto 1.5rem auto;
        display: none;
        font-size: 0.9rem;
        text-align: left;
        line-height: 1.5;
        max-width: 600px;
        box-shadow: 0 4px 20px rgba(231, 76, 60, 0.15);
        animation: errorShake 0.5s ease-in-out;
      }

      .error-message::before {
        content: "⚠️";
        display: block;
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
      }

      @keyframes errorShake {
        0%, 100% { transform: translateX(0); }
        10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
        20%, 40%, 60%, 80% { transform: translateX(5px); }
      }

      @media (max-width: 768px) {
        .error-message {
          font-size: 0.85rem;
          padding: 0.8rem;
          margin: 0.8rem 1rem 1rem 1rem;
          max-width: calc(100% - 2rem);
        }

        .error-message::before {
          font-size: 1.2rem;
        }
      }

      @media (max-width: 430px) {
        .error-message {
          font-size: 0.8rem;
          padding: 0.7rem;
        }

        .error-message::before {
          font-size: 1.1rem;
          margin-bottom: 0.4rem;
        }
      }

      /* Usage notification styling */
      .usage-notification {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        background: rgba(255, 255, 255, 0.05);
        color: #ffffff;
        padding: 0.8rem 1.5rem;
        border-radius: 50px;
        font-family: 'Nunito Sans', sans-serif;
        width: fit-content;
        box-shadow: none;
        border: 1px solid rgba(255, 255, 255, 0.1);
        opacity: 1;
        visibility: visible;
        transition: opacity 0.3s ease;
        z-index: 10;
        cursor: default;
        margin: 0.25rem auto 1.5rem auto;
        max-width: 90%;
        display: flex;
        justify-content: center;
      }

      /* Add proper top spacing when headline is hidden (desktop) */
      @media (min-width: 769px) {
        .usage-notification {
          margin-top: 2rem;
        }
      }

      .usage-notification-icon {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(33, 150, 243, 0.15);
        border: 1px solid rgba(33, 150, 243, 0.4);
        color: #2196F3;
        flex-shrink: 0;
      }
      
      .usage-notification-icon svg {
        width: 14px;
        height: 14px;
      }

      .usage-notification-content {
        font-size: 1.1rem;
        line-height: 1.4;
        color: rgba(255, 255, 255, 0.95);
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 0.6rem;
      }


      /* Mobile responsiveness for usage notification */
      @media (max-width: 768px) {
        .usage-notification {
          padding: 0.6rem 1.2rem;
          margin-bottom: 1.5rem;
          margin-top: 0.5rem; /* Add some spacing from headline */
        }

        .usage-notification-content {
          font-size: 1.1rem;
        }

        .usage-notification-icon {
          width: 22px;
          height: 22px;
        }
        
        .usage-notification-icon svg {
          width: 12px;
          height: 12px;
        }
      }

      @media (max-width: 480px) {
        .usage-notification {
          padding: 0.4rem 0.8rem;
        }

        .usage-notification-content {
          font-size: 1rem;
          gap: 0.5rem;
        }
        
        .usage-notification-icon {
          width: 20px;
          height: 20px;
        }
      }
      .usage-notification-icon.limit-reached {
        background: rgba(231, 76, 60, 0.15);
        border-color: rgba(231, 76, 60, 0.4);
        color: #e74c3c;
      }

      /* ============================================
         GUIDED PLAYBACK - SLOW MOTION STYLES
         ============================================ */
      
      /* Toggle container - styled to match frame-nav-btn */
      .guided-playback-toggle {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
        margin: 0 0 1rem 0; /* Add bottom margin for spacing before visibility notice */
        padding: 0.75rem 1rem;
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1));
        border: 1px solid rgba(33, 150, 243, 0.4);
        border-radius: 10px;
        width: 100%;
        max-width: 100%;
        flex-wrap: wrap;
        box-shadow: 0 4px 10px rgba(33, 150, 243, 0.2);
        transition: all 0.2s ease;
        box-sizing: border-box;
        min-height: 48px;
      }
      
      .guided-playback-toggle:hover {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.25), rgba(33, 150, 243, 0.15));
        box-shadow: 0 6px 15px rgba(33, 150, 243, 0.25);
      }
      
      .toggle-label {
        font-size: 0.85rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.95);
        font-family: 'Nunito Sans', sans-serif;
        white-space: normal;
        margin: 0;
        line-height: 1.2;
        display: flex;
        align-items: center;
        flex: 1;
        min-width: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
      }
      
      .toggle-hint {
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.6);
        margin-left: 0.2rem;
        font-family: 'Nunito Sans', sans-serif;
        white-space: normal;
        line-height: 1.2;
        display: flex;
        align-items: center;
        flex: 1;
        min-width: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
      }
      
      /* Toggle switch - smaller for compact layout */
      .toggle-switch {
        position: relative;
        display: inline-flex;
        align-items: center;
        width: 48px;
        height: 26px;
        flex-shrink: 0;
        margin: 0;
      }
      
      .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
      }
      
      .toggle-slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 26px;
        transition: all 0.3s ease;
        border: 1px solid rgba(255, 255, 255, 0.3);
      }
      
      .toggle-slider::before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 2px;
        bottom: 2px;
        background: white;
        border-radius: 50%;
        transition: all 0.3s ease;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
      }
      
      .toggle-switch input:checked + .toggle-slider {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.8), rgba(33, 150, 243, 0.6));
        border-color: rgba(33, 150, 243, 0.8);
      }
      
      .toggle-switch input:checked + .toggle-slider::before {
        transform: translateX(22px);
        background: #fff;
        box-shadow: 0 2px 8px rgba(33, 150, 243, 0.4);
      }
      
      /* Visualization Loading Overlay */
      .visualization-loader {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
        z-index: 15;
        border-radius: 20px;
      }

      .visualization-loader-content {
        text-align: center;
        color: rgba(255, 255, 255, 0.9);
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 600;
      }

      .visualization-loader-content p {
        margin: 0.5rem 0 0 0;
        font-size: 0.9rem;
      }

      /* Slow-motion indicator overlay */
      /* Slow-mo indicator - emoji only, compact */
      .slow-mo-indicator {
        position: absolute;
        top: 12px;
        left: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.4rem;
        background: rgba(0, 0, 0, 0.75);
        border-radius: 50%;
        z-index: 10;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        pointer-events: none;
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
        width: auto;
        height: auto;
      }
      
      .slow-mo-indicator.visible {
        opacity: 1;
        transform: translateY(0);
      }
      
      .slow-mo-icon {
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
        height: auto;
        border-radius: 0;
        background: transparent;
        line-height: 1;
      }
      
      .slow-mo-indicator.positive .slow-mo-icon,
      .slow-mo-indicator.improvement .slow-mo-icon {
        background: transparent;
      }
      
      /* Hide the label - we only show the emoji now */
      .slow-mo-label {
        display: none;
      }
      
      .slow-mo-indicator.positive {
        border-color: rgba(46, 204, 113, 0.4);
      }
      
      .slow-mo-indicator.improvement {
        border-color: rgba(241, 196, 15, 0.4);
      }
      
      /* Pulse animation when in slow-mo */
      .slow-mo-indicator.visible::after {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        border-radius: 50%;
        border: 2px solid currentColor;
        opacity: 0;
        animation: slow-mo-pulse 1.5s ease-out infinite;
      }
      
      .slow-mo-indicator.positive.visible::after {
        border-color: rgba(46, 204, 113, 0.6);
      }
      
      .slow-mo-indicator.improvement.visible::after {
        border-color: rgba(241, 196, 15, 0.6);
      }
      
      @keyframes slow-mo-pulse {
        0% {
          transform: scale(1);
          opacity: 0.6;
        }
        100% {
          transform: scale(1.15);
          opacity: 0;
        }
      }
      
      /* Visualization loader mobile styles */
      @media (max-width: 768px) {
        .visualization-loader-content p {
          font-size: 0.85rem;
        }
      }

      /* Mobile responsiveness for guided playback */
      @media (max-width: 768px) {
        .guided-playback-toggle {
          padding: 0.8rem 1rem;
          gap: 0.7rem;
          margin-top: 0; /* Gap handled by parent */
          min-height: 48px;
        }

        .toggle-label {
          font-size: 0.9rem;
        }

        .toggle-hint {
          font-size: 0.8rem;
          display: inline; /* Show on mobile */
        }
        
        .toggle-switch {
          width: 44px;
          height: 24px;
        }
        
        .toggle-slider::before {
          height: 18px;
          width: 18px;
          left: 2px;
          bottom: 2px;
        }
        
        .toggle-switch input:checked + .toggle-slider::before {
          transform: translateX(20px);
        }
        
        .slow-mo-indicator {
          top: 8px;
          left: 8px;
          padding: 0.35rem;
        }
        
        .slow-mo-icon {
          font-size: 1.1rem;
        }
      }
      
      @media (max-width: 430px) {
        .guided-playback-toggle {
          padding: 0.6rem 0.8rem;
          gap: 0.5rem;
          min-height: 42px;
        }
        
        .toggle-label {
          font-size: 0.75rem;
        }
        
        .toggle-switch {
          width: 40px;
          height: 22px;
        }
        
        .toggle-slider::before {
          height: 18px;
          width: 18px;
          left: 2px;
          bottom: 2px;
        }
        
        .toggle-switch input:checked + .toggle-slider::before {
          transform: translateX(20px);
        }
        
        .slow-mo-icon {
          font-size: 1rem;
        }
      }

      .price-text-responsive {
        font-size: 1rem;
      }
      @media (max-width: 768px) {
        .price-text-responsive { font-size: 0.95rem; }
        .upgrade-btn-responsive { font-size: 0.9rem !important; padding: 0.8rem 1.5rem !important; }
      }
      @media (max-width: 430px) {
        .price-text-responsive { font-size: 0.85rem; }
        .upgrade-btn-responsive { font-size: 0.85rem !important; padding: 0.7rem 1.2rem !important; }
      }

      /* ============================================
         ANALYSIS SPECIFICATION INPUTS (Smart Preview Phase)
         ============================================ */
      
      .analysis-specs-container {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        margin: 0.5rem auto 0 auto; /* Reduced from 1.5rem to bring closer to video */
        width: 100%;
        max-width: 500px;
        padding: 0 1rem;
        box-sizing: border-box;
      }
      
      /* Match guided-playback-toggle styling exactly */
      .analysis-spec-field {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1.2rem;
        padding: 1.2rem 2rem;
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1));
        border: 1px solid rgba(33, 150, 243, 0.4);
        border-radius: 16px;
        box-shadow: 0 4px 10px rgba(33, 150, 243, 0.2);
        transition: all 0.2s ease;
        cursor: pointer;
      }
      
      .analysis-spec-field:hover {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.25), rgba(33, 150, 243, 0.15));
        box-shadow: 0 6px 15px rgba(33, 150, 243, 0.25);
        transform: translateY(-1px);
      }
      
      /* Match .toggle-label styling */
      .spec-label {
        font-size: 1.1rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.95);
        font-family: 'Nunito Sans', sans-serif;
        white-space: nowrap;
        flex-shrink: 0;
      }
      
      .spec-value-container {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        flex: 1;
        justify-content: flex-end;
      }
      
      .spec-value {
        color: #ffffff;
        font-size: 1.1rem; /* Match spec-label font size exactly */
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 600;
        text-align: right;
        flex: 1;
        line-height: 1.2;
      }
      
      /* Gray placeholder text for default values */
      .spec-value.placeholder {
        color: rgba(255, 255, 255, 0.5);
        font-weight: 400;
        font-size: 1.1rem; /* Same size as label */
      }
      
      .spec-edit-indicator {
        font-size: 0.88rem; /* 20% smaller than 1.1rem */
        opacity: 0.7;
        transition: opacity 0.2s ease;
        line-height: 1.2;
        display: flex;
        align-items: center;
      }
      
      .analysis-spec-field:hover .spec-edit-indicator {
        opacity: 1;
      }
      
      .spec-input {
        display: none; /* Hidden input for form submission */
      }
      
      /* Modal Styles */
      /* ============================================
         Movement Modal - Techie Blue Design
         ============================================ */
      
      .spec-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10000;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding: 0;
      }

      .spec-modal-backdrop {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(8px);
      }

      .spec-modal-content {
        position: relative;
        background: linear-gradient(180deg, rgba(5, 16, 30, 0.98) 0%, rgba(0, 0, 0, 0.98) 100%);
        border: 1px solid rgba(33, 150, 243, 0.3);
        border-bottom: none;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 40px rgba(33, 150, 243, 0.15), 0 0 0 1px rgba(33, 150, 243, 0.1) inset;
        width: 100%;
        max-width: 500px;
        max-height: 60vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        animation: slideUp 0.25s ease-out;
      }

      @keyframes slideUp {
        from {
          transform: translateY(100%);
          opacity: 0;
        }
        to {
          transform: translateY(0);
          opacity: 1;
        }
      }

      .spec-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid rgba(33, 150, 243, 0.2);
      }

      .spec-modal-title {
        font-size: 0.9rem;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.7);
        font-family: 'Nunito Sans', sans-serif;
        text-transform: uppercase;
        letter-spacing: 0.5px;
      }

      .spec-modal-close {
        background: rgba(33, 150, 243, 0.1);
        border: 1px solid rgba(33, 150, 243, 0.3);
        color: rgba(255, 255, 255, 0.7);
        font-size: 1.25rem;
        line-height: 1;
        cursor: pointer;
        padding: 0;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        transition: all 0.2s ease;
      }

      .spec-modal-close:hover {
        background: rgba(33, 150, 243, 0.2);
        border-color: rgba(33, 150, 243, 0.5);
        color: #ffffff;
      }

      .spec-modal-body {
        padding: 1rem 1.25rem;
        overflow-y: auto;
        flex: 1;
      }

      .movement-pills-container {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 0;
        max-height: none;
        overflow-y: visible;
        overflow-x: hidden;
      }

      /* Custom scrollbar for pills container */
      .movement-pills-container::-webkit-scrollbar {
        width: 4px;
      }

      .movement-pills-container::-webkit-scrollbar-track {
        background: rgba(33, 150, 243, 0.1);
        border-radius: 2px;
      }

      .movement-pills-container::-webkit-scrollbar-thumb {
        background: rgba(33, 150, 243, 0.3);
        border-radius: 2px;
      }

      .movement-pills-container::-webkit-scrollbar-thumb:hover {
        background: rgba(33, 150, 243, 0.5);
      }

      .movement-pill {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.15), rgba(33, 150, 243, 0.08));
        border: 1px solid rgba(33, 150, 243, 0.3);
        color: rgba(255, 255, 255, 0.9);
        padding: 0.6rem 0.9rem;
        min-height: 48px; /* Match badge height */
        border-radius: 8px;
        font-size: 0.8rem;
        font-weight: 600;
        font-family: 'Nunito Sans', sans-serif;
        cursor: pointer;
        transition: all 0.15s ease;
        box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
        text-align: left;
      }

      .movement-pill:hover {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.25), rgba(33, 150, 243, 0.15));
        border-color: rgba(33, 150, 243, 0.5);
        box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
        transform: translateY(-1px);
      }

      .movement-pill.selected {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.4), rgba(33, 150, 243, 0.25));
        border-color: rgba(33, 150, 243, 0.7);
        box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3), 0 0 0 2px rgba(33, 150, 243, 0.2) inset;
        color: #ffffff;
      }
      
      /* Movement pill wrapper - holds pill and badge side by side */
      .movement-pill-wrapper {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        width: auto; /* Don't take full width - let it be natural */
      }
      
      .movement-pill-badge {
        font-size: 0.65rem;
        font-weight: 500;
        padding: 0.2rem 0.5rem;
        border-radius: 4px;
        line-height: 1.2;
        white-space: nowrap;
        display: flex;
        align-items: center;
        height: 48px; /* Match movement-pill min-height */
        box-sizing: border-box;
      }
      
      .badge-auto-detect {
        background: rgba(158, 158, 158, 0.15);
        color: rgba(255, 255, 255, 0.7);
        border: 1px solid rgba(158, 158, 158, 0.3);
      }
      
      /* Custom movement row - inline layout */
      .custom-movement-row {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
      }
      
      .custom-movement-row .movement-pill {
        flex-shrink: 0;
      }
      
      .custom-movement-row .spec-modal-input {
        flex: 1;
        margin-top: 0;
        min-width: 0;
      }
      
      /* Modal spinner */
      .modal-spinner {
        display: flex;
        justify-content: center;
        padding: 1rem;
        width: 100%;
      }
      
      .spinner-icon {
        width: 24px;
        height: 24px;
        border: 2px solid rgba(33, 150, 243, 0.2);
        border-top-color: rgba(33, 150, 243, 0.8);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
      }
      
      @keyframes spin {
        to { transform: rotate(360deg); }
      }
      
      /* Empty state message */
      .modal-empty-state {
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.8rem;
        font-family: 'Nunito Sans', sans-serif;
        text-align: center;
        padding: 0.75rem;
        width: 100%;
      }

      /* Popular movements collapsible sections */
      .popular-section {
        width: 100%;
        margin-top: 0.5rem;
      }
      
      .popular-section-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0.6rem 0.8rem;
        background: rgba(33, 150, 243, 0.08);
        border: 1px solid rgba(33, 150, 243, 0.2);
        border-radius: 8px;
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.8rem;
        font-weight: 600;
        font-family: 'Nunito Sans', sans-serif;
        cursor: pointer;
        transition: all 0.2s ease;
      }
      
      .popular-section-header:hover {
        background: rgba(33, 150, 243, 0.15);
        border-color: rgba(33, 150, 243, 0.3);
      }
      
      .popular-section-title {
        display: flex;
        align-items: center;
        gap: 0.4rem;
      }
      
      .popular-section-toggle {
        font-size: 1rem;
        font-weight: 700;
        color: rgba(33, 150, 243, 0.7);
        width: 20px;
        text-align: center;
      }
      
      .popular-section-content {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        padding: 0.6rem 0.4rem;
        animation: slideDown 0.2s ease-out;
      }
      
      @keyframes slideDown {
        from {
          opacity: 0;
          transform: translateY(-10px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }
      
      .popular-section-content .movement-pill {
        font-size: 0.75rem;
        padding: 0.4rem 0.7rem;
        min-height: 36px;
      }

      .spec-modal-divider {
        display: flex;
        align-items: center;
        text-align: center;
        width: 100%;
        margin: 0.6rem 0;
        color: rgba(33, 150, 243, 0.5);
        font-size: 0.7rem;
        font-family: 'Nunito Sans', sans-serif;
        text-transform: uppercase;
        letter-spacing: 1px;
      }

      .spec-modal-divider::before,
      .spec-modal-divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid rgba(33, 150, 243, 0.2);
      }

      .spec-modal-divider span {
        padding: 0 0.75rem;
      }

      .spec-modal-input {
        width: 100%;
        background: rgba(33, 150, 243, 0.08);
        border: 1px solid rgba(33, 150, 243, 0.3);
        border-radius: 10px;
        padding: 0.75rem 1rem;
        color: #ffffff;
        font-size: 0.9rem;
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 600;
        outline: none;
        transition: all 0.2s ease;
        box-sizing: border-box;
        margin-top: 0.75rem;
      }

      .spec-modal-input:focus {
        border-color: rgba(33, 150, 243, 0.6);
        background: rgba(33, 150, 243, 0.12);
        box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
      }

      .spec-modal-input::placeholder {
        color: rgba(255, 255, 255, 0.4);
        font-weight: 500;
      }

      .spec-modal-footer {
        display: flex;
        gap: 0.75rem;
        padding: 1rem 1.25rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(33, 150, 243, 0.2);
      }

      .spec-modal-btn {
        flex: 1;
        padding: 0.75rem 1.25rem;
        border-radius: 10px;
        font-size: 0.85rem;
        font-weight: 700;
        font-family: 'Nunito Sans', sans-serif;
        cursor: pointer;
        transition: all 0.2s ease;
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1));
        border: 1px solid rgba(33, 150, 243, 0.4);
        color: rgba(255, 255, 255, 0.95);
        box-shadow: 0 4px 10px rgba(33, 150, 243, 0.15);
      }

      .spec-modal-btn:hover {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.3), rgba(33, 150, 243, 0.2));
        border-color: rgba(33, 150, 243, 0.6);
        box-shadow: 0 6px 15px rgba(33, 150, 243, 0.25);
        transform: translateY(-1px);
      }

      /* Mobile responsiveness for modals */
      @media (max-width: 768px) {
        .spec-modal-content {
          max-width: 100%;
          border-radius: 16px 16px 0 0;
          max-height: 90vh;
        }

        .spec-modal-body {
          padding: 1.5rem 1.25rem;
        }
      }

        .spec-modal-header {
          padding: 0.9rem 1rem;
        }

        .spec-modal-title {
          font-size: 0.85rem;
        }

        .spec-modal-body {
          padding: 0.9rem 1rem;
        }

        .movement-pill {
          font-size: 0.75rem;
          padding: 0.5rem 0.8rem;
          min-height: 44px; /* Match mobile badge height */
        }
        
        .movement-pill-wrapper {
          flex-wrap: wrap;
          gap: 0.4rem;
        }
        
        .movement-pill-badge {
          font-size: 0.6rem;
          padding: 0.15rem 0.4rem;
          height: 44px; /* Match mobile movement-pill min-height */
        }

        .spec-modal-footer {
          padding: 0.9rem 1rem;
          padding-bottom: calc(0.9rem + env(safe-area-inset-bottom));
        }

        .spec-modal-btn {
          padding: 0.7rem 1rem;
          font-size: 0.8rem;
        }
      
      /* Upload Progress Container - now inside video overlay */
      .countdown-container {
        display: flex;
        align-items: center;
        gap: 1rem;
        pointer-events: auto; /* Re-enable pointer events for the container */
      }
      
      /* Center container when showing only "Analyzing..." text (no progress bar) */
      .countdown-container.analyzing-mode {
        justify-content: center;
        gap: 0;
      }
      
      .countdown-bar {
        flex: 1;
        height: 6px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
        overflow: hidden;
      }
      
      .countdown-progress {
        height: 100%;
        width: 0%;
        background: linear-gradient(90deg, #2196F3, #64B5F6);
        border-radius: 3px;
        transition: width 0.1s linear;
        transform-origin: left;
      }
      
      .countdown-progress.paused {
        background: rgba(255, 255, 255, 0.3);
      }
      
      .countdown-text {
        font-size: 1rem;
        color: #ffffff;
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 600;
        white-space: nowrap;
        min-width: 100px;
        text-align: right;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
      }
      
      /* Center align when showing "Analyzing..." (progress bar is hidden) */
      .countdown-text.analyzing-text {
        text-align: center;
        min-width: auto;
        width: 100%;
      }
      
      .countdown-text.paused {
        color: rgba(255, 255, 255, 0.7);
      }
      
      /* Analyze Now Button */
      .analyze-now-btn {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.3), rgba(33, 150, 243, 0.15));
        border: 2px solid rgba(33, 150, 243, 0.6);
        color: #ffffff;
        padding: 0.6rem 1.2rem; /* Reduced padding */
        border-radius: 50px;
        font-size: 1rem;
        font-weight: 700;
        font-family: 'Nunito Sans', sans-serif;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
        margin-top: 0.5rem;
        width: auto; /* Changed from 100% to auto for wrapped width */
        display: inline-flex; /* Changed from flex to inline-flex */
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        align-self: center; /* Center the button */
      }
      
      .analyze-now-btn:hover {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.5), rgba(33, 150, 243, 0.25));
        border-color: rgba(33, 150, 243, 0.9);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
      }
      
      .analyze-now-btn:active {
        transform: translateY(0);
      }
      
      /* Mobile responsiveness for analysis specs */
      @media (max-width: 768px) {
        .analysis-specs-container {
          max-width: 100%;
          padding: 0 1rem;
          gap: 0.6rem;
        }
        
        .video-controls-wrapper {
          max-width: 100%;
          padding: 0;
          gap: 0.6rem; /* Match analysis-specs-container gap */
        }
        
        .analysis-spec-field {
          padding: 1.2rem 1.8rem;
          border-radius: 16px;
          gap: 1.2rem;
        }

        .spec-label {
          font-size: 1.1rem; /* Match spec-input font size */
        }

        .spec-value {
          font-size: 1.1rem; /* Match spec-label on mobile */
        }

        .spec-value.placeholder {
          font-size: 1.1rem; /* Match spec-label on mobile */
        }

        .spec-edit-indicator {
          font-size: 1.1rem; /* Match spec-label on mobile */
        }

        .spec-input {
          font-size: 1.1rem;
        }
        
        .video-progress-overlay {
          padding: 1.2rem 1rem 0.8rem 1rem;
        }
        
        .countdown-text {
          font-size: 1rem;
          min-width: 90px;
        }
        
        .countdown-bar {
          height: 5px;
        }
        
        .stopwatch-note,
        .status-message {
          font-size: 1.1rem; /* Match countdown-text on mobile */
        }
        
        .analyze-now-btn {
          font-size: 1rem;
          padding: 0.7rem 1.2rem; /* Reduced padding on mobile */
        }
      }
      
      @media (max-width: 430px) {
        .video-progress-overlay {
          padding: 1rem 0.8rem 0.6rem 0.8rem;
        }
        
        .countdown-container {
          gap: 0.8rem;
        }
        
        .countdown-text {
          font-size: 0.95rem;
          min-width: 75px;
        }

        .stopwatch-note,
        .status-message {
          font-size: 1rem;
        }

        .feedback-section {
          padding: 1.25rem;
        }

        .feedback-header {
          font-size: 1.2rem;
        }

        .feedback-item {
          padding: 1.1rem;
          font-size: 0.95rem;
        }

        .exercise-title {
          font-size: 1.6rem;
        }

        .visibility-notice {
          font-size: 1.1rem;
          padding: 0.8rem 1.1rem;
        }

        #repSummary {
          font-size: 1rem;
        }

        .change-video-btn {
          padding: 0.9rem 1.5rem;
          font-size: 0.95rem;
        }
        
        .analysis-spec-field {
          padding: 0.8rem 1.2rem;
          border-radius: 12px;
          gap: 0.8rem;
        }
        
        .spec-label {
          font-size: 0.95rem; /* Match spec-input font size */
        }
        
        .spec-input {
          font-size: 0.95rem;
        }
        
        .countdown-text {
          font-size: 0.95rem; /* Match spec-input font size for alignment */
          min-width: 65px;
        }
        
        .stopwatch-note,
        .status-message {
          font-size: 0.95rem; /* Match countdown-text on small mobile */
        }
        
        .analyze-now-btn {
          font-size: 0.9rem;
          padding: 0.6rem 0.9rem; /* Reduced padding on small mobile */
        }
      }

      /* ============================================
         LLM-Style Prompt Bar Styles
         ============================================ */
      
      .prompt-bar {
        position: relative;
        margin: 0.3rem auto 1.5rem auto; /* Center with auto margins */
        background: linear-gradient(180deg, #000000 0%, #05101e 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 1.2rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
        width: calc(100% - 2rem); /* More margins - 1rem margin on each side */
        max-width: 100%;
        box-sizing: border-box;
      }
      
      .prompt-bar.disabled {
        opacity: 0.6;
        pointer-events: none;
      }
      
      .prompt-bar.disabled .prompt-textarea,
      .prompt-bar.disabled .prompt-pill,
      .prompt-bar.disabled .prompt-analyze-btn {
        opacity: 0.5;
        cursor: not-allowed;
      }
      
      .prompt-bar-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
      }
      
      .prompt-input-row {
        display: flex;
        align-items: flex-end;
        gap: 0.75rem;
        width: 100%;
      }
      
      .prompt-textarea {
        flex: 1;
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 0;
        padding: 0.5rem 0;
        color: #ffffff;
        font-size: 1rem;
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 700;
        resize: none;
        outline: none;
        transition: all 0.2s ease;
        min-height: 36px;
        max-height: 120px;
        box-sizing: border-box;
      }
      
      .prompt-textarea:focus {
        border-bottom-color: rgba(33, 150, 243, 0.8);
        border-bottom-width: 2px;
      }
      
      .prompt-textarea:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        border-bottom-color: rgba(255, 255, 255, 0.1);
      }
      
      .prompt-textarea::placeholder {
        color: rgba(255, 255, 255, 0.4);
      }
      
      .prompt-pill {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1));
        border: 1px solid rgba(33, 150, 243, 0.4);
        border-radius: 10px;
        padding: 0.75rem 1rem;
        color: #ffffff;
        font-size: 0.85rem;
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
        box-shadow: 0 4px 10px rgba(33, 150, 243, 0.2);
        box-sizing: border-box;
        min-height: 48px;
        width: fit-content;
        flex-shrink: 0;
      }
      
      /* Pulse animation to draw attention when video is uploaded */
      .prompt-pill.attention-pulse {
        animation: attentionPulse 2s ease-in-out 3;
      }
      
      @keyframes attentionPulse {
        0%, 100% {
          box-shadow: 0 4px 10px rgba(33, 150, 243, 0.2);
          transform: scale(1);
        }
        50% {
          box-shadow: 0 6px 20px rgba(33, 150, 243, 0.5), 0 0 0 4px rgba(33, 150, 243, 0.1);
          transform: scale(1.02);
        }
      }
      
      .prompt-pill:hover:not(:disabled) {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.25), rgba(33, 150, 243, 0.15));
        box-shadow: 0 6px 15px rgba(33, 150, 243, 0.25);
        transform: translateY(-1px);
      }
      
      .prompt-pill.has-value {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.25), rgba(33, 150, 243, 0.15));
        border-color: rgba(33, 150, 243, 0.5);
      }
      
      .prompt-pill:disabled {
        opacity: 0.5;
        cursor: not-allowed;
      }
      
      .prompt-pill-text {
        color: rgba(255, 255, 255, 0.95);
        font-weight: 700;
      }
      
      .prompt-analyze-btn {
        width: 100%;
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1));
        border: 1px solid rgba(33, 150, 243, 0.4);
        border-radius: 10px;
        padding: 0.75rem 1rem;
        color: rgba(255, 255, 255, 0.95);
        font-size: 0.85rem;
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s ease;
        text-align: center;
        margin-top: 0.3rem;
        box-shadow: 0 4px 10px rgba(33, 150, 243, 0.2);
        box-sizing: border-box;
        min-height: 48px;
      }
      
      .prompt-analyze-btn:hover:not(:disabled) {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.25), rgba(33, 150, 243, 0.15));
        box-shadow: 0 6px 15px rgba(33, 150, 243, 0.25);
        transform: translateY(-1px);
      }
      
      .prompt-analyze-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
      }
      
      /* Upload progress indicator in prompt bar */
      .prompt-bar .upload-status {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.6);
        padding: 0 0.25rem;
      }
      
      .prompt-bar .upload-status .spinner {
        width: 14px;
        height: 14px;
        border: 2px solid rgba(255, 255, 255, 0.2);
        border-top-color: rgba(33, 150, 243, 0.8);
        border-radius: 50%;
        animation: spin 1s linear infinite;
      }
      
      @keyframes spin {
        to { transform: rotate(360deg); }
      }
      
      /* Mobile responsiveness for prompt bar */
      @media (max-width: 768px) {
        .prompt-bar {
          margin: 0.3rem auto 1rem auto; /* Center with auto margins */
          padding: 1rem;
          width: calc(100% - 1.6rem); /* More margins on mobile - 0.8rem margin on each side */
          max-width: 100%;
        }
        
        .prompt-input-row {
          flex-direction: row; /* Keep inline on mobile */
          align-items: flex-end;
          gap: 0.6rem;
        }
        
        .prompt-textarea {
          font-size: 0.95rem;
          padding: 0.6rem 0;
          flex: 1; /* Take available space */
        }
        
        .prompt-pill {
          padding: 0.75rem 1rem;
          font-size: 0.85rem;
          min-height: 48px;
          width: fit-content; /* Keep button size fit-content, not full width */
          flex-shrink: 0; /* Don't shrink */
          justify-content: flex-start; /* Keep left alignment */
        }
        
        .prompt-analyze-btn {
          padding: 0.75rem 1rem;
          font-size: 0.85rem;
          min-height: 48px;
        }
      }
      
      @media (max-width: 380px) {
        .prompt-bar {
          margin: 0.3rem auto 1rem auto; /* Center with auto margins */
          width: calc(100% - 1.2rem); /* More margins on small mobile - 0.6rem margin on each side */
          max-width: 100%;
        }
        
        .prompt-input-row {
          gap: 0.5rem;
          flex-direction: row; /* Keep inline on small mobile too */
          align-items: flex-end;
        }
        
        .prompt-textarea {
          flex: 1; /* Take available space */
        }
        
        .prompt-pill {
          width: fit-content; /* Keep button size fit-content */
          flex-shrink: 0; /* Don't shrink */
        }
        
        .prompt-controls {
          gap: 0.5rem;
        }
        
        .prompt-pill {
          padding: 0.7rem 0.9rem;
          font-size: 0.8rem;
          min-height: 44px;
        }

        .prompt-analyze-btn {
          padding: 0.7rem 0.9rem;
          font-size: 0.8rem;
          min-height: 44px;
        }
      }
      
      /* Add extra padding to preview container for prompt bar + navbar */
      /* Prompt bar is always visible now, so adjust spacing accordingly */
      .video-preview-container {
        padding-bottom: 0; /* No padding - prompt bar is directly below */
        margin-bottom: 0; /* Remove extra margin */
      }
      
      /* Reduce padding when analyzing (prompt bar is hidden) */
      .video-preview-container.analyzing {
        padding-bottom: 0; /* No padding when analyzing */
      }
      
      .barbell-loader-container {
        margin-bottom: 0.5rem; /* Reduced from 1.5rem since prompt bar takes space */
      }
      
      /* ============================================
         Toast Notification Styles
         ============================================ */
      
      .toast-container {
        position: fixed;
        top: 1rem;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10001; /* Above modals */
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        pointer-events: none;
        max-width: 90%;
        width: 400px;
      }
      
      .toast {
        background: rgba(30, 30, 30, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 1rem 1.25rem;
        color: #ffffff;
        font-family: 'Nunito Sans', sans-serif;
        font-size: 0.95rem;
        line-height: 1.4;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(10px);
        pointer-events: auto;
        animation: toastSlideIn 0.3s ease-out;
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
      }
      
      .toast.toast-error {
        border-color: rgba(244, 67, 54, 0.5);
        background: rgba(40, 20, 20, 0.95);
      }
      
      .toast.toast-success {
        border-color: rgba(76, 175, 80, 0.5);
        background: rgba(20, 40, 20, 0.95);
      }
      
      .toast.toast-warning {
        border-color: rgba(255, 193, 7, 0.5);
        background: rgba(40, 35, 15, 0.95);
      }
      
      .toast-icon {
        font-size: 1.2rem;
        flex-shrink: 0;
        margin-top: 0.1rem;
      }
      
      .toast-content {
        flex: 1;
      }
      
      .toast-close {
        background: none;
        border: none;
        color: rgba(255, 255, 255, 0.5);
        font-size: 1.2rem;
        cursor: pointer;
        padding: 0;
        line-height: 1;
        transition: color 0.2s ease;
        flex-shrink: 0;
      }
      
      .toast-close:hover {
        color: #ffffff;
      }
      
      .toast.toast-hiding {
        animation: toastSlideOut 0.3s ease-in forwards;
      }
      
      @keyframes toastSlideIn {
        from {
          opacity: 0;
          transform: translateY(-20px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }
      
      @keyframes toastSlideOut {
        from {
          opacity: 1;
          transform: translateY(0);
        }
        to {
          opacity: 0;
          transform: translateY(-20px);
        }
      }
      
      @media (max-width: 480px) {
        .toast-container {
          width: 95%;
          top: 0.5rem;
        }

        .toast {
          padding: 1rem 1.25rem;
          font-size: 1rem;
        }
      }
      
      @keyframes discount-pulse {
        0%, 100% {
          transform: rotate(-3deg) scale(1);
          box-shadow: 0 2px 8px rgba(223, 164, 0, 0.4);
        }
        50% {
          transform: rotate(-3deg) scale(1.05);
          box-shadow: 0 4px 12px rgba(223, 164, 0, 0.6);
        }
      }
      
      /* ============================================
         XP Notification & Display Styles
         ============================================ */
      
      /* XP Toast Notification */
      .xp-toast {
        background: linear-gradient(135deg, rgba(223, 164, 0, 0.4), rgba(255, 215, 0, 0.3));
        border: 2px solid rgba(255, 215, 0, 0.5);
        border-radius: 16px;
        padding: 1.25rem 1.5rem;
        margin-bottom: 0.75rem;
        color: #ffffff;
        font-family: 'Nunito Sans', sans-serif;
        box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3);
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        animation: xpToastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
      }
      
      .xp-toast.visible {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
      
      .xp-toast-milestone {
        background: linear-gradient(135deg, rgba(255, 152, 0, 0.45), rgba(255, 193, 7, 0.35));
        border-color: rgba(255, 193, 7, 0.7);
        box-shadow: 0 8px 32px rgba(255, 193, 7, 0.4);
        animation: xpMilestonePulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
      }
      
      .xp-toast-content {
        display: flex;
        align-items: center;
        gap: 1rem;
      }
      
      .xp-toast-icon {
        font-size: 2rem;
        line-height: 1;
        animation: xpIconBounce 1s ease-in-out infinite;
      }
      
      .xp-toast-text {
        flex: 1;
      }
      
      .xp-toast-main {
        font-size: 1.5rem;
        font-weight: 700;
        color: #ffd700;
        line-height: 1.2;
      }
      
      .xp-toast-streak {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.8);
        margin-top: 0.25rem;
        font-weight: 600;
      }
      
      @keyframes xpToastSlideIn {
        from {
          opacity: 0;
          transform: translateY(-20px) scale(0.95);
        }
        to {
          opacity: 1;
          transform: translateY(0) scale(1);
        }
      }
      
      @keyframes xpMilestonePulse {
        0% {
          opacity: 0;
          transform: translateY(-20px) scale(0.9);
        }
        50% {
          transform: translateY(0) scale(1.05);
        }
        100% {
          opacity: 1;
          transform: translateY(0) scale(1);
        }
      }
      
      @keyframes xpIconBounce {
        0%, 100% {
          transform: translateY(0);
        }
        50% {
          transform: translateY(-5px);
        }
      }
      
      /* XP Permanent Display */
      .xp-display {
        margin: 1.5rem auto 0;
        max-width: 500px;
      }
      
      .xp-display-card {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 215, 0, 0.2);
        border-radius: 16px;
        padding: 1.5rem;
        text-align: center;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
      }
      
      .xp-display-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
      }
      
      .xp-display-icon {
        font-size: 1.5rem;
      }
      
      .xp-display-label {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.7);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 600;
      }
      
      .xp-display-value {
        font-size: 2.5rem;
        font-weight: 800;
        color: #ffd700;
        line-height: 1;
        margin-bottom: 0.5rem;
      }
      
      .xp-display-breakdown {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.6);
        margin: 0.75rem 0;
        line-height: 1.5;
      }
      
      .xp-display-streak {
        font-size: 1rem;
        color: #ff9800;
        font-weight: 600;
        margin: 0.75rem 0;
      }
      
      .xp-display-total {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.8);
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        font-weight: 600;
      }
      
      @media (max-width: 768px) {
        .xp-toast {
          padding: 1rem 1.25rem;
        }
        
        .xp-toast-main {
          font-size: 1.25rem;
        }
        
        .xp-display-card {
          padding: 1.25rem;
        }
        
        .xp-display-value {
          font-size: 2rem;
        }
      }

      /* Share Context Modal */
      .share-context-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10002; /* Above toast container (10001) */
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
      }

      .share-context-modal-backdrop {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(8px);
      }

      .share-context-modal-content {
        position: relative;
        background: linear-gradient(180deg, rgba(5, 16, 30, 0.98) 0%, rgba(0, 0, 0, 0.98) 100%);
        border: 1px solid rgba(33, 150, 243, 0.3);
        border-radius: 20px;
        box-shadow: 0 8px 40px rgba(33, 150, 243, 0.15);
        padding: 2rem;
        max-width: 400px;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        animation: modalFadeIn 0.3s ease-out;
      }

      @keyframes modalFadeIn {
        from {
          transform: scale(0.95);
          opacity: 0;
        }
        to {
          transform: scale(1);
          opacity: 1;
        }
      }

      @keyframes modalFadeOut {
        from {
          transform: scale(1);
          opacity: 1;
        }
        to {
          transform: scale(0.95);
          opacity: 0;
        }
      }

      .share-context-avatar {
        margin-bottom: 1.5rem;
        position: relative;
      }

      .share-context-avatar img {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid rgba(33, 150, 243, 0.3);
      }

      .share-context-avatar-placeholder {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: rgba(33, 150, 243, 0.1);
        border: 2px solid rgba(33, 150, 243, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(255, 255, 255, 0.5);
      }

      .share-context-text {
        color: rgba(255, 255, 255, 0.9);
        font-family: 'Nunito Sans', sans-serif;
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 2rem;
      }

      .share-context-text strong {
        color: #ffffff;
        font-weight: 700;
      }

      .share-context-got-it-btn {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.1));
        color: #ffffff;
        border: 1px solid rgba(33, 150, 243, 0.4);
        padding: 0.75rem 2rem;
        border-radius: 12px;
        font-family: 'Nunito Sans', sans-serif;
        font-weight: 600;
        font-size: 1rem;
        cursor: pointer;
        transition: opacity 0.15s ease, transform 0.15s ease, background 0.3s ease;
        box-shadow: 0 4px 10px rgba(33, 150, 243, 0.2);
        position: relative;
      }

      .share-context-got-it-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
      }

      .share-context-got-it-btn:hover {
        background: linear-gradient(135deg, rgba(33, 150, 243, 0.3), rgba(33, 150, 243, 0.2));
        border-color: rgba(33, 150, 243, 0.6);
        box-shadow: 0 6px 15px rgba(33, 150, 243, 0.3);
        transform: translateY(-2px);
      }

      .share-context-got-it-btn:active {
        transform: translateY(0);
      }

      /* Share Link Loader */
      .share-link-loader {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10003; /* Above modal (10002) and toast container (10001) */
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(8px);
      }

      .share-link-loader-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: rgba(255, 255, 255, 0.9);
        font-family: 'Nunito Sans', sans-serif;
        width: 100%;
      }

      .share-link-loader-content .loading-spinner-small {
        margin: 0 auto;
      }

      .share-link-loader-content p {
        margin-top: 1rem;
        font-size: 1rem;
        font-weight: 600;
        margin-left: auto;
        margin-right: auto;
      }


