:root {
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --accent-color: #7b2cbf;
    --accent-glow: #9d4edd;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, #240046 0%, #0a0a0a 70%);
    z-index: -1;
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    100% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

#lang-select {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px 12px;
    border-radius: 10px;
    font-family: var(--font-main);
    cursor: pointer;
    outline: none;
}

#lang-select option {
    background: #1a1a1a;
    color: white;
}

.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .option-btn {
    text-align: right;
}

.rtl .language-switcher {
    right: auto;
    left: 20px;
}

.container {
    width: 90%;
    max-width: 600px;
    text-align: center;
    z-index: 1;
    position: relative;
    padding-top: 60px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    background: linear-gradient(90deg, #fff, #b185db);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 3rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(123, 44, 191, 0.2);
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

p {
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #e0e0e0;
}

.primary-btn {
    background: linear-gradient(45deg, var(--accent-color), var(--accent-glow));
    border: none;
    padding: 1rem 2.5rem;
    color: white;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(123, 44, 191, 0.5);
}

.primary-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(157, 78, 221, 0.8);
}

.hidden {
    display: none;
}

/* Additions for Survey Logic */

.question-number {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--accent-glow);
    margin-bottom: 1rem;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.option-btn:hover {
    background: rgba(123, 44, 191, 0.2);
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.result-card h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.highlight {
    background: linear-gradient(90deg, #b185db, #e0aaff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Responsive for tablets and up */
@media (min-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr 1fr;
    }
}

:root {
    --accent: #b185db;
    /* Ensuring accent is defined for the badge */
}

/* Result Badge & Gamification */
.result-badge {
    position: relative;
    padding: 30px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    margin: 25px 0;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.result-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--accent), transparent 30%);
    animation: rotate 4s linear infinite;
    opacity: 0.3;
    z-index: -1;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.score-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.score-label {
    position: absolute;
    bottom: -15px;
    background: var(--accent);
    color: black;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    width: max-content;
    left: 50%;
    transform: translateX(-50%);
}

.share-section {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #eee;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.share-btn.primary {
    background: var(--accent);
    color: black;
    border: none;
    font-weight: 700;
}

.rank-text {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 5px;
}

.site-footer {
    margin-top: 50px;
    padding: 20px 0;
    opacity: 0.5;
    font-size: 0.8rem;
    border-top: 1px solid var(--glass-border);
}

.site-footer p {
    margin-bottom: 5px;
}

.legal-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.legal-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.3s;
}

.legal-links a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.consent-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1.5rem;
    text-align: left;
    font-size: 0.9rem;
    cursor: pointer;
}

.consent-wrapper input {
    margin-top: 4px;
    cursor: pointer;
}

.consent-wrapper label {
    cursor: pointer;
    line-height: 1.4;
}

.primary-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(1);
    transform: none !important;
    box-shadow: none !important;
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.3s ease;
}

.modal-content {
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    animation: modalSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlide {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.close-btn:hover {
    opacity: 1;
}

.modal-inner {
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.6;
}

.modal-inner h2 {
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.modal-inner p {
    margin-bottom: 1rem;
    opacity: 0.8;
}

.hidden {
    display: none !important;
}