/* ============================================
   ADAPTONE FOUNDATION QUIZ - STYLES
   Inspired by IL Makiage PowerMatch Quiz
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #8B2252;
    --primary-hover: #6d1a40;
    --secondary-color: #2c2c2c;
    --text-color: #1a1a1a;
    --text-light: #666;
    --background: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #4CAF50;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Montserrat', -apple-system, sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background: var(--background);
    line-height: 1.6;
    min-height: 100vh;
}

/* Quiz Container */
.quiz-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--secondary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.login-link {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
}

.login-link:hover {
    color: var(--primary-color);
}

.cart-icon {
    cursor: pointer;
    transition: var(--transition);
}

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

/* Progress Bar */
.progress-container {
    padding: 30px 0 20px;
}

.progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #a8325f);
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    position: relative;
}

.marker {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
}

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

.marker.completed {
    background: var(--success-color);
    color: white;
}

/* Quiz Content */
.quiz-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    animation: fadeIn 0.4s ease;
}

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

/* Step Styles */
.step {
    width: 100%;
    max-width: 700px;
    text-align: center;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.step-question {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.3;
}

.step-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 40px;
    font-weight: 300;
}

/* Options Grid */
.options-grid {
    display: grid;
    gap: 15px;
    margin-top: 30px;
}

.options-grid.single-column {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 30px auto 0;
}

.options-grid.two-columns {
    grid-template-columns: repeat(2, 1fr);
}

.options-grid.three-columns {
    grid-template-columns: repeat(3, 1fr);
}

.options-grid.five-columns {
    grid-template-columns: repeat(5, 1fr);
}

.options-grid.six-columns {
    grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 600px) {
    .options-grid.six-columns {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Option Card */
.option-card {
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.option-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.option-card.selected {
    border-color: var(--primary-color);
    background: rgba(139, 34, 82, 0.05);
}

.option-card.selected::after {
    content: '';
}

.option-card.has-image {
    padding-top: 15px;
}

.option-card-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
}

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

.option-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.option-card-description {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 300;
}

/* List Option */
.option-list-item {
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 22px 30px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.option-list-item:hover {
    border-color: var(--primary-color);
    background: rgba(139, 34, 82, 0.02);
}

.option-list-item.selected {
    border-color: var(--primary-color);
    background: rgba(139, 34, 82, 0.08);
}

/* Radio/Checkbox Options (Horizontal) */
.options-radio {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.radio-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.radio-circle {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    transition: var(--transition);
    position: relative;
}

.radio-option:hover .radio-circle {
    border-color: var(--primary-color);
}

.radio-option.selected .radio-circle {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.radio-option.selected .radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-label {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    max-width: 100px;
}

/* Skin Tone Swatches */
.skin-tone-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

@media (min-width: 600px) {
    .skin-tone-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.skin-tone-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    transition: var(--transition);
}

.skin-tone-option:hover {
    background: rgba(139, 34, 82, 0.05);
}

.skin-tone-option.selected {
    background: rgba(139, 34, 82, 0.08);
}

.skin-tone-option.selected .skin-swatch {
    box-shadow: 0 0 0 3px var(--primary-color);
}

.skin-swatch {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Skin tone gradients */
.skin-swatch.fair-light {
    background: linear-gradient(135deg, #fbe8dc 0%, #f5d5c8 50%, #edd0c3 100%);
}

.skin-swatch.light-medium {
    background: linear-gradient(135deg, #f5d5c0 0%, #e8c4a8 50%, #ddb896 100%);
}

.skin-swatch.medium {
    background: linear-gradient(135deg, #ddb896 0%, #c9a07a 50%, #b8926c 100%);
}

.skin-swatch.medium-tan {
    background: linear-gradient(135deg, #c9a07a 0%, #b08860 50%, #9a7550 100%);
}

.skin-swatch.tan-deep {
    background: linear-gradient(135deg, #9a7550 0%, #7d5c3e 50%, #6b4d32 100%);
}

.skin-swatch.deep-dark {
    background: linear-gradient(135deg, #6b4d32 0%, #4a3425 50%, #3d2a1e 100%);
}

.skin-tone-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-color);
}

/* Undertone Helper */
.undertone-helper {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.undertone-helper h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.undertone-helper p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.7;
}

.undertone-helper ul {
    list-style: none;
    margin-bottom: 25px;
}

.undertone-helper li {
    padding: 8px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.undertone-helper li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
}

.undertone-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.undertone-btn {
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.undertone-btn:hover {
    border-color: var(--primary-color);
}

/* Image Multi-select (GLOV style) */
.image-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 800px) {
    .image-options-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 500px) {
    .image-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.image-option {
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.image-option-img {
    width: 100%;
    aspect-ratio: 1 / 1.2;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: var(--transition);
}

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

.image-option:hover .image-option-img {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.image-option.selected .image-option-img {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(139, 34, 82, 0.3);
}

.image-option.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.image-option-label {
    background: var(--secondary-color);
    color: white;
    padding: 10px 8px;
    border-radius: 0 0 12px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: -12px;
    position: relative;
}

/* Multi-select Options */
.option-list-item.multi-select {
    display: flex;
    align-items: center;
    gap: 15px;
}

.checkbox-indicator {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    flex-shrink: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-list-item.selected .checkbox-indicator {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.option-list-item.selected .checkbox-indicator::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Transition Screen */
.transition-screen {
    text-align: center;
    padding: 40px 20px;
}

.transition-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.transition-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.transition-text {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.feature-list {
    list-style: none;
    max-width: 400px;
    margin: 0 auto;
}

.feature-list li {
    padding: 12px 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-list li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Loading/Processing Screen */
.processing-screen {
    text-align: center;
    padding: 60px 20px;
}

.processing-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 3px;
    margin-bottom: 30px;
}

.processing-bar {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin: 0 auto 15px;
    overflow: hidden;
}

.processing-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #a8325f);
    border-radius: 4px;
    animation: processBar 3s ease-in-out forwards;
}

@keyframes processBar {
    0% { width: 0%; }
    30% { width: 35%; }
    60% { width: 65%; }
    80% { width: 85%; }
    100% { width: 100%; }
}

.processing-percent {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 50px;
}

/* Testimonial */
.testimonial {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
}

.testimonial-text {
    font-size: 1rem;
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-color);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #a8325f);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.testimonial-info {
    text-align: left;
}

.testimonial-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.testimonial-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Email Capture */
.email-screen {
    text-align: center;
    padding: 40px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.email-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.email-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.7;
}

.email-benefits {
    list-style: none;
    margin-bottom: 30px;
    text-align: left;
}

.email-benefits li {
    padding: 10px 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.email-benefits li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
}

.email-form {
    margin-bottom: 20px;
}

.email-input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: var(--transition);
    margin-bottom: 15px;
}

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

.email-input::placeholder {
    color: #999;
}

.email-submit {
    width: 100%;
    padding: 18px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
}

.email-submit:hover {
    background: var(--primary-hover);
}

.email-privacy {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Results Screen */
.results-screen {
    text-align: center;
}

.results-header {
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    color: white;
    padding: 40px 20px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.results-tagline {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 15px;
}

.results-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.results-product-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.results-shade-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid white;
}

.results-product-name {
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 1px;
}

.results-shade-name {
    font-size: 0.9rem;
    opacity: 0.8;
}

.results-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .results-content {
        grid-template-columns: 1fr;
    }
}

.product-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: #f8f8f8;
    border-radius: 12px;
}

.product-image {
    max-width: 250px;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.15));
}

.product-image-placeholder {
    width: 200px;
    height: 300px;
    background: linear-gradient(135deg, #e0e0e0, #f0f0f0);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.product-image-placeholder svg {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.product-details {
    text-align: left;
}

.product-name {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 5px;
}

.product-type {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.product-price .original {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-right: 10px;
}

.product-price .discount {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.shade-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
}

.shade-preview {
    width: 50px;
    height: 50px;
    border-radius: 8px;
}

.shade-info {
    font-weight: 600;
}

.product-cta {
    width: 100%;
    padding: 18px 30px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 15px;
}

.product-cta:hover {
    background: #333;
}

.product-note {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 25px;
}

.product-benefits {
    list-style: none;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
}

.product-benefits li {
    padding: 8px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-benefits li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
}

/* Buttons */
.btn {
    padding: 16px 40px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid;
    font-family: var(--font-body);
}

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

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

.btn-primary:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--secondary-color);
}

/* Navigation */
.quiz-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
}

.quiz-nav.hidden {
    display: none;
}

/* Welcome Screen */
.welcome-screen {
    text-align: center;
    padding: 40px 20px;
}

.welcome-badge {
    display: inline-block;
    background: rgba(139, 34, 82, 0.1);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 25px;
}

.welcome-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.welcome-cta {
    padding: 18px 50px;
    font-size: 1.1rem;
}

.welcome-trust {
    margin-top: 30px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.welcome-trust strong {
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 600px) {
    .step-question {
        font-size: 1.5rem;
    }

    .options-grid.two-columns,
    .options-grid.three-columns {
        grid-template-columns: 1fr;
    }

    .options-radio {
        flex-direction: column;
        align-items: center;
    }

    .radio-option {
        flex-direction: row;
        width: 100%;
        max-width: 300px;
        justify-content: flex-start;
        padding: 15px;
        border: 2px solid var(--border-color);
        border-radius: 8px;
    }

    .radio-option.selected {
        border-color: var(--primary-color);
        background: rgba(139, 34, 82, 0.05);
    }

    .radio-label {
        text-align: left;
        max-width: none;
    }

    .skin-swatch {
        width: 60px;
        height: 60px;
    }

    .quiz-nav {
        flex-direction: column;
    }

    .quiz-nav .btn {
        width: 100%;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .results-title {
        font-size: 1.8rem;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease;
}

.slide-up {
    animation: slideUp 0.4s ease;
}

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

/* Hide elements */
.hidden {
    display: none !important;
}

/* ============================================
   ANALYTICS ADMIN PANEL
   ============================================ */
.analytics-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: #1a1a1a;
    color: #fff;
    box-shadow: -5px 0 30px rgba(0,0,0,0.3);
    z-index: 10000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.analytics-panel.open {
    right: 0;
}

.analytics-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    background: #1a1a1a;
}

.analytics-panel-header h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
}

.analytics-close {
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.analytics-close:hover {
    color: #fff;
}

.analytics-panel-content {
    padding: 20px;
}

.analytics-empty {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

.analytics-empty p {
    margin: 10px 0;
}

/* Stats Summary */
.analytics-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Funnel Chart */
.analytics-panel h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 15px;
}

.funnel-chart {
    margin-bottom: 30px;
}

.funnel-row {
    display: grid;
    grid-template-columns: 100px 1fr 50px 40px;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.funnel-label {
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.funnel-bar-container {
    background: #2a2a2a;
    border-radius: 4px;
    height: 24px;
    overflow: hidden;
}

.funnel-bar {
    background: linear-gradient(90deg, var(--primary-color), #a8325f);
    height: 100%;
    border-radius: 4px;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    transition: width 0.3s ease;
}

.funnel-bar-value {
    color: #fff;
    font-weight: 600;
    font-size: 0.75rem;
}

.funnel-dropoff {
    text-align: right;
    color: #888;
}

.funnel-dropoff.high {
    color: #ff6b6b;
    font-weight: 600;
}

.funnel-time {
    text-align: right;
    color: #666;
    font-size: 0.75rem;
}

/* Analytics Actions */
.analytics-actions {
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.analytics-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #333;
    color: #fff;
}

.analytics-btn:hover {
    background: #444;
}

.analytics-btn.danger {
    background: #4a2828;
    color: #ff6b6b;
}

.analytics-btn.danger:hover {
    background: #5a3030;
}

/* ============================================
   QUIZ IMAGES
   ============================================ */

/* Welcome Hero Image */
.welcome-hero-image {
    max-width: 320px;
    margin: 0 auto 30px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(139, 34, 82, 0.2);
}

.welcome-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* Step Visual Images (coverage, finish, skin tone) */
.step-visual {
    max-width: 500px;
    margin: 0 auto 30px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f8f8;
    padding: 20px;
}

.step-visual img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.step-visual.skin-tone-visual {
    max-width: 600px;
    padding: 15px;
    background: transparent;
}

/* Product Image on Results */
.product-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Responsive adjustments for images */
@media (max-width: 600px) {
    .welcome-hero-image {
        max-width: 220px;
        margin-bottom: 20px;
    }

    .step-visual {
        max-width: 100%;
        padding: 15px;
        margin-bottom: 20px;
    }

    .step-visual.skin-tone-visual {
        padding: 10px;
    }
}
