

:root {
    --bg-main: #f1f5f9;
    --bg-panel: #ffffff;
    --border-color: rgba(15, 23, 42, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;

    --color-primary: #6366f1;
    --color-primary-glow: rgba(99, 102, 241, 0.1);
    --color-accent: #0d9488;
    --color-accent-glow: rgba(13, 148, 136, 0.05);

    --color-red: #f43f5e;
    --color-pink: #ec4899;
    --color-yellow: #f59e0b;
    --color-blue: #38bdf8;
    --color-purple: #818cf8;

    --font-family: 'Plus Jakarta Sans', sans-serif;
    --radius-lg: 12px;
    --radius-md: 8px;
    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    padding: 20px 0;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.6);
}

.app-container {
    width: 100%;
    max-width: 1240px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.banner_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 800;
}

.brand-icon {
    color: var(--color-primary);
}

.logo .highlight {
    color: var(--color-accent);
}

.hadernav-title {
    display: flex;
    gap: 6px;
    font-weight: 800;
    font-size: 1.1rem;
}

.hadernav-title .soida {
    color: var(--text-primary);
}

.hadernav-title .online {
    color: var(--text-secondary);
}

.hadernav-title .ai {
    color: var(--color-accent);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.active {
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.status-dot.warning {
    background-color: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
    animation: pulse 1.5s infinite alternate;
}

.main-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 20px;
}

.main-grid.single-column {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

.panel-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.panel-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 4px;
}

.viewport-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #020617;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#webcamVideo {
    display: none;
}

#displayCanvas {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

.face-guide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s var(--transition);
}

.face-guide-overlay.active {
    opacity: 1;
}

.oval-helper {
    width: 58%;
    height: 76%;
    border: 2px dashed rgba(139, 92, 246, 0.6);
    border-radius: 50% / 55% 55% 45% 45%;
    box-shadow: 0 0 0 9999px rgba(11, 15, 25, 0.65);
}

.scanning-laser {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    box-shadow: 0 0 12px var(--color-accent);
    z-index: 4;
    pointer-events: none;
    display: none;
}

.scanning-laser.active {
    display: block;
    animation: scanAnimation 2s ease-in-out infinite;
}

.viewport-alert {
    position: absolute;
    bottom: 16px;
    background: rgba(239, 68, 68, 0.85);
    border: 1px solid rgba(239, 68, 68, 0.2);
    backdrop-filter: blur(8px);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.viewport-alert.visible {
    opacity: 1;
    transform: translateY(0);
}

.spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.9);
    z-index: 6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.spinner-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(139, 92, 246, 0.15);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.controls-container {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 10;
    flex-wrap: nowrap;
}

.btn {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    transition: var(--transition);
    flex: 1;
    position: relative;
    white-space: nowrap;
    min-width: 0;
}

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

.btn-primary:hover:not(:disabled) {
    background: #4f46e5;
}

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

.btn-accent:hover:not(:disabled) {
    background: #0f766e;
}

.btn-glow::after {
    display: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.upload-btn-wrapper {
    position: relative;
    overflow: hidden;
    flex: 1;
}

.upload-btn-wrapper button {
    width: 100%;
}

.upload-btn-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ai-skin__result-checkContainer {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.checkbox-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.ai-skin__result-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
    user-select: none;
}

.ai-skin__result-checkbox input {
    display: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid rgba(15, 23, 42, 0.25);
    position: relative;
    transition: var(--transition);
}

.ai-skin__result-checkbox input:checked+.checkbox-custom {
    border-color: transparent;
}

.ai-skin__result-checkbox input:checked+.checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 9px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-custom.red {
    background-color: transparent;
}

.ai-skin__result-checkbox input:checked+.checkbox-custom.red {
    background-color: var(--color-red);
}

.checkbox-custom.pink {
    background-color: transparent;
}

.ai-skin__result-checkbox input:checked+.checkbox-custom.pink {
    background-color: var(--color-pink);
}

.checkbox-custom.black {
    background-color: transparent;
}

.ai-skin__result-checkbox input:checked+.checkbox-custom.black {
    background-color: #374151;
    border-color: rgba(255, 255, 255, 0.3);
}

.checkbox-custom.yellow {
    background-color: transparent;
}

.ai-skin__result-checkbox input:checked+.checkbox-custom.yellow {
    background-color: var(--color-yellow);
}

.checkbox-custom.purple {
    background-color: transparent;
}

.ai-skin__result-checkbox input:checked+.checkbox-custom.purple {
    background-color: var(--color-purple);
}

.checkbox-label {
    transition: var(--transition);
}

.ai-skin__result-checkbox input:checked~.checkbox-label {
    color: var(--text-primary);
    font-weight: 500;
}

.results-panel {
    min-height: 500px;
}

.welcome-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-grow: 1;
    padding: 50px 20px;
    gap: 16px;
}

.welcome-icon-glow {
    font-size: 3rem;
    color: var(--color-primary);
    background: rgba(139, 92, 246, 0.08);
    padding: 20px;
    border-radius: 50%;
    animation: iconPulse 2s infinite alternate;
}

.welcome-state h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.welcome-state p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    max-width: 320px;
}

.section-divider-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 5px 0;
}

.section-divider-title span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}

.section-divider-title .line {
    height: 1px;
    flex-grow: 1;
    background: rgba(15, 23, 42, 0.08);
}

.skin-health-badge {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.05);
    padding: 14px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

.score-highlight {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-accent);
    margin-left: 4px;
}

.metrics-summary-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bar-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 500;
}

.bar-result {
    font-weight: 700;
}

.progress-bar-indicator {
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 1.2s ease-out;
}

.toneColorSkin {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tone-header {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.tone-header .title-primary {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.tone-header .title-secondary {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-top: 2px;
}

.center-image {
    width: 100%;
    height: 220px;
    background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: var(--radius-md);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.light-theme .center-image {
    background: radial-gradient(circle, #f8fafc 0%, #e2e8f0 100%) !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.preview-avatar-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px;
    width: 180px;
}

.preview-avatar-wrapper canvas {
    width: 85px;
    height: 85px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #f1f5f9;
    z-index: 2;
    margin-bottom: -18px; 
}

.tshirt-overlay {
    width: 110px;
    height: 110px;
    z-index: 1;
    color: #e1ad01;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
    transition: color 0.4s ease;
}

.descrptionSkinColor {
    font-size: 0.85rem;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 12px;
}

.descrptionSkinColor .bold-text {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.descrptionSkinColor p span {
    font-weight: 700;
    color: var(--color-red);
}

.palette-swatches-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.navbarColor {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 0;
    justify-content: center;
}

.containerSkin {
    flex-shrink: 0;
}

.skincolor {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.skincolor:hover {
    transform: scale(1.15);
}

.skincolor.activeSkin {
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.diagnostic-notes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.diagnostic-note-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.note-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
}

.note-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.ai-report-block {
    background: rgba(15, 23, 42, 0.015);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: var(--radius-lg);
    padding: 20px;
    line-height: 1.6;
}

.ai-markdown {
    font-family: 'Roboto', sans-serif;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-align: justify;
}

.ai-markdown p {
    margin-bottom: 12px;
}

.ai-markdown h1,
.ai-markdown h2,
.ai-markdown h3,
.ai-markdown h4 {
    color: var(--color-primary);
    font-weight: 700;
    margin: 16px 0 8px 0;
    font-size: 0.95rem;
}

.ai-markdown h1:first-child,
.ai-markdown h2:first-child {
    margin-top: 0;
}

.ai-markdown ul {
    margin-left: 18px;
    margin-bottom: 12px;
}

.ai-markdown li {
    margin-bottom: 6px;
}

.ai-markdown strong {
    color: var(--color-red) !important;
    font-weight: 700;
}

.ai-followup {
    margin-top: 15px;
    padding: 16px;
    font-family: 'Roboto', sans-serif;
    background: #111318;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-followup-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ai-followup-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 2px;
}

.ai-chat-messages {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 12px;
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-chat-message {
    display: flex;
    width: 100%;
}

.ai-chat-message--bot {
    justify-content: flex-start;
}

.ai-chat-message--user {
    justify-content: flex-end;
}

.ai-chat-bubble {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.4;
}

.ai-chat-message--bot .ai-chat-bubble {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top-left-radius: 2px;
}

.ai-chat-message--user .ai-chat-bubble {
    background: var(--color-primary);
    color: white;
    border-top-right-radius: 2px;
    box-shadow: 0 3px 8px var(--color-primary-glow);
}

.ai-chat-suggestions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-chat-suggestion {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.ai-chat-suggestion:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary);
}

.ai-chat-input {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.ai-chat-input textarea {
    flex: 1;
    min-height: 38px;
    max-height: 80px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-primary);
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.8rem;
    resize: none;
}

.ai-chat-input textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.ai-chat-send {
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.ai-chat-send:hover {
    background: #7c3aed;
    box-shadow: 0 4px 10px var(--color-primary-glow);
}

.routine-recommendations {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.routine-recommendations h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-accent);
}

.routine-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.step-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.step-num {
    background: rgba(139, 92, 246, 0.15);
    color: #c084fc;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.step-info {
    display: flex;
    flex-direction: column;
}

.step-name {
    font-size: 0.78rem;
    font-weight: 600;
}

.step-prod {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.button-row {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.floating-contact {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 999;
}

.main-contact-btn {
    width: 50px;
    height: 50px;
    background: #0084ff;
    color: white;
    font-size: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: var(--transition);
    animation: bouncePulse 2s infinite;
    text-decoration: none;
}

.main-contact-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 132, 255, 0.5);
}

footer {
    text-align: center;
    padding: 16px 0;
    font-size: 0.7rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.12);
        opacity: 1;
    }
}

@keyframes iconPulse {
    0% {
        box-shadow: 0 0 10px rgba(139, 92, 246, 0.1);
    }

    100% {
        box-shadow: 0 0 25px rgba(139, 92, 246, 0.3);
    }
}

@keyframes buttonPulse {
    0% {
        opacity: 0.2;
        box-shadow: 0 0 4px var(--color-accent);
    }

    100% {
        opacity: 0.5;
        box-shadow: 0 0 12px var(--color-accent);
    }
}

@keyframes scanAnimation {
    0% {
        top: 0%;
        opacity: 0.8;
    }

    50% {
        top: 100%;
        opacity: 0.8;
    }

    100% {
        top: 0%;
        opacity: 0.8;
    }
}

@keyframes bouncePulse {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-4px) scale(1.05);
    }
}

@media print {
    body {
        background: white !important;
        color: black !important;
        padding: 0 !important;
    }

    .app-container {
        max-width: 100% !important;
        padding: 0 !important;
        gap: 15px !important;
    }

    header,
    .scanner-panel,
    .controls-container,
    .button-row,
    .floating-contact,
    footer,
    #aiFollowupChat {
        display: none !important;
    }

    .main-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    .results-panel {
        background: white !important;
        color: black !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .report-state {
        display: flex !important;
    }

    .skin-health-badge {
        background: #f3f4f6 !important;
        border: 1px solid #d1d5db !important;
        color: black !important;
    }

    .score-highlight {
        color: #6d28d9 !important;
        text-shadow: none !important;
    }

    .progress-bar-container {
        background: #e5e7eb !important;
        border: 1px solid #ccc !important;
    }

    .toneColorSkin,
    .diagnostic-note-card,
    .ai-report-block,
    .routine-recommendations {
        background: white !important;
        border: 1px solid #e5e7eb !important;
        color: black !important;
    }

    .ai-markdown {
        color: black !important;
    }
}

.detailed-analysis-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.analysis-card-body {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.analysis-card-image {
    flex: 0 0 120px;
    width: 120px;
    height: 160px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.analysis-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.analysis-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.analysis-card-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.analysis-card-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.analysis-card-info li {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
    text-align: left;
}

.analysis-card-info li strong.score-highlight {
    color: #ef4444;
    
    font-weight: 700;
    font-size: inherit;
    margin-left: 4px;
}

body.light-theme .detailed-analysis-card {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    color: black !important;
}

@media print {
    .detailed-analysis-card {
        background: #f9fafb !important;
        border: 1px solid #e5e7eb !important;
        color: black !important;
    }

    .analysis-card-info h4 {
        color: #111827 !important;
    }

    .analysis-card-info li {
        color: #4b5563 !important;
    }

    .analysis-card-image {
        border-color: #d1d5db !important;
    }
}

.general-result-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.general-result-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 14px;
}

.general-card-body {
    display: flex;
    gap: 16px;
    align-items: center;
}

.general-card-icon {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
}

.general-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.general-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.general-card-info h5 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}

.general-card-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.general-card-info li {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.3;
    text-align: left;
}

.general-card-info li strong.score-highlight {
    color: #a78bfa;
    
    font-weight: 700;
    font-size: inherit;
    margin-left: 2px;
}

body.light-theme .general-result-card {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    color: black !important;
}

@media print {
    .general-result-card {
        background: #f9fafb !important;
        border: 1px solid #e5e7eb !important;
        color: black !important;
    }

    .general-card-info h5 {
        color: #111827 !important;
    }

    .general-card-info li {
        color: #4b5563 !important;
    }
}

.skin-health-badge-clinical {
    text-align: center;
    margin: 20px 0 15px 0;
}

.skin-health-badge-clinical h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #3b82f6;
    
}

.score-highlight-clinical {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ef4444;
    
}

.status-rating {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ef4444;
    
    margin-top: 4px;
}

.result-canvas-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 15px auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #020617;
    position: relative;
}

.canvas-tooltip {
    position: absolute;
    pointer-events: none;
    padding: 6px 12px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f1f5f9;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    z-index: 100;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    transform: translate(-50%, -100%);
    margin-top: -10px;
    opacity: 0;
    transition: opacity 0.1s ease;
}

.canvas-tooltip.show {
    opacity: 1;
}

#resultBlemishCanvas {
    width: 100%;
    height: auto;
    display: block;
}

.blemish-legend-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.legend-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.dot-orange {
    background-color: var(--color-yellow);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.legend-dot.dot-green {
    background-color: var(--color-accent);
    
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.legend-dot.dot-empty {
    background-color: transparent;
    border: 1.5px solid var(--text-primary);
}

.legend-dot.dot-yellow {
    background-color: #facc15;
    
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.legend-dot.dot-pink {
    background-color: var(--color-pink);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

body.light-theme .legend-dot.dot-empty {
    border-color: #000;
}

.analysis-mode-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 12px;
    gap: 4px;
    position: relative;
    z-index: 10;
}

.mode-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px 14px;
    font-family: var(--font-family);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.mode-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.mode-btn.active {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

body.light-theme .analysis-mode-selector {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .mode-btn:hover {
    background: rgba(0, 0, 0, 0.02);
}

body.light-theme .mode-btn.active {
    background: var(--color-primary);
    color: white;
}

.results-page-container {
    max-width: 800px;
    margin: 0 auto;
}

.results-panel {
    background: var(--bg-panel) !important;
    border: 1px solid var(--border-color) !important;
    padding: 30px !important;
    border-radius: var(--radius-lg) !important;
}

@media (max-width: 768px) {
    .results-panel {
        padding: 16px !important;
    }
}

#modelStatus {
    display: none !important;
}

#spinnerMessage {
    color: #fff;
}

.conclusion-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 24px;
    padding: 10px 0;
}

.conclusion-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conclusion-meta {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.conclusion-meta .metric-status {
    font-weight: 700;
}

.metric-status.status-good {
    color: #10b981 !important;
}

.metric-status.status-normal {
    color: #f59e0b !important;
}

.metric-status.status-poor {
    color: #ef4444 !important;
}

.gradient-bar-wrapper {
    position: relative;
    width: 100%;
    margin-top: 35px;
}

.gradient-bar-bg {
    position: relative;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: visible;
}

body.light-theme .gradient-bar-bg {
    background: #e5e7eb !important;
}

.gradient-bar-track {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #22c55e 0%, #eab308 50%, #ef4444 100%);
    border-radius: 6px;
}

.gradient-bar-mask {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    background: #e5e7eb;
    border-radius: 0 6px 6px 0;
    transition: width 0.4s ease;
}

body.light-theme .gradient-bar-mask {
    background: #e5e7eb !important;
}

.score-pill {
    position: absolute;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 4px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    z-index: 5;
}

body.light-theme .score-pill {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

.score-pill::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

.score-pill::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #e5e7eb transparent transparent transparent;
    z-index: -1;
}

body.light-theme .score-pill::before {
    border-color: #cbd5e1 transparent transparent transparent !important;
}

.pill-title {
    font-size: 0.65rem;
    color: #64748b;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 2px;
}

body.light-theme .pill-title {
    color: #64748b !important;
}

.pill-value {
    font-size: 0.75rem;
    font-weight: 800;
    color: #ef4444;
    line-height: 1.1;
}

.bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 6px;
    font-weight: 600;
}

body.light-theme .bar-labels {
    color: #64748b !important;
}