:root {
    --bg-color: #f0fdf4; /* Um verde/azulado super claro e alegre */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --accent: #ec4899; /* Rosa vibrante */
    --accent-hover: #be185d;
    --card-bg: rgba(255, 255, 255, 0.85);
    --border: rgba(0, 0, 0, 0.08);
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Background Effects */
.circles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.c1 {
    width: 300px;
    height: 300px;
    background: #fcd34d; /* Amarelo alegre */
    top: -100px;
    right: -100px;
}

.c2 {
    width: 400px;
    height: 400px;
    background: #60a5fa; /* Azul claro alegre */
    bottom: -150px;
    left: -150px;
}

/* Layout */
.app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    position: relative;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

@media (min-width: 481px) {
    .app-container {
        height: 90vh;
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: 24px;
        backdrop-filter: blur(16px);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    }
}

/* Screens */
.screen {
    display: none;
    flex-direction: column;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: translateY(20px);
}

.screen.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Home Screen */
.hero-content {
    margin: auto 0;
    text-align: center;
}

.badge {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    display: inline-block;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus, input[type="password"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.3);
}

input[type="text"]::placeholder, input[type="password"]::placeholder {
    color: #94a3b8;
}

.btn-primary, .btn-secondary {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 10px 20px -10px var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-primary);
    margin-top: 1rem;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

/* Quiz Screen */
.quiz-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-container {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.4s ease;
}

.question-counter {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.question-container h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.question-image-container {
    width: 100%;
    height: 180px;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.question-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.question-image-container:hover img {
    transform: scale(1.05);
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 1.2rem;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.option-btn:hover {
    background: #fdf2f8;
    border-color: var(--accent);
    transform: translateX(5px);
}

/* Loading Screen */
.loader {
    margin: auto;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

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

/* Result Screen */
.result-header {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.result-header h2 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.ai-chat-container {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-right: 0.5rem;
}

.ai-chat-container::-webkit-scrollbar {
    width: 4px;
}
.ai-chat-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.chat-message {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    animation: slideIn 0.5s ease forwards;
}

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

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.message-content {
    background: #ffffff;
    padding: 1rem;
    border-radius: 0 12px 12px 12px;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.message-content p {
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}
.message-content p:last-child {
    margin-bottom: 0;
}
