
        /* Basic styles for layout and visibility */
        body { 
            font-family: 'Poppins',"Poppins Fallback", sans-serif; 
            margin: 0; 
            padding: 20px; 
            background-color: #f8f9fa; 
            color: #343a40; 
            line-height: 1.6;
        }
        .quiz-container { 
            max-width: 700px; 
            margin: 20px auto; 
            background-color: #ffffff; 
            padding: 25px; 
            border-radius: 12px; 
            box-shadow: 0 8px 25px rgba(0,0,0,0.1); 
        }
        h1, h2, h3 { color: #4a5568; }
        h1 { text-align: center; margin-bottom: 30px; color: #724ae8; } /* Main page title if used */
        .quiz-container h2 { text-align: center; margin-bottom: 30px; color: #724ae8; font-size: 1.8em; } /* Quiz specific title */
        
        #quizStartBtn, #quizSubmitBtn, .restart-btn {
            display: block;
            width: fit-content;
            margin: 25px auto;
            padding: 14px 30px;
            font-size: 1em; 
            font-weight: 500; 
            color: white;
            background-color: #724ae8; 
            border: none;
            border-radius: 30px; 
            cursor: pointer;
            transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
            box-shadow: 0 5px 20px rgba(114, 74, 232, 0.25);
        }
        #quizStartBtn:hover, #quizSubmitBtn:hover, .restart-btn:hover {
            background-color: #5c3ac6; 
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(114, 74, 232, 0.35);
        }
        #quizStartBtn:disabled { /* This style is applied by JS when quiz starts */
            background-color: #adb5bd; 
            opacity: 0.7;
            cursor: default;
            transform: none;
            box-shadow: none;
        }

        /* --- KEY CSS CHANGES START HERE --- */

        /* Default state for .question-container (for animation setup) */
        .question-container {
            display: block; 
            background-color: #fdfdff;
            opacity: 0; 
            transform: translateY(20px); 
            transition: opacity 0.6s ease-out, transform 0.6s ease-out;
            margin-bottom: 30px;
            padding: 20px;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
        }

        /* Styles for questions when the quiz HASN'T started (form has .quiz-disabled) */
        #quizForm.quiz-disabled .question-container {
            opacity: 0.65; 
            transform: translateY(0); 
            transition: none; 
        }

        #quizForm.quiz-disabled .option-container,
        #quizForm.quiz-disabled .option-container input[type="radio"] {
            pointer-events: none; 
            cursor: default;
        }

        #quizForm.quiz-disabled .option-container:hover {
            background-color: transparent; 
        }

        #quizForm.quiz-disabled .option-container label {
            color: #888; 
        }
        
        /* Styles for questions when they become "active" (quiz started, .active class added by JS) */
        .question-container.active {
            opacity: 1; 
            transform: translateY(0); 
        }

        /* Ensure submit button is hidden initially and shown when quiz is active */
        #quizSubmitBtn {
            display: none; 
        }
        #quizSubmitBtn.active { /* JS adds this class */
            display: block; 
        }

        /* Error message visibility */
        #errorMessage {
            color: #e53e3e; 
            text-align: center;
            margin: 15px 0;
            padding: 10px;
            background-color: #fff5f5; 
            border: 1px solid #f56565; 
            border-radius: 6px;
            opacity: 0;
            transition: opacity 0.3s, visibility 0.3s; /* Added visibility */
            visibility: hidden; /* Start hidden */
            font-weight: 500;
        }
        #errorMessage.visible { /* JS adds this class */
            opacity: 1;
            visibility: visible;
        }

        /* --- KEY CSS CHANGES END HERE --- */
        
        .question-text { font-weight: 500; margin-bottom: 18px; font-size: 1.05em; color: #2d3748; }
        .option-container {
            display: flex;
            align-items: flex-start; 
            padding: 12px 15px;
            margin-bottom: 10px;
            border: 1px solid #cbd5e0; 
            border-radius: 8px;
            cursor: pointer;
            transition: background-color 0.2s, border-color 0.2s;
        }
        .option-container:hover { background-color: #f0eaff; }
        .option-container.selected { /* JS adds this class */
            background-color: #e6dfff; 
            border-color: #724ae8;
            box-shadow: 0 0 0 2px rgba(114, 74, 232, 0.2);
        }
        .option-container input[type="radio"] { 
            margin-right: 12px; 
            margin-top: 4px; 
            flex-shrink: 0; 
        }
        .option-container label { flex-grow: 1; }


        #progressBar {
            width: 100%;
            height: 12px; 
            background-color: #e9ecef; 
            border-radius: 6px;
            margin-bottom: 25px;
            overflow: hidden;
            display: none; /* Shown by JS when quiz starts */
        }
        #progressFill {
            width: 0%;
            height: 100%;
            background-color: #724ae8; 
            border-radius: 6px;
            transition: width 0.5s ease-in-out;
        }

        #loadingOverlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(255, 255, 255, 0.85); 
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 10000; 
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s, visibility 0.3s;
        }
        #loadingOverlay.show { /* JS adds this class */
            opacity: 1;
            visibility: visible;
        }
        .loader {
            border: 8px solid #e9ecef; 
            border-top: 8px solid #724ae8; 
            border-radius: 50%;
            width: 60px;
            height: 60px;
            animation: spin 1s linear infinite;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        html.ios #loadingOverlay { position: absolute; }

        #resultContainer { display: none; padding: 20px; } /* Shown by JS when results are ready */
        #resultContainer.active { display: block; }
        .score-display { text-align: center; margin-bottom: 35px; }
        #scoreValue { font-size: 4.5em; font-weight: 700; color: #724ae8; line-height: 1; }
        #scoreLabel { font-size: 1.6em; margin-top: 0px; font-weight: 500; }
        .low-score { color: #38a169; } 
        .mid-score { color: #dd6b20; } 
        .high-score { color: #c53030; } 

        .chart-container { position: relative; height: 150px; margin-bottom: 35px; background-color: #f7fafc; border-radius: 8px; padding:10px 0; }
        #bellCurveChart { width: 100%; height: 100%; }

        .traits-summary { margin-bottom: 35px; }
        .traits-summary h3 { text-align: center; margin-bottom: 20px; font-size: 1.3em; }
        .trait-item { display: flex; align-items: center; margin-bottom: 12px; }
        .trait-label { flex-basis: 250px; font-weight: 500; font-size: 0.95em; color: #4a5568; flex-shrink: 0; } /* Increased flex-basis for longer labels */
        .trait-meter-bg { flex-grow: 1; background-color: #e2e8f0; border-radius: 6px; height: 14px; overflow: hidden; }
        .trait-meter-fill { height: 100%; background-color: #a990f5; border-radius: 6px; transition: width 1s ease-out .2s; } 
        .trait-value { margin-left: 15px; font-size: 0.95em; font-weight: bold; min-width: 40px; text-align: right; color: #718096;}

        #keyTraits { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 35px; }
        .trait-tag {
            background-color: #f0eaff;
            color: #5c3ac6;
            padding: 8px 15px;
            border-radius: 20px;
            font-size: 0.9em;
            font-weight: 500;
            opacity: 0;
            transform: scale(0.9);
            animation: popInTag 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
        }
        @keyframes popInTag {
            to { opacity: 1; transform: scale(1); }
        }

        .interpretation-section, .growth-section {
            margin-bottom: 25px;
            padding: 20px;
            background-color: #f7fafc; 
            border-left: 5px solid #724ae8;
            border-radius: 8px;
        }
        .interpretation-section h3, .growth-section h3 { margin-top: 0; color: #5c3ac6; font-size: 1.25em; }
        .interpretation-section ul, .growth-section ul { padding-left: 20px; margin-top: 10px; }
        .interpretation-section ul li, .growth-section ul li { margin-bottom: 8px; }

        @media (max-width: 767px) {
            .quiz-container { padding: 15px; margin: 10px; }
            .quiz-container h2 { font-size: 1.4em; } /* Adjusted for potentially longer title */
            #quizStartBtn, #quizSubmitBtn, .restart-btn { padding: 12px 25px; font-size: 0.95em; }
            .question-text { font-size: 1em; }
            .option-container { padding: 10px; }
            .trait-label { flex-basis: 200px !important; font-size: 0.85em;} /* Adjusted for mobile */
            .trait-value { font-size: 0.9em; }
        }
        .list-disc { list-style-type: disc; }
        .list-inside { list-style-position: inside; }
        .my-3 { margin-top: 0.75rem; margin-bottom: 0.75rem; }

    