/* Modal Background */
.souleyes-modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    background-color: rgba(0,0,0,0.85); 
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

/* Modal Content */
.souleyes-modal-content {
    background-color: #fff;
    margin: auto;
    padding: 60px 40px;
    border: none;
    width: 90%;
    max-width: 900px;
    border-radius: 20px;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; /* Modern Fallback */
    animation: slideUp 0.4s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

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

/* Close Button */
.souleyes-close {
    color: #333;
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.2s;
    line-height: 1;
}

.souleyes-close:hover {
    color: #000;
    transform: rotate(90deg);
}

/* Headings */
.quiz-step h3 {
    font-size: 28px;
    margin-bottom: 40px;
    color: #333;
    font-weight: 600;
}

/* Steps Animation */
.quiz-step {
    display: none;
    animation: fadeIn 0.5s;
}

.quiz-step.active {
    display: block;
}

@keyframes fadeIn {
    from {opacity: 0; transform: scale(0.98);}
    to {opacity: 1; transform: scale(1);}
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 30px 0 50px;
    text-align: left;
}

/* Hide Radio Buttons */
.options-grid input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Custom Labels */
.options-grid label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: 16px;
    font-weight: 500;
    color: #555;
    background: #fff;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.options-grid label:hover {
    border-color: #FFB738;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 183, 56, 0.2);
}

/* Selected State - We need JS to add class or use :checked selector trick */
.options-grid input[type="radio"]:checked + span {
    /* This targets the span inside label if structure is input + span */
}

/* Since the structure is label > input + span, we can't style label based on input checked with pure CSS easily without :has() which is newer.
   Let's use a sibling selector approach if we can, or rely on the focus ring for now.
   Actually, better to use the :checked pseudo-class on the input to style the sibling span, 
   BUT we want to style the LABEL container. 
   
   Workaround: We will use a small JS snippet or rely on modern :has() selector if supported, 
   but for compatibility let's just style the SPAN inside to look like a button or card content.
   
   BETTER APPROACH: Let's style the SPAN to fill the label? 
   No, let's stick to simple CSS. We will add a 'selected' class via JS in the next step update if needed, 
   but for now let's use the :checked + span to make the text bold/colored.
*/

.options-grid input[type="radio"]:checked + span {
    color: #FFB738;
    font-weight: 700;
}

/* However, to style the border of the label, we can use :focus-within on the label */
.options-grid label:focus-within {
    border-color: #FFB738;
    background-color: #fff8e8;
    box-shadow: 0 0 0 4px rgba(255, 183, 56, 0.1);
}

/* Buttons */
.souleyes-quiz-trigger {
    padding: 14px 30px;
    font-size: 18px;
    background-color: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s;
    font-weight: 600;
}

.souleyes-quiz-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.next-step, .prev-step, #send-results {
    padding: 14px 35px;
    margin: 10px;
    font-size: 16px;
    cursor: pointer;
    background-color: #FFB738; /* Requested Color */
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.product-btn {
    padding: 10px 20px;
    margin: 10px;
    font-size: 14px;
    cursor: pointer;
    background-color: #FFB738; /* Requested Color */
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
    text-decoration: none;
}

.next-step:hover, #send-results:hover, .product-btn:hover {
    background-color: #e5a02e; /* Slightly darker for hover */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 183, 56, 0.3);
}

.prev-step {
    background-color: transparent;
    color: #999;
    border: 2px solid #eee;
}

.prev-step:hover {
    background-color: #f5f5f5;
    color: #666;
    border-color: #ddd;
    box-shadow: none;
}

/* Results Section */
.step-results h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #222;
}

.step-results .subtitle {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #666;
    line-height: 1.6;
}

.step-results .brand {
    font-weight: 700;
    margin-bottom: 40px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #000;
    font-size: 0.9em;
}

.recommended-products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    width: 100%;
}

.product-item {
    background: #fff;
    border: 1px solid #f0f0f0;
    padding: 20px;
    border-radius: 16px;
    transition: all 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.product-item:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.product-item img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.product-item h4 {
    margin: 10px 0 15px;
    font-size: 1.1em;
    color: #333;
}

.product-btn {
    display: inline-block;
    padding: 10px 25px;
    font-size: 14px;
    text-decoration: none;
}

.promo-section {
    background-color: #fff8e8; /* Light orange match */
    color: #d48806;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    font-weight: 600;
    display: inline-block;
    min-width: 300px;
    border: 1px dashed #FFB738;
}

.email-capture {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.email-capture p {
    margin-bottom: 15px;
    color: #555;
}

.email-capture input {
    padding: 15px 20px;
    width: 300px;
    max-width: 100%;
    margin-right: 10px;
    border: 2px solid #eee;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.email-capture input:focus {
    border-color: #FFB738;
}

/* Input Styles for Step 0 */
.input-group {
    margin-bottom: 25px;
}

.input-group input {
    width: 100%;
    max-width: 400px;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #eee;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
    text-align: center;
}

.input-group input:focus {
    border-color: #FFB738;
    box-shadow: 0 0 10px rgba(255, 183, 56, 0.2);
}

.hidden {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .souleyes-modal-content {
        padding: 30px 20px;
        width: 95%;
        border-radius: 15px;
    }

    .quiz-step h3 {
        font-size: 22px;
    }
    
    .options-grid {
        grid-template-columns: 1fr; /* Stack on mobile */
    }
    
    .recommended-products {
        grid-template-columns: 1fr;
    }
    
    .product-item {
        width: 100%;
    }
    
    .email-capture input {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .product-btn {
        width: auto;
        padding: 8px 16px;
        font-size: 13px;
    }
}
