body {
   font-family: 'Segoe UI', 'Roboto', sans-serif;
   background-color: #e9ecef;
   margin: 0;
   padding: 20px;
   color: #2c3e50;
}

#app {
   max-width: 800px;
   margin: auto;
   height: 100%;
   padding: 30px;
   border-radius: 12px;
}

h1 {
   font-family: 'Georgia', serif;
   text-align: center;
   color: #1a365d;
   margin-bottom: 30px;
   font-size: 2.4em;
   text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h2 {
   font-family: 'Georgia', serif;
   color: #2d4a6e;
   font-size: 1.6em;
   margin-bottom: 20px;
}

.form-section {
    margin-top: 21%;
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #dce4ec;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.form-section:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

input, textarea {
    display: block;
    margin: 12px 0;
    padding: 12px;
    width: calc(100% - 24px);
    border: 2px solid #dce4ec;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

button {
    padding: 12px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

#user-info {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    font-size: 1.1em;
    color: #1b306f;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 10px 15px;
    background-color: #f1f5f9;
    border-radius: 6px;
    font-weight: bold;
}

#question {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 1.2em;
    line-height: 1.6;
    color: #2c3e50;
}

#question ul {
    list-style-type: none;
    padding: 0;
}

#question li {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

#question li:hover {
    background-color: #f8f9fa;
}

#question input[type="radio"] {
    display: none;
}

#feedback-section {
    margin: 20px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

#feedback-text {
    width: 100%;
    min-height: 100px;
    margin: 10px 0;
    padding: 10px;
    border: 2px solid #dce4ec;
    border-radius: 6px;
    resize: vertical;
}

#feedback-text:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.answer-feedback {
    margin: 15px 0;
    padding: 15px;
    border-radius: 6px;
    background-color: #e8f4f8;
    border-left: 4px solid #3498db;
}

.info-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.option-container {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    font-size: 1.1em;
    line-height: 1.4;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.option-container:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.option-container.selected {
    background-color: #3498db;
    color: white;
    border-color: #2980b9;
}

.option-container.correct {
    background-color: #2ecc71;
    color: white;
    border-color: #27ae60;
    animation: pulse 0.5s;
}

.option-container.incorrect {
    background-color: #e74c3c;
    color: white;
    border-color: #c0392b;
    animation: shake 0.5s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.answer-explanation {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    animation: slideIn 0.5s;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    font-size: 1.1em;
    line-height: 1.5;
}

.answer-explanation h3 {
    font-family: 'Georgia', serif;
    color: #1a365d;
    font-size: 1.3em;
    margin: 0 0 10px 0;
}

.answer-explanation p {
    margin: 0;
    color: #34495e;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#total-questions {
    font-weight: 600;
    color: #293b86;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.button-group button {
    flex: 1;
}

/* User's Feedback Button - Dark Blue */
.feedback-btn {
    background: linear-gradient(45deg, #042444, #073d73);  /* Darker blue gradient */
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.2);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
    color: white;
}

.feedback-btn:hover {
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.3);
}

/* Submit Answer Button - Blue */
#submit-answer {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
    animation: pulse 2s infinite;
}

#submit-answer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

#submit-answer:active {
    transform: translateY(1px);
}

/* Pulse animation for submit button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

.button-group a {
    flex: 1;
    text-decoration: none;
}

.orientation-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ffd700;
    color: #2c3e50;
    text-align: center;
    padding: 10px;
    z-index: 1000;
    font-weight: bold;
    animation: slideDown 0.5s ease-in-out;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@media screen and (max-width: 768px) {
    .form-section {
        margin-top: 40px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .option-container {
        font-size: 1em;
    }
}

/* Add these styles for the explanation section */
.explanation-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.explanation-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.explanation-text {
    line-height: 1.6;
    color: #2c3e50;
    font-size: 1.1em;
}

.explanation-intro {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.explanation-content {
    margin-left: 20px;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid #e9ecef;
}

.explanation-points {
    margin: 10px 0 15px 25px;
    padding-left: 15px;
}

.explanation-points li {
    margin-bottom: 12px;
    position: relative;
    list-style-type: none;
    padding-left: 25px;
}

.explanation-points li::before {
    content: "•";
    color: #007bff;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

.key-point {
    background-color: #fff3cd;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 500;
}

.explanation-section p {
    margin-bottom: 12px;
}

/* Add some spacing between paragraphs and lists */
.explanation-section p + ul {
    margin-top: 5px;
}

.result-container {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

/* Button container styles */
.buttons-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 15px 0;
}

/* Base button styles */
.show-explanation-btn, .next-question-btn, .take-quiz-btn, .feedback-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
    color: white;
}

/* Show Explanation button - Back to blue */
.show-explanation-btn {
    background: linear-gradient(45deg, #007bff, #0056b3);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

/* Next Question button - Back to green */
.next-question-btn {
    background: linear-gradient(45deg, #28a745, #218838);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

/* Take Quiz Again button - Same as Show Explanation */
.take-quiz-btn {
    background: linear-gradient(45deg, #007bff, #0056b3);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

/* Hover effects */
.show-explanation-btn:hover, 
.next-question-btn:hover,
.take-quiz-btn:hover,
.feedback-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Active/Click effects */
.show-explanation-btn:active, 
.next-question-btn:active,
.take-quiz-btn:active,
.feedback-btn:active {
    transform: translateY(1px);
}

/* Ripple effect */
.show-explanation-btn::after, 
.next-question-btn::after,
.take-quiz-btn::after,
.feedback-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out;
}

.show-explanation-btn:hover::after, 
.next-question-btn:hover::after,
.take-quiz-btn:hover::after,
.feedback-btn:hover::after {
    width: 200%;
    height: 200%;
}

/* Shine effect */
.show-explanation-btn::before, 
.next-question-btn::before,
.take-quiz-btn::before,
.feedback-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

/* Keep existing animations */
@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .buttons-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .show-explanation-btn, 
    .next-question-btn,
    .take-quiz-btn,
    .feedback-btn {
        width: 100%;
        padding: 14px 20px;
    }
}

/* Disabled state */
.show-explanation-btn:disabled, 
.next-question-btn:disabled,
.take-quiz-btn:disabled,
.feedback-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Quiz Summary Page Buttons Container */
.summary-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
}

/* Start Quiz Again Button on Summary Page */
.start-quiz-again-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
    color: white;
    background: linear-gradient(45deg, #007bff, #0056b3);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

/* Hover effects */
.start-quiz-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

/* Active/Click effects */
.start-quiz-again-btn:active {
    transform: translateY(1px);
}

/* Ripple effect */
.start-quiz-again-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out;
}

.start-quiz-again-btn:hover::after {
    width: 200%;
    height: 200%;
}

/* Shine effect */
.start-quiz-again-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

/* Responsive design for summary page */
@media (max-width: 768px) {
    .summary-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .start-quiz-again-btn {
        width: 100%;
        padding: 14px 20px;
    }
}

/* Disabled state */
.start-quiz-again-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);  /* Lighter background to contrast with purple particles */
}

/* Adjust your existing container to work with particles */
.container {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(138, 43, 226, 0.2);  /* Purple-tinted shadow */
    backdrop-filter: blur(4px);
    padding: 20px;
    margin: 20px auto;
}

/* Adjust other elements to have proper contrast */
.option-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.result-container {
    background: rgba(255, 255, 255, 0.9);
}

/* Add start quiz buttons to base styles */
.start-quiz-btn, 
.start-quiz-again-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
    color: white;
    background: linear-gradient(45deg, #007bff, #0056b3);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

/* Restore submit button to previous style */
#submit-answer {
    background: linear-gradient(45deg, #532BE2, #0021D3);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.2);
}

#submit-answer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(138, 43, 226, 0.3);
}

#submit-answer:active {
    transform: translateY(1px);
}

/* Pulse animation for submit button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(138, 43, 226, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(138, 43, 226, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(138, 43, 226, 0);
    }
}

#submit-answer {
    animation: pulse 2s infinite;
}

/* Add hover effects for start quiz buttons */
.start-quiz-btn:hover, 
.start-quiz-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

/* Add active effects for start quiz buttons */
.start-quiz-btn:active, 
.start-quiz-again-btn:active {
    transform: translateY(1px);
}

/* Add ripple effect for start quiz buttons */
.start-quiz-btn::after, 
.start-quiz-again-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out;
}

.start-quiz-btn:hover::after, 
.start-quiz-again-btn:hover::after {
    width: 200%;
    height: 200%;
}

/* Add shine effect for start quiz buttons */
.start-quiz-btn::before, 
.start-quiz-again-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

/* Add responsive styles for start quiz buttons */
@media (max-width: 768px) {
    .start-quiz-btn, 
    .start-quiz-again-btn {
        width: 100%;
        padding: 14px 20px;
    }
}

/* Add disabled state for start quiz buttons */
.start-quiz-btn:disabled, 
.start-quiz-again-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Start Quiz Again Button (st-quiz-again-btn) */
.st-quiz-again-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
    color: white;
    background: linear-gradient(45deg, #007bff, #0056b3);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

/* Hover effects */
.st-quiz-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

/* Active/Click effects */
.st-quiz-again-btn:active {
    transform: translateY(1px);
}

/* Ripple effect */
.st-quiz-again-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out;
}

.st-quiz-again-btn:hover::after {
    width: 200%;
    height: 200%;
}

/* Shine effect */
.st-quiz-again-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .st-quiz-again-btn {
        width: 100%;
        padding: 14px 20px;
    }
}

/* Disabled state */
.st-quiz-again-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
