:root {
    --primary: #8B5CF6;
    --primary-dark: #7C3AED;
    --secondary: #EC4899;
    --accent: #F472B6;
    --background: #F3F4F6;
    --text-main: #1F2937;
    --text-light: #6B7280;
    --white: #ffffff;
    --radius: 24px;
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: #EEF2FF;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    animation: move 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: #C4B5FD;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: #FBCFE8;
    animation-delay: -5s;
}

.blob-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
    height: 40vw;
    background: #A78BFA;
    opacity: 0.4;
    animation-delay: -10s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(20px, -20px) scale(1.1);
    }
}

/* Container */
.container {
    width: 90%;
    max-width: 500px;
    margin: 20px;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 40px 30px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hidden {
    display: none;
    opacity: 0;
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography */
h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

p {
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 30px;
}

.subtitle {
    font-size: 0.95rem;
    margin-top: -5px;
    margin-bottom: 25px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: rgba(255, 255, 255, 0.9);
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
}

.input-error {
    border-color: #EF4444 !important;
    animation: shake 0.5s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* Toast */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #EF4444;
    color: #fff;
    text-align: center;
    border-radius: 50px;
    padding: 16px;
    position: fixed;
    z-index: 100;
    left: 50%;
    transform: translateX(-50%);
    top: 30px;
    opacity: 0;
    transition: opacity 0.5s, top 0.5s;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.toast.show {
    visibility: visible;
    opacity: 1;
    top: 50px;
}


/* Radio Group */
.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.radio-card {
    position: relative;
    cursor: pointer;
}

.radio-card input {
    position: absolute;
    opacity: 0;
}

.radio-card span {
    display: block;
    padding: 15px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.9);
}

.radio-card input:checked+span {
    border-color: var(--primary);
    background: #F5F3FF;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

/* Quiz UI */
.progress-container {
    width: 100%;
    background: #E5E7EB;
    height: 8px;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
}

.options-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    background: white;
    border: 1px solid #E5E7EB;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.option-btn:hover {
    border-color: var(--primary);
    background: #F5F3FF;
    color: var(--primary);
}

/* Loader */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #E5E7EB;
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Results */
.badge {
    background: #10B981;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-header h1 {
    font-size: 3rem;
    margin: 10px 0 5px;
}

.result-description {
    font-size: 1.05rem;
    margin-bottom: 30px;
    color: var(--text-main);
}

.traits-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.trait {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trait span {
    width: 100px;
    text-align: right;
    font-size: 0.9rem;
    font-weight: 600;
}

.trait-bar {
    flex: 1;
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}

.trait-bar div {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
}

.footer-note {
    font-size: 0.8rem;
    color: #9CA3AF;
    margin-top: 25px;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .card {
        padding: 30px 20px;
    }

    h1 {
        font-size: 1.8rem;
    }
}