@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --background-color: #ecf0f1;
    --text-color: #2c3e50;
    --white: #ffffff;
    --danger-color: #e74c3c;
    --card-bg: #ffffff;
}

body.dark-mode {
    --background-color: #2c3e50;
    --text-color: #ecf0f1;
    --card-bg: #34495e;
    --white: #bdc3c7;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 90%;
    max-width: 500px;
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: background-color 0.3s;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

#theme-btn {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
}

#theme-btn:hover {
    background: var(--primary-color);
    color: white;
}

.page {
    display: none;
    text-align: center;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

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

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.answer-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
}

.answer-btn {
    width: 45%;
    background-color: var(--secondary-color);
}

.answer-btn:hover {
    background-color: #27ae60;
}

#result-page h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

#mbti-type {
    font-size: 3rem;
    color: var(--danger-color);
    margin-bottom: 1rem;
}

#mbti-description {
    font-size: 1.2rem;
    line-height: 1.6;
}
