:root {
    --color-bg: #f5f7fa;
    --color-primary: #2a9d8f;
    /* Teal */
    --color-secondary: #264653;
    /* Dark Blue-Green */
    --color-accent: #e9c46a;
    /* Muted Gold */
    --color-text: #333333;
    --color-text-light: #666666;
    --color-white: #ffffff;
    --radius-card: 16px;
    --shadow-card: 0 10px 20px rgba(0, 0, 0, 0.05);
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.3s ease;
    --color-red: #e76f51;
    /* Urgent Red */
    --color-urgent-green: #388e3c;
    /* Standard sale green */
    --color-urgent-green-hover: #2e7d32;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hide Scrollbar */
html,
body {
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow-x: hidden;
    width: 100%;
}

body::-webkit-scrollbar {
    display: none;
}

.app-wrapper {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    box-sizing: border-box;
}

/* Mobile-only Width Override */
.app-wrapper {
    max-width: 480px !important;
    width: 100% !important;
    margin: 0 auto !important;
    /* Center on desktop */
    padding: 10px !important;
    background: white;
    /* Optional: differentiate from body bg if needed */
    /* min-height: 100vh; */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    /* Add shadow for better desktop look */
}

/* Ensure body background is distinct on desktop to show the "phone" effect */
body {
    background: #e0e0e0;
    /* Gray background outside phone area */
}

.app-header {
    text-align: center;
    margin-bottom: 30px;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin: 0;
}

.quiz-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    background: var(--color-primary);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Cards */
.card {
    background: var(--color-white);
    padding: 30px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-button {
    padding: 15px 20px;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    color: var(--color-text);
    width: 100%;
}

.option-button:hover {
    background: #f0fcfb;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Feedback & Doctor Persona */
.feedback-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 10px;
}

.doctor-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.doctor-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0f2f1;
}

.doctor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.doctor-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-secondary);
}

.doctor-title {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.feedback-bubble {
    background: #f4fbfb;
    border-left: 4px solid var(--color-primary);
    padding: 20px;
    border-radius: 0 12px 12px 0;
}

.feedback-text {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--color-secondary);
    margin: 0;
    font-style: italic;
}

.next-button {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.next-button:hover {
    background: #238b7e;
    transform: translateY(-1px);
}

/* DOORS GAME & FORM */
.cta *,
.door {
    padding: 0 !important
}

.cta *,
.door__title {
    text-indent: 0 !important
}

.door,
.door__container {
    display: flex !important;
    position: relative !important
}

.door,
.door__container,
.door__item {
    position: relative !important
}

.door,
.order__body,
.order__header {
    -webkit-box-direction: normal !important;
    -webkit-box-orient: vertical !important
}

.door__title,
.order__price-zero,
.spin__btn {
    text-transform: uppercase !important
}

.cta * {
    margin: 0 !important;
    -webkit-margin-before: 0 !important;
    -webkit-margin-end: 0 !important;
    -webkit-margin-after: 0 !important;
    -webkit-margin-start: 0 !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
    border: 0 transparent !important;
    font-size: 100% !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
    line-height: 1.3 !important;
    box-shadow: none !important
}

.cta {
    max-width: 780px !important;
    margin: 25px auto !important
}

.door,
.order {
    margin: 0 auto !important
}

.door {
    flex-flow: column !important;
    gap: 15px !important;
    height: 360px !important;
    min-width: 280px !important;
    max-width: 340px !important;
    transition: opacity .4s linear, height .5s linear .6s !important
}

.door__title,
.order,
.order__input {
    padding: 15px !important
}

.door.hidden {
    height: 0 !important;
    opacity: 0 !important
}

.door.none {
    display: none !important
}

.door__title {
    border-radius: .5em !important;
    font: 700 22px/1.3 "PT Sans, sans-serif" !important;
    text-align: center !important;
    color: #fff !important;
    background-color: #3a4752 !important
}

.door__container {
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
    -webkit-box-align: center !important;
    -webkit-box-pack: justify !important;
    -ms-flex-align: center !important;
    -ms-flex-pack: justify !important
}

.door__item {
    cursor: pointer !important;
    z-index: 10 !important;
    width: 100% !important;
    height: 200px !important;
    min-width: 85px !important;
    box-shadow: inset -1px -1px 0 1px #191919, inset 1px 1px 0 1px #191919 !important;
    perspective: 500px !important
}

.order,
.spin__content {
    min-width: 270px !important
}

.door__item.open>.door__item-img {
    transform: rotateY(-85deg) !important
}

.door__item-discount {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    display: inline-block !important;
    width: 70px !important;
    border-radius: 100% !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    text-align: center !important;
    line-height: 70px !important;
    color: red !important;
    transform: translateX(-50%) translateY(-50%) !important;
    vertical-align: baseline !important;
    box-shadow: 0 0 2px 2px #7f7878 !important
}

.order,
.order__input,
.order__select {
    position: relative !important
}

.door__item-img {
    cursor: pointer !important;
    width: inherit !important;
    height: inherit !important;
    transform: rotateY(0) !important;
    transform-origin: 0% 0% !important;
    transition: transform .75s !important;
    transition: transform .75s, -webkit-transform .75s !important
}

.door__item-img:hover {
    transform: rotateY(-30deg) !important
}

.spin {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1000 !important;
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, .2) !important;
    align-items: flex-start !important;
    padding-top: 50px !important;
    overflow-y: auto !important;
}

.spin.active {
    display: flex !important;
}

.spin__content {
    background: white;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    border-radius: 10px;
    position: relative !important;
    margin: 20px auto !important;
}

.spin__icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.spin__title {
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 10px;
}

.cta__name-product {
    font-weight: bold;
    color: var(--color-secondary);
}

.spin__btn {
    background: var(--color-urgent-green) !important;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 20px;
    font-weight: bold;
}

.spin__btn:hover {
    background: var(--color-urgent-green-hover) !important;
}

/* Order Form Styles */
.order {
    display: none;
    padding: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    background: #fff;
    box-sizing: border-box;
}

.order.active {
    display: block !important;
}

.doctor-recommendation-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px !important;
    color: var(--color-primary);
    text-align: left !important;
}

.avatar-small {
    width: 70px !important;
    height: 70px !important;
    border-radius: 50% !important;
    overflow: hidden;
    border: 2px solid var(--color-primary) !important;
    flex-shrink: 0 !important;
    aspect-ratio: 1/1 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #e0f2f1;
    margin-right: 15px !important;
    min-width: 70px !important;
}

.avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px !important;
    margin-bottom: 15px !important;
    text-align: center;
}

.order__img {
    max-width: 250px !important;
    width: 100%;
    margin-bottom: 5px !important;
}

.order__deadline {
    background: #e8f5e9 !important;
    border: 2px solid var(--color-urgent-green) !important;
    padding: 10px !important;
    border-radius: 12px;
    width: 100%;
    margin: 10px 0 !important;
}

.order__text {
    font-size: 14px !important;
    margin-bottom: 5px !important;
}

.highlight-text {
    font-weight: bold;
    color: var(--color-urgent-green) !important;
    font-size: 1.1rem;
}

.order__time {
    font-size: 1.5rem !important;
    font-weight: 800;
    color: var(--color-urgent-green) !important;
    font-family: monospace;
}

.order__price {
    display: flex;
    gap: 10px !important;
    align-items: baseline;
    justify-content: center;
    font-size: 18px !important;
}

.order__price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 1.2rem;
}

.order__price-new {
    color: var(--color-urgent-green) !important;
    font-size: 1.5rem !important;
    font-weight: 800;
}

.currency {
    font-size: 0.8em;
    margin-left: 4px;
}

.order__input {
    width: 100%;
    padding: 10px 15px !important;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px !important;
    box-sizing: border-box;
    height: 45px !important;
    margin-bottom: 15px;
}

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

.order__btn {
    background: var(--color-urgent-green) !important;
    color: white;
    border: none;
    padding: 10px !important;
    font-size: 1rem !important;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    min-height: 45px !important;
    margin-top: 10px !important;
    white-space: normal !important;
    line-height: 1.2 !important;
    animation: pulse 2s infinite !important;
}

.order__btn:hover {
    background: var(--color-urgent-green-hover) !important;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(56, 142, 60, 0.4);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 4px 20px rgba(56, 142, 60, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(56, 142, 60, 0.4);
    }
}

.order__footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #666;
}

/* Door Improvements */
.door__item-discount {
    background-color: #ffffff !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
    width: 60px !important;
    height: 60px !important;
    line-height: 60px !important;
    font-size: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid var(--color-primary) !important;
}

@media all and (min-width: 475px) {
    .door__item {
        width: 90px !important;
        height: 180px !important;
    }
}

@media all and (min-width: 576px) {
    .door__item {
        width: 100px !important;
        height: 220px !important;
        max-width: 120px !important;
    }
}

@media all and (min-width: 768px) {
    .door__item {
        width: 110px !important;
        height: 240px !important;
    }
}

@media all and (min-width: 992px) {
    .door__item {
        width: 120px !important;
        height: 260px !important;
    }
}

.door__container {
    margin-top: 20px !important;
    justify-content: center !important;
    gap: 20px !important;
}

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

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success View */
.success-view {
    text-align: center;
    padding: 40px 20px;
    display: none;
}

.success-view.active {
    display: block;
}

.app-footer {
    text-align: center;
    padding: 20px;
    color: var(--color-text-light);
    font-size: 0.9rem;
}