/* How It Works Popup Styles */
.how-it-works-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    opacity: 0;
    animation: fadeIn 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.how-it-works-modal {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

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

.how-it-works-header {
    padding: 25px 25px 15px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.how-it-works-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.how-it-works-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.how-it-works-close:hover {
    background: #f0f0f0;
    color: #333;
}

.how-it-works-content {
    padding: 25px;
}

.how-it-works-intro {
    text-align: center;
    margin-bottom: 25px;
}

.how-it-works-intro p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.how-it-works-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.how-it-works-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 1rem;
    color: #555;
}

.step-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.how-it-works-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #f6782c;
    margin-bottom: 15px;
    text-align: center;
}

.how-it-works-feedback-section {
    margin-top: 20px;
}

.feedback-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.feedback-example {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.feedback-box {
    width: 100%;
    padding: 12px 8px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.95rem;
    text-align: center;
    color: white;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-box.correct {
    background: #28a745;
}

.feedback-box.too-high {
    background: #dc3545;
}

.feedback-box.much-too-high {
    background: #8b1a1a;
    border: 2px solid #dc3545;
}

.feedback-box.too-low {
    background: #ffc107;
    color: #333;
}

.feedback-box.much-too-low {
    background: #ff9800;
    border: 2px solid #ffc107;
}

.feedback-example span {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.how-it-works-example {
    background: #f8f9fa;
    border-left: 4px solid #f6782c;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.how-it-works-example-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.how-it-works-example-text {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.how-it-works-footer {
    padding: 20px 25px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    position: sticky;
    bottom: 0;
    background: white;
}

.how-it-works-button {
    background: #f6782c;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.how-it-works-button:hover {
    background: #e5671b;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .how-it-works-overlay {
        padding: 10px;
    }

    .how-it-works-modal {
        max-height: 95vh;
        border-radius: 8px;
    }

    .how-it-works-header {
        padding: 20px 20px 12px;
    }

    .how-it-works-title {
        font-size: 1.5rem;
    }

    .how-it-works-close {
        font-size: 1.8rem;
        width: 28px;
        height: 28px;
    }

    .how-it-works-content {
        padding: 20px;
    }

    .how-it-works-intro p {
        font-size: 1.1rem;
    }

    .how-it-works-steps {
        gap: 12px;
        margin-bottom: 25px;
    }

    .how-it-works-step {
        padding: 10px;
        font-size: 0.95rem;
    }

    .step-icon {
        font-size: 1.3rem;
    }

    .how-it-works-section-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .feedback-examples {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .feedback-box {
        padding: 10px 6px;
        font-size: 0.9rem;
        min-height: 40px;
    }

    .feedback-example span {
        font-size: 0.8rem;
    }

    .how-it-works-footer {
        padding: 15px 20px;
    }

    .how-it-works-button {
        width: 100%;
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .how-it-works-overlay {
        padding: 5px;
    }

    .how-it-works-header {
        padding: 15px 15px 10px;
    }

    .how-it-works-title {
        font-size: 1.3rem;
    }

    .how-it-works-content {
        padding: 15px;
    }

    .how-it-works-intro p {
        font-size: 1rem;
    }

    .how-it-works-steps {
        gap: 10px;
        margin-bottom: 20px;
    }

    .how-it-works-step {
        padding: 8px;
        font-size: 0.9rem;
    }

    .step-icon {
        font-size: 1.2rem;
    }

    .how-it-works-section-title {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .feedback-examples {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .feedback-box {
        padding: 8px 4px;
        font-size: 0.85rem;
        min-height: 35px;
    }

    .feedback-example span {
        font-size: 0.75rem;
    }

    .how-it-works-footer {
        padding: 12px 15px;
    }
}
