/* Component Styles */

/* Progress Stepper - Elegant Premium Design */
progress-stepper {
    display: block;
    margin-bottom: 24px;
}

.progress-stepper-container {
    background: linear-gradient(180deg, rgba(11, 11, 12, 0.95) 0%, rgba(11, 11, 12, 0.85) 100%);
    backdrop-filter: blur(20px);
    padding: 20px 16px;
    border-bottom: 1px solid rgba(245, 200, 106, 0.15);
    position: relative;
    z-index: 100;
    top: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 767px) {
    .progress-stepper-container {
        padding: 12px 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.progress-stepper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    position: relative;
    gap: 0;
    overflow: visible;
}

.step-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    min-width: 0;
}

.step-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

/* Clickable step styling */
.step-content.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px;
    border-radius: 8px;
}

.step-content.clickable:hover {
    background: rgba(245, 200, 106, 0.1);
    transform: translateY(-2px);
}

.step-content.clickable:hover .step-indicator {
    transform: scale(1.05);
}

.step-content.clickable:hover .step-label {
    color: #F5C86A;
}

.step-indicator {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 2px solid transparent;
}

.step-indicator.completed {
    background: var(--primary-gradient);
    color: #0B0B0C;
    box-shadow: 0 4px 16px rgba(245, 200, 106, 0.4), 0 0 0 4px rgba(245, 200, 106, 0.1);
    transform: scale(1);
}

.step-indicator.active {
    background: var(--primary-gradient);
    color: #0B0B0C;
    box-shadow: 0 6px 24px rgba(245, 200, 106, 0.5), 0 0 0 6px rgba(245, 200, 106, 0.15);
    transform: scale(1.1);
    animation: pulse-active 2s ease-in-out infinite;
}

.step-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-gradient);
    opacity: 0;
    animation: ripple 2s ease-out infinite;
}

@keyframes pulse-active {
    0%, 100% {
        box-shadow: 0 6px 24px rgba(245, 200, 106, 0.5), 0 0 0 6px rgba(245, 200, 106, 0.15);
    }
    50% {
        box-shadow: 0 8px 32px rgba(245, 200, 106, 0.6), 0 0 0 8px rgba(245, 200, 106, 0.2);
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.step-indicator.pending {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.step-checkmark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.step-checkmark svg {
    width: 20px;
    height: 20px;
    stroke: #0B0B0C;
}

.step-number {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    transition: all 0.3s ease;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.step-label.active {
    color: var(--gold-primary);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(245, 200, 106, 0.3);
}

.step-label.completed {
    color: var(--text-secondary);
}

.step-connector {
    position: absolute;
    top: 22px;
    left: calc(50% + 22px);
    right: calc(-50% + 22px);
    height: 2px;
    z-index: 1;
    min-width: 20px;
    pointer-events: none;
}

.connector-line {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.step-connector.completed .connector-line {
    background: linear-gradient(90deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    box-shadow: 0 0 8px rgba(245, 200, 106, 0.4);
}

.step-connector.completed .connector-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@media (min-width: 768px) {
    .progress-stepper-container {
        padding: 24px 20px;
    }
    
    .step-indicator {
        width: 52px;
        height: 52px;
        font-size: 18px;
    }
    
    .step-label {
        font-size: 12px;
    }
    
    .step-connector {
        top: 26px;
        left: calc(50% + 26px);
        right: calc(-50% + 26px);
    }
}

@media (max-width: 767px) {
    .progress-stepper-container {
        padding: 16px 8px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .progress-stepper {
        gap: 0;
        padding: 0 4px;
        justify-content: space-between;
        width: 100%;
    }
    
    .step-wrapper {
        min-width: 0;
        flex: 1 1 0;
        position: relative;
    }
    
    .step-indicator {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .step-label {
        font-size: 8px;
        max-width: 45px;
        white-space: normal;
        line-height: 1.1;
        word-break: break-word;
        hyphens: auto;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .step-connector {
        top: 16px;
        left: calc(50% + 16px);
        right: calc(-50% + 16px);
        min-width: 8px;
    }
    
    .step-checkmark svg {
        width: 14px;
        height: 14px;
    }
    
    .step-content {
        gap: 4px;
        min-width: 45px;
    }
}

/* Extra small mobile devices (320px - 375px) */
@media (max-width: 375px) {
    .progress-stepper-container {
        padding: 12px 4px;
    }
    
    .progress-stepper {
        padding: 0 2px;
        width: 100%;
    }
    
    .step-indicator {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .step-label {
        font-size: 7px;
        max-width: 38px;
        line-height: 1.0;
        letter-spacing: 0.02em;
    }
    
    .step-connector {
        top: 14px;
        left: calc(50% + 14px);
        right: calc(-50% + 14px);
        min-width: 4px;
    }
    
    .step-content {
        gap: 3px;
        min-width: 38px;
    }
    
    .step-checkmark svg {
        width: 12px;
        height: 12px;
    }
}

/* Chat Screen - Premium Design */
.premium-chat {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--surface-base);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
    position: relative;
}

.premium-header {
    background: var(--surface-base);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Back Button - Generic style for all screens */
.btn-back-premium,
.chat-back-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    flex-shrink: 0;
}

.btn-back-premium:hover,
.chat-back-btn:hover {
    background: rgba(245, 200, 106, 0.15);
    border-color: rgba(245, 200, 106, 0.3);
    color: #F5C86A;
    transform: translateX(-2px);
}

.btn-back-premium .back-arrow,
.chat-back-btn .back-arrow {
    font-size: 18px;
    font-weight: 700;
}

.btn-back-premium .back-text,
.chat-back-btn .back-text {
    font-size: 14px;
}

.chat-back-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.back-arrow {
    font-size: 18px;
    line-height: 1;
}

.back-text {
    font-size: 15px;
}

/* AI Case Assistant Card */
.ai-assistant-card {
    flex: 1;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    border-radius: 16px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(245, 200, 106, 0.3);
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

@media (min-width: 768px) {
    .ai-assistant-card {
        padding: 12px 16px;
        gap: 12px;
    }
}

.ai-brain-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B0B0C;
    flex-shrink: 0;
}

.ai-brain-icon svg {
    width: 18px;
    height: 18px;
}

.ai-card-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.ai-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #0B0B0C;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-card-subtitle {
    font-size: 12px;
    color: rgba(11, 11, 12, 0.8);
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 767px) {
    .ai-brain-icon {
        width: 28px;
        height: 28px;
    }
    
    .ai-brain-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .ai-card-title {
        font-size: 13px;
    }
    
    .ai-card-subtitle {
        font-size: 10px;
    }
}

@media (max-width: 375px) {
    .ai-brain-icon {
        width: 24px;
        height: 24px;
    }
    
    .ai-brain-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .ai-card-title {
        font-size: 12px;
    }
    
    .ai-card-subtitle {
        font-size: 9px;
    }
}

@media (max-width: 320px) {
    .ai-brain-icon {
        width: 20px;
        height: 20px;
    }
    
    .ai-brain-icon svg {
        width: 12px;
        height: 12px;
    }
    
    .ai-card-subtitle {
        display: none;
    }
}

/* Voice Button in Header (Inside AI Card) */
.voice-btn-header {
    background: rgba(11, 11, 12, 0.15);
    border: 1px solid rgba(11, 11, 12, 0.2);
    border-radius: 10px;
    padding: 6px 10px;
    color: #0B0B0C;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.voice-btn-header:hover {
    background: rgba(11, 11, 12, 0.25);
    border-color: rgba(11, 11, 12, 0.3);
}

.voice-btn-header.recording {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    animation: recordingPulse 1.5s ease-in-out infinite;
}

@keyframes recordingPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
    }
}

.voice-btn-header .mic-icon-small {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.voice-btn-header span {
    white-space: nowrap;
}

.chat-header-center {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chloe-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(245, 200, 106, 0.3) 0%, rgba(245, 200, 106, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px solid rgba(245, 200, 106, 0.3);
}

.chloe-avatar::before {
    content: 'C';
    font-size: 20px;
    font-weight: 700;
    color: var(--gold-primary);
}

.avatar-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 200, 106, 0.4) 0%, transparent 70%);
    animation: avatarPulse 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes avatarPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.chloe-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chloe-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.chloe-status {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.chat-header {
    background: var(--surface-card);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.chat-back-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 22px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.chat-back-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.chat-header-center {
    flex: 1;
    text-align: center;
}

.chat-header-center h2 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.chat-header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 0;
}

/* Chat Widget */
ai-chat-widget {
    display: block;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: var(--surface-base);
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .chat-messages {
        padding: 20px 16px;
        gap: 16px;
    }
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    font-size: 15px;
    animation: messageSlideIn 0.3s ease-out;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .message {
        max-width: 90%;
        padding: 12px 16px;
        font-size: 14px;
    }
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    align-self: flex-end;
    background: var(--primary-gradient);
    color: #0B0B0C;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(245, 200, 106, 0.2);
    border-radius: 18px 18px 4px 18px;
}

/* Message Wrapper for AI messages with icon on left */
.message-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 100%;
}

.ai-message-icon-left {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #F5C86A;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 4px;
}

.ai-message-icon-left svg {
    width: 16px;
    height: 16px;
}

.message.ai,
.premium-ai-message {
    align-self: flex-start;
    background: var(--surface-card);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 400;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    max-width: calc(100% - 34px);
    flex: 1;
}

.premium-ai-message p {
    margin: 0;
    line-height: 1.5;
}

.message.user,
.selected-response {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: #0B0B0C;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 200, 106, 0.3);
    border-radius: 20px 20px 4px 20px;
    padding: 12px 16px;
    max-width: 85%;
}

.voice-transcript {
    align-self: flex-end;
    background: rgba(245, 200, 106, 0.15);
    color: var(--text-primary);
    font-weight: 500;
    border: 1px solid rgba(245, 200, 106, 0.3);
    border-radius: 20px 20px 4px 20px;
    padding: 12px 16px;
    max-width: 85%;
    font-style: italic;
    opacity: 0.8;
}

.voice-transcript p {
    margin: 0;
}

.selected-response p {
    margin: 0;
}

.message p {
    margin: 0;
    line-height: 1.5;
}

/* Options Container - appears below message, not inside */
.message-options-container {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    padding-left: 34px; /* Align with message text (icon width + gap) */
    box-sizing: border-box;
}

.message-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    max-width: calc(100% - 34px);
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .message-options {
        gap: 8px;
    }
    
    .option-btn {
        padding: 10px 14px;
        font-size: 14px;
    }
}

@media (max-width: 375px) {
    .message-wrapper {
        gap: 6px;
    }
    
    .ai-message-icon-left {
        width: 18px;
        height: 18px;
    }
    
    .ai-message-icon-left svg {
        width: 12px;
        height: 12px;
    }
    
    .premium-ai-message {
        max-width: calc(100% - 24px);
        padding: 12px 14px;
        font-size: 13px;
    }
    
    .message-options-container {
        padding-left: 24px;
    }
    
    .message-options {
        grid-template-columns: 1fr;
        gap: 8px;
        max-width: calc(100% - 24px);
    }
    
    .option-btn {
        padding: 12px 16px;
        font-size: 14px;
        width: 100%;
    }
}

.option-btn {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 16px;
    white-space: nowrap;
    transition: all 0.2s ease;
    background: var(--surface-card);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    letter-spacing: -0.01em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.option-btn.selected {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: #0B0B0C;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 200, 106, 0.3);
}

.message.typing {
    background: var(--surface-card);
    font-style: italic;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
    font-weight: 400;
}

.chat-input-container {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--surface-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.premium-input {
    flex-direction: column;
    align-items: center;
    padding: 32px 20px;
    gap: 16px;
}

/* Large Microphone Button - Primary CTA */
.microphone-btn-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(245, 200, 106, 0.4);
    position: relative;
    overflow: visible;
}

.microphone-btn-large:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(245, 200, 106, 0.5);
}

.microphone-btn-large:active:not(:disabled) {
    transform: scale(0.95);
}

.microphone-btn-large:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.microphone-btn-large.recording {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.5);
    animation: recordingPulse 1.5s ease-in-out infinite;
}

@keyframes recordingPulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(239, 68, 68, 0.5);
    }
    50% {
        box-shadow: 0 8px 32px rgba(239, 68, 68, 0.8);
    }
}

.mic-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mic-icon {
    width: 32px;
    height: 32px;
    stroke: #0B0B0C;
    stroke-width: 2;
    fill: none;
}

.microphone-btn-large.recording .mic-icon {
    stroke: #ffffff;
    animation: micPulse 0.8s ease-in-out infinite;
}

@keyframes micPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.mic-label {
    font-size: 13px;
    font-weight: 600;
    color: #0B0B0C;
    letter-spacing: 0.02em;
}

.microphone-btn-large.recording .mic-label {
    color: #ffffff;
}

.text-input-wrapper {
    width: 100%;
    max-width: 600px;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Speech Visualization */
.speech-visualization {
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    margin: 20px 0;
}

.speech-waves {
    display: flex;
    gap: 6px;
    align-items: center;
    height: 40px;
}

.wave {
    width: 4px;
    height: 20px;
    background: var(--gold-primary);
    border-radius: 2px;
    animation: waveAnimation 1.2s ease-in-out infinite;
}

.wave:nth-child(1) {
    animation-delay: 0s;
}

.wave:nth-child(2) {
    animation-delay: 0.2s;
    height: 32px;
}

.wave:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes waveAnimation {
    0%, 100% {
        transform: scaleY(0.5);
        opacity: 0.6;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.speech-hint {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.speech-preview {
    opacity: 0.7;
    animation: previewFadeIn 0.3s ease-out;
}

@keyframes previewFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 0.7;
        transform: translateY(0);
    }
}

/* AI Thinking Animation */
.message.thinking {
    background: var(--surface-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 20px;
}

.thinking-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.thinking-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold-primary);
    animation: thinkingDot 1.4s ease-in-out infinite;
}

.thinking-dots span:nth-child(1) {
    animation-delay: 0s;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes thinkingDot {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.chat-input {
    flex: 1;
    padding: 14px 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    background: var(--surface-base);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.chat-input:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(245, 200, 106, 0.1);
}

.chat-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-voice-btn,
.chat-send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(245, 200, 106, 0.2);
    flex-shrink: 0;
    position: relative;
    overflow: visible;
}

.chat-send-btn svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 10;
}

.chat-voice-btn:hover,
.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(245, 200, 106, 0.3);
}

.chat-voice-btn:active,
.chat-send-btn:active {
    transform: scale(0.95);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.recording-indicator {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Pain Mapping Screen - Premium Full-Screen Design */
.premium-pain-mapping {
    height: 100vh;
    min-height: 100vh;
    background: var(--surface-base);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

@supports (-webkit-touch-callout: none) {
    .premium-pain-mapping {
        height: -webkit-fill-available;
        min-height: -webkit-fill-available;
    }
}

.progress-stepper-container {
    flex-shrink: 0;
}

.pain-mapping-container.fullscreen {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

/* 3D Mannequin Container */
.mannequin-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #111111;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 0;
}

.mannequin-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
}

@media (max-width: 767px) {
    .mannequin-wrapper {
        min-height: 300px;
        align-items: baseline; /* Align to baseline in mobile view */
    }
}

.mannequin-3d {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    position: relative;
}


.mannequin-2d {
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 20px;
}

@media (max-width: 767px) {
    .mannequin-3d {
        min-height: calc(100vh - 350px); /* Account for progress stepper + UI panels */
        height: calc(100vh - 350px);
        /* Ensure full body is visible - no padding that would cut off legs */
        padding-bottom: 0;
    }
    .mannequin-2d {
        min-height: 300px;
        padding: 10px;
    }
}

.body-3d-container {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    position: relative;
    cursor: grab;
    touch-action: none;
    background: #111111;
    display: block;
    visibility: visible;
    opacity: 1;
}

.body-3d-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.body3d-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--gold-primary);
    font-size: 16px;
    z-index: 1;
    text-align: center;
}

.body3d-loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.body-3d-container:active {
    cursor: grabbing;
}

.body-3d-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    outline: none;
}

.rotation-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(245, 200, 106, 0.3);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-primary);
    font-size: 14px;
    font-weight: 500;
    animation: fadeInUp 0.5s ease-out;
    z-index: 5;
    pointer-events: none;
}

.rotation-hint .hint-icon {
    font-size: 16px;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 767px) {
    .body-3d-container {
        min-height: 300px;
    }
    
    .rotation-hint {
        bottom: 12px;
        padding: 6px 12px;
        font-size: 12px;
    }
}

.mannequin-svg {
    width: 100%;
    max-width: 350px;
    height: auto;
    min-height: 600px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
    box-sizing: border-box;
    display: block;
    background: transparent;
}

@media (max-width: 767px) {
    .mannequin-svg {
        max-width: 250px;
        min-height: 500px;
    }
    
    .mannequin-wrapper {
        padding: 10px 0;
    }
}

@media (max-width: 375px) {
    .mannequin-svg {
        max-width: 200px;
        min-height: 400px;
    }
}

@media (max-width: 320px) {
    .mannequin-svg {
        max-width: 180px;
        min-height: 360px;
    }
}

.body-part {
    fill: rgba(255, 255, 255, 0.1);
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 2;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.body-part:hover {
    fill: rgba(245, 200, 106, 0.3);
    stroke: var(--gold-primary);
    stroke-width: 3;
    filter: drop-shadow(0 0 8px rgba(245, 200, 106, 0.5));
}

.body-part.selected {
    fill: var(--gold-primary);
    stroke: var(--gold-light);
    stroke-width: 3;
    filter: drop-shadow(0 0 12px rgba(245, 200, 106, 0.8));
    animation: selectedPulse 2s ease-in-out infinite;
}

@keyframes selectedPulse {
    0%, 100% {
        filter: drop-shadow(0 0 12px rgba(245, 200, 106, 0.8));
    }
    50% {
        filter: drop-shadow(0 0 16px rgba(245, 200, 106, 1));
    }
}

/* Selected Parts Badge */
/* Selected Body Parts List */
.selected-parts-list {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 50vh;
    padding: 16px;
    padding-bottom: env(safe-area-inset-bottom, 16px);
    background: rgba(28, 28, 30, 0.95);
    border-top: 1px solid rgba(245, 200, 106, 0.2);
    border-radius: 20px 20px 0 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10;
    overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: transform 0.3s ease-out;
}


/* Desktop: Position on right side */
@media (min-width: 768px) {
    .selected-parts-list {
        position: absolute;
        top: 80px;
        right: 20px;
        left: auto;
        bottom: auto !important;
        width: 320px;
        max-width: calc(100% - 40px);
        height: 340px; /* Fixed height */
        border-radius: 12px;
        border-top: 1px solid rgba(245, 200, 106, 0.2);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        transform: none;
        display: flex;
        flex-direction: column;
        overflow: hidden; /* Hide overflow on container */
    }
    
    .selected-parts-items {
        overflow-y: auto;
        overflow-x: hidden;
        flex: 1;
        min-height: 0; /* Allow flex item to shrink */
        /* Height for items: container height (340px) minus header (~50px) and padding (~32px) */
        max-height: calc(340px - 82px); /* Fixed height minus header and padding */
    }
}

.selected-parts-list-header {
    margin-bottom: 12px;
    flex-shrink: 0; /* Keep header fixed, don't shrink */
}

.selected-parts-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.selected-parts-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0; /* Allow flex item to shrink below content size */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    /* Custom scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 200, 106, 0.5) rgba(255, 255, 255, 0.1);
}

.selected-parts-items::-webkit-scrollbar {
    width: 6px;
}

.selected-parts-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.selected-parts-items::-webkit-scrollbar-thumb {
    background: rgba(245, 200, 106, 0.5);
    border-radius: 3px;
}

.selected-parts-items::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 200, 106, 0.7);
}

.selected-part-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Mobile: Compact list items */
@media (max-width: 767px) {
    .selected-part-item {
        padding: 8px 10px;
        min-height: 48px;
    }
    
    .selected-parts-items {
        gap: 6px;
    }
}

.selected-part-item:hover {
    background: rgba(245, 200, 106, 0.1);
    border-color: rgba(245, 200, 106, 0.3);
}

.part-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.part-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.part-pain-level {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-remove-part {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

/* Mobile: Larger touch targets */
@media (max-width: 767px) {
    .btn-remove-part {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
}

.btn-remove-part:hover {
    background: rgba(255, 77, 77, 0.2);
    border-color: rgba(255, 77, 77, 0.4);
    color: #ff4d4d;
    transform: scale(1.1);
}

.btn-remove-part svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

@media (max-width: 767px) {
    .selected-parts-list {
        margin: 16px 12px;
        padding: 12px;
    }
    
    .selected-part-item {
        padding: 10px 12px;
    }
    
    .part-name {
        font-size: 14px;
    }
    
    .part-pain-level {
        font-size: 11px;
    }
    
    .btn-remove-part {
        width: 28px;
        height: 28px;
    }
    
    .btn-remove-part svg {
        width: 16px;
        height: 16px;
    }
}

.selected-parts-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95) 0%, rgba(245, 200, 106, 0.95) 100%);
    border: 2px solid rgba(255, 215, 0, 0.8);
    z-index: 6;
    border-radius: 24px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: badgeSlideIn 0.4s ease-out;
    max-width: calc(100% - 20px);
    box-sizing: border-box;
    z-index: 10;
    backdrop-filter: blur(10px);
    font-size: 12px;
}

@media (min-width: 375px) {
    .selected-parts-badge {
        top: 12px;
        right: 12px;
        padding: 9px 16px;
        gap: 9px;
        font-size: 13px;
    }
}

@media (min-width: 768px) {
    .selected-parts-badge {
        top: 10px;
        right: 20px;
        padding: 10px 18px;
        gap: 10px;
        font-size: 14px;
        max-width: calc(100% - 40px);
    }
}

.selected-parts-badge .badge-count {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.selected-parts-badge .badge-text {
    color: #000;
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

@media (max-width: 767px) {
    .selected-parts-badge {
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 12px;
        max-width: calc(100% - 24px);
    }
}

@media (max-width: 375px) {
    .selected-parts-badge {
        top: 10px;
        right: 10px;
        padding: 5px 10px;
        font-size: 11px;
        gap: 6px;
    }
    
    .badge-text {
        font-size: 11px;
    }
}

@keyframes badgeSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.badge-count {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gold-primary);
    color: #0B0B0C;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.badge-text {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}

/* Pain Slider Section */
.pain-slider-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 20px 16px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    background: rgba(28, 28, 30, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px 20px 0 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-sizing: border-box;
    z-index: 10;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden; /* No scrolling needed */
}

/* Mobile: Consolidated stacking rules - Compact UI, don't cover legs */
@media (max-width: 767px) {
    /* Ensure mannequin is visible - give it space at bottom for legs */
    .mannequin-container {
        padding-bottom: 0;
        /* Ensure full height is available for mannequin */
        min-height: calc(100vh - 80px); /* Account for progress stepper */
    }
    
    /* Navigation always at bottom - compact */
    .pain-navigation {
        bottom: 0 !important;
        z-index: 11;
        padding: 10px 12px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        max-height: 70px;
    }
    
    /* Slider above navigation - compact */
    .pain-slider-section {
        bottom: 70px !important;
        z-index: 10;
        padding: 12px 14px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        max-height: 160px; /* Reduced to leave more space for mannequin */
        overflow: hidden; /* No scrolling needed */
    }
    
    /* Hide selected body parts list on mobile - not properly adjusted */
    .selected-parts-list {
        display: none !important; /* Hide on mobile view */
    }
    
    /* Make sure mannequin area is visible above UI - ensure full body fits */
    .mannequin-3d {
        min-height: calc(100vh - 350px); /* Account for progress stepper + UI */
        height: calc(100vh - 350px);
    }
    
    /* Instructions positioned above UI panels */
    .pain-instructions {
        bottom: 260px !important; /* Above UI panels */
        z-index: 5;
        font-size: 11px;
        padding: 10px 16px;
    }
    
    /* Ensure body-3d-container shows full mannequin */
    .body-3d-container {
        min-height: calc(100vh - 350px);
        height: calc(100vh - 350px);
    }
}

/* Desktop: Position on right side */
@media (min-width: 768px) {
    .pain-slider-section {
        position: absolute;
        bottom: 100px;
        right: 20px;
        left: auto;
        width: 320px;
        max-width: calc(100% - 40px);
        padding: 24px 20px;
        border-radius: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
}

.pain-slider-card {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Mobile: Compact slider card */
@media (max-width: 767px) {
    .pain-slider-card {
        padding: 0;
    }
    
    .pain-slider-header {
        margin-bottom: 12px;
        flex-wrap: wrap;
    }
    
    .pain-value-large {
        font-size: 32px;
    }
    
    .pain-max {
        font-size: 16px;
    }
    
    .pain-label {
        font-size: 14px;
    }
    
    .pain-slider-wrapper {
        margin-bottom: 8px;
    }
}

.pain-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .pain-slider-header {
        margin-bottom: 20px;
        gap: 12px;
    }
}

.pain-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.pain-value-large {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    transition: all 0.3s ease;
}

.pain-value-large.high-pain {
    color: var(--gold-primary);
    text-shadow: 0 0 20px rgba(245, 200, 106, 0.5);
}

.pain-max {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 4px;
}

.pain-slider-wrapper {
    position: relative;
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
}

.pain-slider.premium-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
}

@media (max-width: 767px) {
    .pain-slider.premium-slider {
        height: 6px;
    }
}

.pain-slider.premium-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold-primary);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 200, 106, 0.4);
    transition: all 0.3s ease;
    border: 3px solid var(--surface-base);
}

.pain-slider.premium-slider.high-pain::-webkit-slider-thumb {
    background: var(--gold-primary);
    box-shadow: 0 4px 20px rgba(245, 200, 106, 0.8);
    animation: thumbGlow 2s ease-in-out infinite;
}

@keyframes thumbGlow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(245, 200, 106, 0.8);
    }
    50% {
        box-shadow: 0 4px 30px rgba(245, 200, 106, 1);
    }
}

.pain-slider.premium-slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold-primary);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 200, 106, 0.4);
    border: 3px solid var(--surface-base);
    transition: all 0.3s ease;
}

.pain-slider.premium-slider.high-pain::-moz-range-thumb {
    box-shadow: 0 4px 20px rgba(245, 200, 106, 0.8);
}

.pain-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .pain-scale-labels {
        font-size: 11px;
    }
}

@media (max-width: 375px) {
    .pain-scale-labels {
        font-size: 10px;
    }
}

/* Pain Confirmation */
.pain-confirmation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    animation: confirmationSlideIn 0.4s ease-out;
}

@keyframes confirmationSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.checkmark {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.confirmation-text {
    font-size: 13px;
    color: var(--success);
    font-weight: 600;
}

/* Instructions */
.pain-instructions {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    padding: 12px 20px;
    background: rgba(28, 28, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: instructionsFadeIn 0.6s ease-out;
    max-width: calc(100% - 32px);
    width: auto;
    box-sizing: border-box;
    word-wrap: break-word;
    z-index: 5;
    font-size: 12px;
}

/* Mobile-first: Instructions positioned above bottom UI */
@media (min-width: 375px) {
    .pain-instructions {
        bottom: 100px;
        padding: 14px 22px;
        font-size: 13px;
    }
}

@media (min-width: 768px) {
    .pain-instructions {
        bottom: 120px;
        padding: 16px 24px;
        font-size: 14px;
    }
}

@keyframes instructionsFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.instruction-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

/* Navigation */
.pain-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    background: rgba(28, 28, 30, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 11; /* Highest z-index for navigation */
    box-sizing: border-box;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

/* Mobile: Compact navigation */
@media (max-width: 767px) {
    .pain-navigation {
        padding: 10px 12px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        max-height: 70px;
    }
    
    .btn-continue {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 44px;
    }
}

/* Desktop: Position on right side */
@media (min-width: 768px) {
    .pain-navigation {
        position: absolute;
        bottom: 20px !important; /* Override mobile bottom */
        right: 20px;
        left: auto;
        width: 320px;
        max-width: calc(100% - 40px);
        padding: 20px;
        border-radius: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
}

.btn-continue {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: #0B0B0C;
    border: none;
    border-radius: 16px;
    min-height: 48px; /* Touch-friendly */
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(245, 200, 106, 0.4);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .btn-continue {
        min-height: 52px; /* Larger on mobile */
        font-size: 15px;
        padding: 14px 28px;
    }
}

.btn-continue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(245, 200, 106, 0.5);
}

.btn-continue:active {
    transform: translateY(0);
}

@media (max-width: 767px) {
    .btn-continue {
        max-width: 100%;
        padding: 14px 24px;
        font-size: 15px;
    }
}

@media (max-width: 375px) {
    .btn-continue {
        padding: 12px 20px;
        font-size: 14px;
    }
}

.body-diagram-section {
    margin-bottom: 24px;
}

.body-diagram-container {
    background: var(--surface-card);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pain-indicators {
    margin-top: 24px;
    display: flex;
    justify-content: space-around;
    gap: 16px;
    padding: 16px;
    background: var(--surface-card);
    border-radius: 12px;
}

.pain-indicator-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.indicator-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.indicator-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--success);
    font-family: monospace;
}

.pain-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Pain Selector - Interactive 3D Body Diagram */
pain-selector {
    display: block;
    width: 100%;
}

.body-diagram-wrapper {
    background: var(--surface-card);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.view-toggle-container {
    text-align: center;
    margin-bottom: 16px;
}

.btn-view-toggle {
    background: var(--surface-hover);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-view-toggle:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.body-diagram-info {
    text-align: center;
    margin-bottom: 20px;
}

.diagram-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.diagram-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.body-svg-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    margin-top: 16px;
}

.body-svg {
    width: 100%;
    max-width: 300px;
    height: auto;
    cursor: pointer;
}

.body-part {
    fill: rgba(245, 200, 106, 0.2);
    stroke: var(--gold-primary);
    stroke-width: 2;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.body-part:hover {
    fill: rgba(245, 200, 106, 0.4);
    stroke: var(--gold-light);
    stroke-width: 3;
    opacity: 1;
    transform: scale(1.05);
    transform-origin: center;
}

.body-part.selected {
    fill: var(--gold-primary);
    stroke: var(--gold-light);
    stroke-width: 3;
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(245, 200, 106, 0.6));
}

.part-label {
    font-size: 8px;
    fill: var(--text-muted);
    pointer-events: none;
    font-weight: 500;
}

.body-part.selected + .part-label {
    fill: #ffffff;
    font-weight: 700;
}

/* Body parts list (fallback) */
.body-parts-list {
    display: none; /* Hide button list, use SVG instead */
}

/* File Upload Widget - Enhanced */
file-upload-widget {
    display: block;
    margin-bottom: 16px;
}

.upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.upload-zone.drag-over {
    border-color: var(--gold-primary);
    background: rgba(245, 200, 106, 0.1);
    border-style: solid;
    transform: scale(1.02);
}

.upload-zone:hover {
    border-color: var(--gold-primary);
    background: rgba(245, 200, 106, 0.05);
}

.upload-icon {
    font-size: 40px;
    margin-bottom: 8px;
    color: var(--gold-primary);
}

.upload-text {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.upload-hint {
    color: var(--text-muted);
    font-size: 12px;
}

.upload-progress {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--surface-hover);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    animation: progress 2s infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Document Upload Options */
.upload-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.upload-option-item {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.upload-option-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Uploaded Files Grid */
.uploaded-files-section {
    margin-top: 24px;
}

.uploaded-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.uploaded-file-item {
    position: relative;
    background: var(--surface-hover);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.uploaded-file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.file-preview {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    background: var(--surface-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-icon {
    font-size: 48px;
    color: var(--text-muted);
}

.file-info {
    text-align: center;
}

.file-name {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-type {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.btn-remove-file {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--error);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    transition: all 0.2s ease;
}

.btn-remove-file:hover {
    transform: scale(1.1);
    background: #dc2626;
}

/* Score Card */
score-card {
    display: block;
    width: 100%;
}

.score-card {
    background: var(--primary-gradient);
    border-radius: 16px;
    padding: 48px;
    text-align: center;
    color: #0B0B0C;
    box-shadow: var(--shadow-gold);
}

.score-number {
    font-size: 120px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 16px;
}

.score-value-range {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 24px;
}

.score-breakdown {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

.score-breakdown-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .score-number {
        font-size: 140px;
    }
    
    .score-value-range {
        font-size: 36px;
    }
}

@media (min-width: 1024px) {
    .score-number {
        font-size: 160px;
    }
    
    .score-value-range {
        font-size: 40px;
    }
}

/* Loading Spinner */
loading-spinner {
    display: block;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--gold-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.spinner.small {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

.spinner.medium {
    width: 48px;
    height: 48px;
}

.spinner.large {
    width: 64px;
    height: 64px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-message {
    margin-top: 16px;
    text-align: center;
    color: #cccccc;
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Partner Card */
partner-card {
    display: block;
}

.partner-card {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
}

.partner-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 24px;
}

.partner-name {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--gold-primary);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(245, 200, 106, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B0B0C;
    font-size: 32px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-gold);
}

.play-button:hover {
    background: var(--gold-primary);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: var(--shadow-gold-hover);
}

/* Case Summary */
case-summary {
    display: block;
}

.summary-section {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.summary-section h3 {
    color: var(--gold-primary);
    margin-bottom: 16px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    color: #cccccc;
    font-weight: 500;
}

.summary-value {
    color: #ffffff;
    text-align: right;
}

.summary-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.factors-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.factors-list li {
    padding: 8px 0;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.factors-list li:last-child {
    border-bottom: none;
}

.factors-list li::before {
    content: "• ";
    color: var(--gold-primary);
    font-weight: bold;
    margin-right: 8px;
}

.flags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.flag-badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 215, 0, 0.2);
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Form Field */
form-field {
    display: block;
    margin-bottom: 20px;
}

.form-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #cccccc;
}

.form-field-label.required::after {
    content: ' *';
    color: #ff4444;
}

.form-field-input {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #1a1a1a;
    color: white;
    font-size: 16px;
}

.form-field-input:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-field-input.auto-filled {
    border-color: var(--gold-primary);
    background: rgba(245, 200, 106, 0.1);
}

.form-field-error {
    color: #ff4444;
    font-size: 14px;
    margin-top: 4px;
}

/* Score Screen */

.score-container {
    max-width: 600px;
    margin: 0 auto;
}

.injury-details {
    margin-top: 32px;
    width: 100%;
    padding: 24px;
    background: var(--surface-base);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

/* Video Modal */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.video-modal {
    background: var(--surface-card);
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.video-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.2s ease;
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.video-modal-content {
    padding: 0;
}

.video-player-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(245, 200, 106, 0.1) 0%, rgba(11, 11, 12, 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-placeholder-content {
    text-align: center;
    padding: 40px;
    color: var(--text-primary);
}

.play-icon-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(245, 200, 106, 0.4);
    color: #0B0B0C;
}

.play-icon-large svg {
    width: 40px;
    height: 40px;
    margin-left: 4px;
}

.video-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--text-primary);
}

.video-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    font-weight: 500;
}

.video-note {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    font-style: italic;
}

@media (max-width: 767px) {
    .video-modal {
        max-width: 95%;
        border-radius: 16px;
    }
    
    .video-placeholder-content {
        padding: 24px;
    }
    
    .play-icon-large {
        width: 60px;
        height: 60px;
    }
    
    .play-icon-large svg {
        width: 30px;
        height: 30px;
    }
    
    .video-title {
        font-size: 20px;
    }
    
    .video-description {
        font-size: 16px;
    }
}

/* Premium Error Message */
.premium-error {
    background: var(--surface-card);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    max-width: 500px;
    margin: 40px auto;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.1);
}

.premium-error .error-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.premium-error h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.premium-error p {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* Image Viewer Modal - Elegant Premium Design */
.image-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.image-viewer-modal {
    background: var(--surface-card);
    border-radius: 20px;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(245, 200, 106, 0.1);
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

.image-viewer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.2s ease;
    padding: 0;
}

.image-viewer-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.image-viewer-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
    border-color: rgba(245, 200, 106, 0.3);
}

.image-viewer-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(245, 200, 106, 0.15);
    background: linear-gradient(180deg, rgba(11, 11, 12, 0.95) 0%, rgba(11, 11, 12, 0.85) 100%);
}

.image-viewer-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
}

.image-viewer-content {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    min-height: 300px;
    max-height: calc(90vh - 100px);
    overflow: auto;
}

.viewer-image {
    max-width: 100%;
    max-height: calc(90vh - 140px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.02);
}

/* Clickable Preview Hint - Override for document scan */
.document-scan-screen .capture-preview {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.document-scan-screen .capture-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(245, 200, 106, 0.2);
}

.document-scan-screen .capture-preview:hover .view-image-hint {
    opacity: 1;
}

/* Video placeholder styling for document scan preview */
.document-scan-screen .capture-video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: radial-gradient(circle at 50% 0%, rgba(245, 200, 106, 0.16), transparent 60%),
                linear-gradient(135deg, rgba(10, 10, 10, 0.96), rgba(0, 0, 0, 0.98));
}

.document-scan-screen .video-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(245, 200, 106, 0.65);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.document-scan-screen .video-icon-play {
    display: inline-block;
    font-size: 34px;
    color: #0B0B0C;
    margin-left: 4px; /* optical centering for triangle */
}

.document-scan-screen .capture-preview:hover .video-icon-circle {
    transform: scale(1.07);
    box-shadow: 0 14px 40px rgba(245, 200, 106, 0.85);
}

.document-scan-screen .video-placeholder-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.view-image-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    border: 1px solid rgba(245, 200, 106, 0.2);
}

.view-image-hint svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

/* Document Viewer Placeholder (for PDFs) */
.document-viewer-placeholder {
    padding: 60px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.document-placeholder-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
    color: var(--primary-color);
    opacity: 0.6;
}

.document-placeholder-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.document-placeholder-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.document-placeholder-note {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 32px 0;
}

.document-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: var(--primary-gradient);
    color: #0B0B0C;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(245, 200, 106, 0.3);
}

.document-download-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.document-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 200, 106, 0.4);
}

@media (max-width: 767px) {
    .image-viewer-modal {
        max-width: 95vw;
        border-radius: 16px;
    }
    
    .image-viewer-header {
        padding: 16px 20px;
    }
    
    .image-viewer-title {
        font-size: 18px;
    }
    
    .image-viewer-content {
        padding: 16px;
        min-height: 250px;
    }
    
    .viewer-image {
        max-height: calc(90vh - 120px);
    }
    
    .image-viewer-close {
        width: 40px;
        height: 40px;
        top: 12px;
        right: 12px;
    }
    
    .document-viewer-placeholder {
        padding: 40px 24px;
        min-height: 300px;
    }
    
    .document-placeholder-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }
    
    .document-placeholder-text {
        font-size: 18px;
    }
    
    .document-download-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* UISI Questionnaire Styles */
/* Premium UISI Questionnaire Styles */
.uisi-questionnaire-screen {
    background: var(--surface-base);
    min-height: 100vh;
    padding-bottom: 80px;
}

.questionnaire-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.questionnaire-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.questionnaire-title {
    font-size: 32px;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #F5C86A 0%, #E8B04A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.questionnaire-subtitle {
    color: #E8E8E8;
    font-size: 16px;
    margin: 0;
    font-weight: 400;
    line-height: 1.6;
}

.questionnaire-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.question-section {
    background: var(--surface-card);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid rgba(245, 200, 106, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.question-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #F5C86A 0%, #E8B04A 100%);
    opacity: 0.6;
}

.question-section:hover {
    border-color: rgba(245, 200, 106, 0.25);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.section-number {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #F5C86A 0%, #E8B04A 100%);
    color: #0B0B0C;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(245, 200, 106, 0.3);
}

.section-title-wrapper {
    flex: 1;
}

.section-title {
    color: #F5C86A;
    font-size: 22px;
    margin: 0 0 4px 0;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-weight {
    color: #B0B0B0;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.triage-card {
    background: var(--surface-card);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
}

.triage-card h2 {
    font-size: 28px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: -0.02em;
}

.triage-card .text-muted {
    color: #E8E8E8;
    font-size: 16px;
    text-align: center;
    margin-bottom: 32px;
    font-weight: 400;
}

.form-group {
    margin-bottom: 32px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.question-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.6;
    cursor: default;
}

.question-number {
    color: #F5C86A;
    font-weight: 800;
    flex-shrink: 0;
    min-width: 28px;
}

.question-note {
    display: block;
    color: #B0B0B0;
    font-size: 14px;
    font-weight: 400;
    margin-top: 6px;
    font-style: italic;
}

.form-group label {
    display: block;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.5;
}

.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label, .checkbox-label {
    display: flex !important;
    align-items: center;
    padding: 16px 20px;
    background: rgba(40, 40, 40, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #E8E8E8;
    position: relative;
    font-size: 15px;
    line-height: 1.5;
    min-height: 56px;
}

.radio-label:hover, .checkbox-label:hover {
    background: rgba(50, 50, 50, 0.7);
    border-color: rgba(245, 200, 106, 0.3);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    margin-right: 16px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid rgba(245, 200, 106, 0.6);
    border-radius: 50%;
    background: rgba(40, 40, 40, 0.8);
    position: relative;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

.radio-label input[type="radio"]:checked {
    background: linear-gradient(135deg, #F5C86A 0%, #E8B04A 100%);
    border-color: #F5C86A;
    box-shadow: 0 0 0 4px rgba(245, 200, 106, 0.2);
}

.radio-label input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0B0B0C;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.checkbox-label input[type="checkbox"] {
    border-radius: 6px;
}

.checkbox-label input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #F5C86A 0%, #E8B04A 100%);
    border-color: #F5C86A;
    box-shadow: 0 0 0 4px rgba(245, 200, 106, 0.2);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #1a1a1a;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    display: block;
    width: 100%;
    height: 100%;
    text-align: center;
}

.radio-label input[type="radio"]:checked + span,
.checkbox-label input[type="checkbox"]:checked + span {
    color: #E8E8E8;
    font-weight: 500;
}

.radio-label:has(input[type="radio"]:checked),
.checkbox-label:has(input[type="checkbox"]:checked) {
    background: rgba(60, 60, 60, 0.8);
    border-color: rgba(245, 200, 106, 0.5);
    box-shadow: 0 4px 12px rgba(245, 200, 106, 0.2);
    transform: translateX(4px);
}

.radio-label:has(input[type="radio"]:checked) span,
.checkbox-label:has(input[type="checkbox"]:checked) span {
    color: #FFFFFF;
    font-weight: 600;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px;
    background: rgba(40, 40, 40, 0.5);
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    position: relative;
    transition: all 0.3s ease;
}

.slider-group:hover {
    border-color: rgba(245, 200, 106, 0.2);
    background: rgba(50, 50, 50, 0.6);
}

.slider-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    -webkit-appearance: none;
    position: relative;
    cursor: pointer;
    margin: 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5C86A 0%, #E8B04A 100%);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 200, 106, 0.5), 0 0 0 6px rgba(245, 200, 106, 0.1);
    border: 3px solid #0B0B0C;
    position: relative;
    z-index: 2;
    margin-top: -10px;
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(245, 200, 106, 0.6), 0 0 0 8px rgba(245, 200, 106, 0.15);
}

.slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

.slider::-webkit-slider-runnable-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    position: relative;
}

/* Create filled portion using a pseudo-element approach */
.slider-wrapper {
    position: relative;
}

.slider-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    transform: translateY(calc(50% - 4px));
    height: 8px;
    width: calc((var(--slider-progress, 50) / 100) * 100%);
    max-width: 100%;
    background: linear-gradient(90deg, #F5C86A 0%, #E8B04A 100%);
    border-radius: 4px 0 0 4px;
    pointer-events: none;
    z-index: 1;
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5C86A 0%, #E8B04A 100%);
    cursor: pointer;
    border: 3px solid #0B0B0C;
    box-shadow: 0 4px 12px rgba(245, 200, 106, 0.5);
    transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(245, 200, 106, 0.6);
}

.slider::-moz-range-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.slider::-moz-range-progress {
    height: 8px;
    background: linear-gradient(90deg, #F5C86A 0%, #E8B04A 100%);
    border-radius: 4px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 8px;
    font-size: 12px;
    color: #B0B0B0;
    font-weight: 500;
}

.slider-value {
    min-width: 60px;
    text-align: center;
    font-size: 40px;
    font-weight: 800;
    color: #F5C86A;
    line-height: 1;
    background: rgba(245, 200, 106, 0.1);
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid rgba(245, 200, 106, 0.2);
    transition: all 0.3s ease;
}

.slider-group:has(input:focus) .slider-value {
    transform: scale(1.05);
    border-color: rgba(245, 200, 106, 0.4);
    background: rgba(245, 200, 106, 0.15);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid rgba(255, 255, 255, 0.08);
}

.form-actions .btn {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

.btn-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

/* Universal Navigation Button Styles - Consistent across all pages */
.document-navigation,
.pain-navigation,
.score-navigation,
.match-navigation,
.summary-navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid rgba(255, 255, 255, 0.08);
}

.document-navigation .btn,
.pain-navigation .btn,
.score-navigation .btn,
.match-navigation .btn,
.summary-navigation .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
}

.btn-back {
    background: rgba(50, 50, 50, 0.8);
    color: #FFFFFF;
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex: 0 1 auto;
    min-width: 120px;
}

.btn-back .btn-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

.btn-back:hover {
    background: rgba(60, 60, 60, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-4px);
}

.btn-back:hover .btn-icon {
    transform: translateX(-4px);
}

.btn-skip {
    background: transparent;
    color: #B0B0B0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex: 0 1 auto;
    min-width: 120px;
}

.btn-skip:hover {
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(40, 40, 40, 0.6);
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, #F5C86A 0%, #E8B04A 100%);
    color: #0B0B0C;
    box-shadow: 0 4px 16px rgba(245, 200, 106, 0.4);
    flex: 1;
    max-width: 280px;
}

.form-actions .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(245, 200, 106, 0.5);
    background: linear-gradient(135deg, #F6D17A 0%, #E9C05A 100%);
}

.form-actions .btn-primary:hover:not(:disabled) .btn-icon {
    transform: translateX(4px);
}

.form-actions .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive Styles */
@media (max-width: 767px) {
    .questionnaire-container {
        padding: 16px;
    }
    
    .questionnaire-header {
        margin-bottom: 32px;
        padding: 0 8px;
    }
    
    .questionnaire-title {
        font-size: 26px;
        margin-bottom: 10px;
    }
    
    .questionnaire-subtitle {
        font-size: 14px;
    }
    
    .questionnaire-form {
        gap: 24px;
    }
    
    .question-section {
        padding: 24px 20px;
        border-radius: 16px;
    }
    
    .section-header {
        gap: 16px;
        margin-bottom: 24px;
        padding-bottom: 16px;
    }
    
    .section-number {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .section-weight {
        font-size: 12px;
    }
    
    .form-group {
        margin-bottom: 28px;
    }
    
    .question-label {
        font-size: 16px;
        gap: 10px;
        margin-bottom: 14px;
    }
    
    .question-number {
        min-width: 24px;
        font-size: 16px;
    }
    
    .question-note {
        font-size: 13px;
    }
    
    .radio-label, .checkbox-label {
        padding: 14px 16px;
        font-size: 14px;
        min-height: 52px;
        border-radius: 10px;
    }
    
    .radio-label input[type="radio"],
    .checkbox-label input[type="checkbox"] {
        width: 22px;
        height: 22px;
        margin-right: 14px;
    }
    
    .slider-group {
        padding: 20px;
        flex-direction: column;
        gap: 16px;
    }
    
    .slider-wrapper {
        width: 100%;
        order: 1;
    }
    
    .slider {
        width: 100%;
        margin: 0;
    }
    
    .slider-labels {
        display: flex;
        justify-content: space-between;
        width: 100%;
        font-size: 11px;
        color: #B0B0B0;
        margin-top: 8px;
    }
    
    .slider-value {
        font-size: 48px;
        min-width: auto;
        width: 100%;
        text-align: center;
        order: 0;
        padding: 16px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 40px;
        padding-top: 24px;
    }
    
    .form-actions .btn {
        max-width: 100%;
        width: 100%;
        padding: 16px 24px;
    }
    
    .document-navigation,
    .pain-navigation,
    .score-navigation,
    .match-navigation,
    .summary-navigation {
        flex-direction: column;
        gap: 12px;
        margin-top: 24px;
        padding-top: 10px;
    }
    
    .document-navigation .btn,
    .pain-navigation .btn,
    .score-navigation .btn,
    .match-navigation .btn,
    .summary-navigation .btn {
        width: 100%;
        max-width: 100%;
        padding: 16px 24px;
    }
    
    .btn-back, .btn-skip {
        min-width: auto;
    }
    
    .triage-card {
        padding: 24px 20px;
    }
    
    .triage-card h2 {
        font-size: 24px;
    }
    
    .triage-card .text-muted {
        font-size: 14px;
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1024px) {
    .questionnaire-container {
        max-width: 750px;
        padding: 24px;
    }
    
    .question-section {
        padding: 28px;
    }
}

/* Desktop (1024px+) - Enhanced Layout */
@media (min-width: 1024px) {
    .questionnaire-container {
        max-width: 1100px;
        padding: 40px 60px;
        margin: 0 auto;
    }
    
    .questionnaire-header {
        margin-bottom: 48px;
    }
    
    .questionnaire-title {
        font-size: 36px;
    }
    
    .questionnaire-subtitle {
        font-size: 18px;
    }
    
    .questionnaire-form {
        gap: 40px;
    }
    
    .question-section {
        padding: 40px 48px;
        border-radius: 24px;
    }
    
    .section-header {
        margin-bottom: 32px;
        padding-bottom: 24px;
    }
    
    .section-number {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-weight {
        font-size: 14px;
    }
    
    .form-group {
        margin-bottom: 36px;
    }
    
    .question-label {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .radio-label, .checkbox-label {
        padding: 20px 24px;
        font-size: 16px;
        min-height: 64px;
    }
    
    .radio-label input[type="radio"],
    .checkbox-label input[type="checkbox"] {
        width: 26px;
        height: 26px;
        margin-right: 18px;
    }
    
    .slider-group {
        padding: 32px;
        gap: 28px;
    }
    
    .slider-value {
        font-size: 48px;
        min-width: 80px;
        padding: 16px 20px;
    }
    
    .form-actions {
        margin-top: 56px;
        padding-top: 40px;
        gap: 20px;
    }
    
    .form-actions .btn {
        padding: 18px 36px;
        font-size: 17px;
    }
    
    .document-navigation,
    .pain-navigation,
    .score-navigation,
    .match-navigation,
    .summary-navigation {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
        margin-top: 40px;
        padding-top: 32px;
    }
}

/* Desktop Large Screen Optimization (1440px+) */
@media (min-width: 1440px) {
    .questionnaire-container {
        max-width: 1200px;
        padding: 50px 80px;
    }
    
    .question-section {
        padding: 48px 56px;
    }
    
    .section-number {
        width: 64px;
        height: 64px;
        font-size: 32px;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .question-label {
        font-size: 19px;
    }
    
    .radio-label, .checkbox-label {
        padding: 22px 28px;
        font-size: 17px;
    }
}

/* Brand Logo Directive Styles - Elegant Premium Design */
brand-logo {
    display: block;
}

.brand-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.brand-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-image {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(245, 200, 106, 0.3));
    transition: all 0.3s ease;
}

.brand-logo-image:hover {
    filter: drop-shadow(0 6px 20px rgba(245, 200, 106, 0.5));
    transform: scale(1.02);
}

.brand-logo-container.brand-logo-small .brand-logo-image {
    max-height: 40px;
}

.brand-logo-container.brand-logo-medium .brand-logo-image {
    max-height: 60px;
}

.brand-logo-container.brand-logo-large .brand-logo-image {
    max-height: 100px;
}

/* Elegant Logo with Icon */
.brand-logo-with-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
}

.brand-logo-container.brand-logo-small .brand-logo-with-icon {
    gap: 8px;
}

.brand-logo-container.brand-logo-large .brand-logo-with-icon {
    gap: 24px;
}

/* Logo Icon Mark - Elegant SVG */
.logo-icon-mark {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoIconFloat 3s ease-in-out infinite;
}

.brand-logo-container.brand-logo-small .logo-icon-mark {
    width: 40px;
    height: 40px;
}

.brand-logo-container.brand-logo-medium .logo-icon-mark {
    width: 60px;
    height: 60px;
}

.brand-logo-container.brand-logo-large .logo-icon-mark {
    width: 100px;
    height: 100px;
}

.logo-icon-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 16px rgba(245, 200, 106, 0.4));
    animation: logoIconRotate 20s linear infinite;
}

.logo-ring-outer {
    animation: logoRingPulse 3s ease-in-out infinite;
}

.logo-shape-main {
    animation: logoShapeGlow 2s ease-in-out infinite;
}

.logo-cross-vertical,
.logo-cross-horizontal {
    animation: logoCrossPulse 2s ease-in-out infinite;
    animation-delay: 0.5s;
}

.logo-ring-inner {
    animation: logoRingRotate 8s linear infinite;
}

.logo-shimmer {
    animation: logoShimmer 3s ease-in-out infinite;
    mask: radial-gradient(circle at 30% 30%, black 20%, transparent 60%);
}

@keyframes logoIconFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes logoIconRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes logoRingPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

@keyframes logoShapeGlow {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 8px rgba(245, 200, 106, 0.6));
    }
    50% {
        opacity: 0.9;
        filter: drop-shadow(0 0 16px rgba(245, 200, 106, 0.8));
    }
}

@keyframes logoCrossPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes logoRingRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(-360deg);
    }
}

@keyframes logoShimmer {
    0%, 100% {
        opacity: 0.1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Elegant Text Logo */
.brand-logo-text {
    margin: 0;
    position: relative;
}

.elegant-logo {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.elegant-part1 {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 12px rgba(6, 182, 212, 0.5));
    position: relative;
    font-weight: 800;
    letter-spacing: -0.02em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
}

.elegant-part1::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    right: -2px;
    bottom: 0;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.4) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: -1;
    filter: blur(10px);
}

.elegant-logo:hover .elegant-part1::before {
    opacity: 1;
}

.elegant-logo:hover .elegant-part1 {
    filter: drop-shadow(0 4px 20px rgba(6, 182, 212, 0.7));
    transform: translateY(-2px);
}

.elegant-part2 {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 12px rgba(16, 185, 129, 0.5));
    position: relative;
    font-weight: 800;
    letter-spacing: -0.02em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

.elegant-part2::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    right: -2px;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.4) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: -1;
    filter: blur(10px);
}

.elegant-logo:hover .elegant-part2::before {
    opacity: 1;
}

.elegant-logo:hover .elegant-part2 {
    filter: drop-shadow(0 4px 20px rgba(16, 185, 129, 0.7));
    transform: translateY(-2px);
}

/* Elegant Tagline */
.elegant-tagline {
    margin-top: 16px;
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: relative;
    padding-top: 16px;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.elegant-tagline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
    opacity: 0.6;
}

.brand-logo-container:hover .elegant-tagline {
    color: var(--text-secondary);
    opacity: 1;
}

.brand-logo-container:hover .elegant-tagline::before {
    width: 100px;
    opacity: 1;
}

.brand-logo-container.brand-logo-small .elegant-tagline {
    font-size: 11px;
    margin-top: 8px;
    padding-top: 8px;
    letter-spacing: 0.06em;
}

.brand-logo-container.brand-logo-small .elegant-tagline::before {
    width: 40px;
}

.brand-logo-container.brand-logo-medium .elegant-tagline {
    font-size: 13px;
    margin-top: 12px;
    padding-top: 12px;
}

.brand-logo-container.brand-logo-medium .elegant-tagline::before {
    width: 50px;
}

.brand-logo-container.brand-logo-large .elegant-tagline {
    font-size: 17px;
    margin-top: 20px;
    padding-top: 20px;
    letter-spacing: 0.1em;
}

.brand-logo-container.brand-logo-large .elegant-tagline::before {
    width: 80px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .logo-icon-mark {
        width: 50px;
        height: 50px;
    }
    
    .brand-logo-container.brand-logo-large .logo-icon-mark {
        width: 70px;
        height: 70px;
    }
    
    .elegant-tagline {
        font-size: 12px;
    }
}
/* Simplified Document Upload UI Styles */
.upload-section {
    margin: 2rem 0;
}

.upload-header {
    text-align: center;
    margin-bottom: 2rem;
}

.upload-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #ffffff);
}

.upload-description {
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.upload-area {
    border: 2px dashed var(--border-color, rgba(245, 200, 106, 0.3));
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--background-secondary, rgba(255, 255, 255, 0.05));
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    position: relative;
}

.upload-area.has-files {
    border-color: var(--primary-color, #f5c86a);
    background: var(--background-primary, rgba(255, 255, 255, 0.03));
}

.upload-area.uploading {
    border-color: var(--primary-color, #f5c86a);
    background: var(--background-primary, rgba(255, 255, 255, 0.03));
}

.upload-input {
    display: none;
}

.upload-button-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    padding: 1rem;
    transition: opacity 0.2s ease;
}

.upload-button-large:hover {
    opacity: 0.8;
}

.upload-icon-large {
    width: 64px;
    height: 64px;
    color: var(--primary-color, #f5c86a);
}

.upload-button-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
}

.upload-progress {
    margin-top: 1rem;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar {
    height: 4px;
    background: var(--border-color, rgba(245, 200, 106, 0.2));
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color, #f5c86a);
    width: 60%;
    animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { width: 60%; }
    50% { width: 80%; }
}

.uploaded-files-section {
    margin-top: 2rem;
}

.files-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary, #ffffff);
}

.uploaded-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.uploaded-file-card {
    border: 1px solid var(--border-color, rgba(245, 200, 106, 0.3));
    border-radius: 8px;
    padding: 1rem;
    background: var(--background-secondary, rgba(255, 255, 255, 0.05));
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.uploaded-file-card:hover {
    border-color: var(--primary-color, #f5c86a);
    box-shadow: 0 2px 8px rgba(245, 200, 106, 0.2);
    transform: translateY(-2px);
}

.file-thumbnail {
    width: 100%;
    height: 120px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--background-primary, rgba(255, 255, 255, 0.03));
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-icon-fallback {
    width: 48px;
    height: 48px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
}

.file-info {
    margin-bottom: 0.5rem;
}

.file-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary, #ffffff);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.75rem;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.file-type {
    text-transform: capitalize;
}

.file-remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.uploaded-file-card:hover .file-remove-btn {
    opacity: 1;
}

.file-remove-btn:hover {
    transform: scale(1.1);
    background: rgba(239, 68, 68, 1);
}

.file-remove-btn svg {
    width: 16px;
    height: 16px;
}

/* Responsive adjustments for upload UI */
@media (max-width: 767px) {
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-title {
        font-size: 1.25rem;
    }
    
    .upload-description {
        font-size: 0.875rem;
    }
    
    .uploaded-files-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .uploaded-file-card {
        padding: 0.75rem;
    }
    
    .file-thumbnail {
        height: 100px;
    }
}
