/* Global Reset and Variables */
:root {
    --bg-dark: #121212;
    --bg-panel: #1e1e1e;
    --bg-card: #2c2c2c;
    --primary: #bd00ff;
    --primary-hover: #d54dff;
    --primary-dark: #8700b8;
    --text-main: #ffffff;
    --text-sub: #b3b3b3;
    --border-color: #3f3f3f;
    --border-active: #bd00ff;
    --shadow-main: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 15px rgba(189, 0, 255, 0.4);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-fast: 0.2s ease-in-out;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: #000;
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
}

#app-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--bg-dark);
    min-height: 100vh;
    box-shadow: var(--shadow-main);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    z-index: 10;
}

#go-back-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform var(--transition-fast), color var(--transition-fast);
}

#go-back-btn:hover {
    color: var(--primary);
    transform: translateX(-4px);
}

#go-back-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
}

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

/* Progress */
#progress-container {
    padding: 0 24px;
    margin-bottom: 24px;
    transition: opacity var(--transition-smooth);
}

#progress-container.hidden {
    display: none;
}

#progress-text {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 8px;
    text-align: center;
    font-weight: 600;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background-color: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
}

#progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%);
    width: 0%;
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-glow);
}

/* Main Content Area */
#main-content {
    flex: 1;
    padding: 0 24px 40px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Animation Classes */
.slide-in-right {
    animation: slideInRight 0.4s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-out-left {
    animation: slideOutLeft 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
    position: absolute;
    width: calc(100% - 48px);
}

.slide-in-left {
    animation: slideInLeft 0.4s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-out-right {
    animation: slideOutRight 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
    position: absolute;
    width: calc(100% - 48px);
}

.fade-in {
    animation: fadeIn 0.5s forwards;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutLeft {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-50px); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(50px); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Step Common Styles */
.step-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.step-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #dcdcdc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-subtitle {
    font-size: 1rem;
    color: var(--text-sub);
    text-align: center;
    margin-bottom: 32px;
}

/* Options Lists */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* Card Option Component */
.card-option {
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card-option::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(189, 0, 255, 0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.4s ease;
    border-radius: 50%;
}

.card-option:hover {
    background-color: var(--bg-panel);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-main);
}

.card-option:active {
    transform: scale(0.98);
}

.card-option.selected {
    border-color: var(--primary);
    background-color: rgba(189, 0, 255, 0.1);
    box-shadow: 0 0 15px rgba(189, 0, 255, 0.3);
}

.card-option.selected::before {
    transform: translate(-50%, -50%) scale(2);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 12px;
    z-index: 1;
}

.card-image-wrapper {
    width: 100%;
    height: 120px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
    z-index: 1;
}

.card-image {
    height: 190px; /* Overstretching the height inside hidden overflow to cut bottom */
    width: auto;
    object-fit: contain;
    object-position: top center;
}

/* Specific zoom fix to match the Female bust proportion on Page 1 */
img.card-image[alt="Masculino"] {
    transform: scale(1.4);
    transform-origin: top center;
    margin-top: 10px; /* Empurra um pouquinho para baixo caso escale e corte o topo da cabeça */
}

.image-full.card-image-wrapper {
    height: 120px;
}

.image-full .card-image {
    height: 120px;
}

.card-label {
    font-weight: 600;
    font-size: 1.1rem;
    z-index: 1;
}

.side-image-layout {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
    width: 100%;
}
.side-list {
    flex: 1;
    margin-bottom: 0 !important;
}
.side-image-container {
    flex: 0 0 100px;
    display: flex;
    justify-content: center;
}
.side-image {
    max-height: 280px;
    width: 100%;
    object-fit: contain;
}
@media (min-width: 768px) {
    .side-image-container {
        flex: 0 0 200px;
    }
    .side-image {
        max-height: 480px;
    }
}

/* List Option Component */
.list-option {
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.list-option:hover {
    background-color: var(--bg-panel);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-main);
}

.list-option.selected {
    border-color: var(--primary);
    background-color: rgba(189, 0, 255, 0.1);
    box-shadow: 0 0 15px rgba(189, 0, 255, 0.3);
}

.list-image-wrapper {
    height: 80px;
    width: 60px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.list-image {
    height: 140px;
    width: auto;
    object-fit: contain;
    object-position: top center;
}

.list-label {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Checkboxes */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
    cursor: pointer;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    background-color: var(--bg-dark);
}

.custom-checkbox i {
    color: var(--text-main);
    font-size: 12px;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition-fast);
}

.checkbox-container input {
    display: none;
}

.checkbox-container input:checked + .custom-checkbox {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkbox-container input:checked + .custom-checkbox i {
    opacity: 1;
    transform: scale(1);
}

.checkbox-text {
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.4;
}

.disclaimer {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-top: 24px;
}

/* Action Button */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #8700b8 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    border: none;
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(189, 0, 255, 0.3);
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(189, 0, 255, 0.5);
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-primary:disabled {
    background: var(--bg-card);
    color: var(--text-sub);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-primary.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(189, 0, 255, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(189, 0, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(189, 0, 255, 0); }
}

/* Info Pages */
.info-icon {
    font-size: 4rem;
    color: var(--primary);
    text-align: center;
    margin: 20px 0;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

.info-text {
    font-size: 1.1rem;
    color: var(--text-main);
    line-height: 1.6;
    text-align: center;
    margin-bottom: 30px;
}

/* Inputs */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.custom-input {
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    color: var(--text-main);
    font-size: 1.2rem;
    font-family: var(--font-body);
    outline: none;
    transition: all var(--transition-fast);
}

.custom-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(189, 0, 255, 0.1);
}

.unit-selector {
    display: flex;
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 16px;
}

.unit-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-sub);
    padding: 10px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.unit-btn.active {
    background-color: var(--bg-panel);
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Processing Wheel */
.processing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin-top: 50px;
}

.spinner {
    width: 120px;
    height: 120px;
    border: 8px solid var(--bg-card);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin-bottom: 30px;
}

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

/* Pricing Cards */
.pricing-card {
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.pricing-card.recommended {
    border-color: var(--primary);
    background: linear-gradient(to bottom, #2c2c2c 0%, #3a1a0f 100%);
}

.badge-recommended {
    position: absolute;
    top: 0;
    right: 32px;
    background-color: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 0 0 8px 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-main);
    margin-bottom: 4px;
    display: flex;
    align-items: baseline;
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-sub);
    font-weight: 500;
    margin-left: 4px;
}

.plan-desc {
    color: var(--text-sub);
    font-size: 0.95rem;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.feature-list {
    list-style: none;
    margin-bottom: 24px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.feature-item i {
    color: var(--primary);
}

.like-dislike-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.ld-item {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ld-item h4 {
    flex: 1;
    font-size: 1.1rem;
}

.ld-actions {
    display: flex;
    gap: 12px;
}

.ld-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: var(--bg-panel);
    color: var(--text-sub);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.ld-btn.like.active {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.ld-btn.dislike.active {
    background-color: rgba(244, 67, 54, 0.2);
    color: #F44336;
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.3);
}

.result-number {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 900;
    color: var(--primary);
    text-align: center;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(189, 0, 255, 0.4);
}

/* Modal */
.modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

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

.modal-content {
    background-color: var(--bg-panel);
    padding: 30px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 400px;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--border-color);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    text-align: center;
    color: white;
}

.modal-btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 700;
    margin-bottom: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.modal-btn-secondary {
    background-color: transparent;
    color: var(--text-sub);
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: background 0.2s;
}

/* Spacer for scrolling issues on mobile */
.bottom-spacer {
    height: 40px;
}

/* =========================================
   DESKTOP OPTIMIZATION 
   ========================================= */
@media (min-width: 768px) {
    body {
        background-color: #080808;
    }

    #app-container {
        max-width: 800px;
        margin: 40px auto;
        min-height: calc(100vh - 80px);
        border-radius: var(--radius-lg);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 20px rgba(189, 0, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    header {
        padding: 30px 40px;
    }
    
    #main-content {
        padding: 0 40px 50px 40px;
    }

    .step-title {
        font-size: 2.8rem;
        margin-bottom: 16px;
    }
    
    .step-subtitle {
        font-size: 1.15rem;
        margin-bottom: 40px;
    }

    /* Options sizing scaling */
    .options-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }
    
    .card-option {
        padding: 24px;
    }

    .card-icon {
        font-size: 3rem;
    }

    .options-list {
        max-width: 500px;
        margin: 0 auto 32px auto;
        width: 100%;
    }

    .like-dislike-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        max-width: 600px;
        margin: 0 auto 40px auto;
        width: 100%;
    }

    /* Checkboxes and Text Inputs */
    .checkbox-container {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .input-group,
    .unit-selector,
    .custom-input {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }

    /* Bottom Button Placement */
    .btn-primary {
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Pricing Section */
    .pricing-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        align-items: stretch;
        max-width: 100%;
    }
    
    .pricing-card {
        margin-bottom: 0;
    }
    
    .pricing-card .btn-primary {
        max-width: 100%;
    }
}
