/* ======================================= */
/* ====== ROOT VARIABLES & DEFAULTS ====== */
/* ======================================= */
:root {
    --bg-color-1: #1a1a2e;
    --bg-color-2: #16213e;
    --bg-color-3: #0f3460;
    --bg-color-4: #533483;
    --card-bg: rgba(22, 33, 62, 0.7);
    --primary-color: #e94560;
    --glow-color: rgba(233, 69, 96, 0.4);
    --text-color: #e0e0e0;
    --text-secondary: #a0a0c0;
    --border-color: rgba(233, 69, 96, 0.2);
    --font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--bg-color-1), var(--bg-color-2), var(--bg-color-3), var(--bg-color-4));
    background-size: 400% 400%;
    animation: animated-gradient 15s ease infinite;
    overflow-x: hidden;
}

@keyframes animated-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ======================================= */
/* ====== GENERAL & CARD STYLING ======= */
/* ======================================= */
.container {
    width: 100%;
    max-width: 750px;
    padding: 20px 15px;
    position: relative;
    box-sizing: border-box;
}

.screen {
    display: none;
    animation: fadeIn 0.8s ease-in-out;
}

.screen.active {
    display: block;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px 25px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
    transition: box-shadow 0.3s ease;
}

h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: #fff;
}

p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 35px;
}

.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(233, 69, 96, 0.25);
}

.btn .arrow {
    transition: transform 0.2s ease;
}

.btn:hover .arrow {
    transform: translateX(5px);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

/* ======================================= */
/* ====== SCREEN-SPECIFIC STYLING ====== */
/* ======================================= */

/* --- Quiz Screen --- */
.progress-container {
    width: 100%;
    height: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
}
#progress-bar {
    width: 0%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 5px;
    transition: width 0.5s ease;
}
#progress-text {
    position: absolute;
    right: 15px;
    top: -25px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}
#question-text {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 40px 0;
    min-height: 60px;
    color: #fff;
}
.options {
    display: grid;
    gap: 12px;
}
.option-btn {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 16px;
    border-radius: 12px;
    text-align: left;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.option-btn:hover, .option-btn:focus {
    background-color: var(--glow-color);
    border-color: var(--primary-color);
    transform: scale(1.02);
    outline: none;
}

/* --- Loading Screen --- */
.loader {
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto 30px auto;
}

/* --- Result Screen --- */
.result-card { animation: slideUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1); }
.result-intro { font-size: 1rem; margin-bottom: 20px; }
.distro-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(45deg, var(--primary-color), #f9c572);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}
.distro-tagline {
    font-size: 1.1rem;
    font-style: italic;
    max-width: 95%;
    margin: 0 auto 30px auto;
    color: #fff;
}
.pros-cons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
    margin-top: 40px;
    margin-bottom: 40px;
}
.pros-cons > div {
    flex: 1;
    background: rgba(0,0,0,0.15);
    padding: 20px;
    border-radius: 12px;
}
.pros-cons h3 {
    color: #fff;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
}
.pros-cons ul { list-style-type: none; padding: 0; color: var(--text-secondary); }
.pros-cons ul li {
    margin-bottom: 12px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
}
.pros-cons ul li::before { font-weight: bold; margin-right: 10px; }
#distro-pros li::before { content: '✓'; color: #2ecc71; }
#distro-cons li::before { content: '⚠️'; color: #f1c40f; }
.result-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

/* ======================================= */
/* =========== ANIMATIONS ============== */
/* ======================================= */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes slideUp { 0% { opacity: 0; transform: translateY(50px); } 100% { opacity: 1; transform: translateY(0); } }
.fade-out { animation: fadeOut 0.3s forwards; }

/* ======================================= */
/* ====== MEDIA QUERY FOR DESKTOP ====== */
/* ======================================= */
@media (min-width: 768px) {
    .container { padding: 20px; }
    .card { padding: 40px; }
    h1 { font-size: 2.8rem; }
    p { font-size: 1.1rem; }
    .btn { padding: 16px 32px; font-size: 1.1rem; }
    #question-text { font-size: 1.6rem; }
    .option-btn { padding: 18px; font-size: 1rem; }
    .distro-title { font-size: 4.5rem; }
    .distro-tagline { font-size: 1.2rem; }
    .pros-cons { flex-direction: row; gap: 40px; }
    .result-buttons { flex-direction: row; justify-content: center; flex-wrap: wrap; }
}