@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root {
    --primary-color: #3D405B;
    --secondary-color: #81B29A;
    --background-color: #F4F1DE;
    --text-color: #333;
    --light-gray: #e0e1dd;
    --white: #fff;
    --error-color: #c00;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

header p {
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: #666;
}

.tabs {
    display: flex;
    border-bottom: 2px solid var(--light-gray);
    margin-bottom: 2rem;
}

.tab-button {
    padding: 1rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #888;
    position: relative;
    transition: color 0.3s ease;
}

.tab-button.active {
    color: var(--primary-color);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 1.5rem;
}

button, .button-like {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover, .button-like:hover {
    background-color: #55597d;
}

#clearBtn, #clearQuiz, #stopCamBtn {
    background-color: #778DA9;
}

#clearBtn:hover, #clearQuiz:hover, #stopCamBtn:hover {
    background-color: #9ab0d1;
}

#analyzeBtn {
    background-color: var(--secondary-color);
    font-size: 1.1rem;
    padding: 12px 25px;
}

#analyzeBtn:hover {
    background-color: #9cd4b6;
}

#analyzeBtn:disabled {
    background-color: var(--light-gray);
    cursor: not-allowed;
}

canvas {
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.result-box {
    background-color: #f7fbff;
    border: 1px solid #cce3de;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
    min-height: 50px;
    line-height: 1.6;
    text-align: left;
}

#palettesSection {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--light-gray);
}

.swatches-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 1rem;
}

.swatch {
    width: 100px;
    height: 35px;
    border-radius: 5px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.1);
    overflow: hidden;
}

.swatch small {
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-align: center;
}

.quiz .q {
    text-align: left;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.quiz .q:last-of-type {
    border-bottom: none;
    margin-bottom: 15px;
}

.quiz .q label:first-child {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.05rem;
}

.quiz .q label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
    padding: 8px 5px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
    font-weight: normal;
}

.quiz .q label:hover {
    background-color: #f0f5f8;
}

.quiz .q label input[type="radio"] {
    margin-right: 12px;
    transform: scale(1.1);
    cursor: pointer;
}

.quiz-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: inline-block;
    margin-left: 8px;
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

details.details { 
    margin-top: 16px; 
    text-align: left;
    background-color: #f7fbff;
    border: 1px solid #cce3de;
    border-radius: 8px;
    padding: 1rem;
}

details.details summary {
    font-weight: 600;
    cursor: pointer;
}

.season-description {
    font-style: italic;
    color: #333;
    margin-bottom: 10px;
}

.season-tags {
    margin: 0.5rem 0;
}

.season-tags span {
    background-color: var(--secondary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
}

h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.tips-list {
    padding-left: 20px;
    margin-bottom: 1rem;
}

.tips-list li {
    margin-bottom: 5px;
}

.celebrities {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #555;
}

/* Estilos para a página de produtos e botão WhatsApp */
.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.product-category {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
}
.product-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.product-category h4 {
    margin-top: 0;
}

.product-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-list li {
    background-color: #f0f5f8;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.product-link-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.product-button {
    background-color: var(--secondary-color);
    font-size: 1.1rem;
    display: block;
}

.whatsapp-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #25D366;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.whatsapp-button:hover {
    background-color: #128C7E;
}