/* Combined CSS for CurdsPro Quiz pages - Educational Theme */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Subtle Animations */
@keyframes gentle-float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

@keyframes subtle-shadow {
    0% { box-shadow: 0 0 5px rgba(65, 105, 225, 0.3); }
    50% { box-shadow: 0 0 10px rgba(65, 105, 225, 0.4); }
    100% { box-shadow: 0 0 5px rgba(65, 105, 225, 0.3); }
}

@keyframes gentle-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Base Styles */
body {
    font-family: 'Open Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #0f1220;
    color: #e5e7eb;
    margin: 0;
    padding: 2rem 0;
    background-image: none;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e5eb;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-family: 'Georgia', 'Times New Roman', serif;
}

h1 {
    color: #1e5180;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    font-size: 2.2rem;
    border-bottom: 2px solid #e0e5eb;
    padding-bottom: 0.5rem;
}

p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: #444444;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px dotted #3498db;
}

a:hover {
    color: #2980b9;
    border-bottom: 1px solid #2980b9;
}

/* Quiz List Page Styles */
.quiz-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.quiz-card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: #333333;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    min-height: 280px;
    border: 1px solid #e0e5eb;
    position: relative;
    overflow: visible;
}

.quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: #3498db;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: gentle-float 4s ease-in-out infinite;
}

.quiz-card:hover::before {
    opacity: 1;
}

.quiz-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: #1e5180;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.card-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e5eb;
    min-height: 80px;
    align-items: flex-start;
}

.card-options a {
    text-decoration: none;
    color: #3498db;
    font-weight: bold;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    transition: all 0.3s;
    background-color: #f5f7fa;
    position: relative;
    border: 1px solid #e0e5eb;
    z-index: 1;
    font-size: 0.9rem;
}

.card-options a:hover {
    color: #ffffff;
    background-color: #3498db;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.card-options a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #2980b9;
    transition: width 0.3s ease;
    z-index: -1;
}

.card-options a:hover::before {
    width: 100%;
}

/* Quiz Page Styles */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e5eb;
}

.question {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e5eb;
    transition: all 0.3s ease;
}

.question:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.question-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: bold;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.choices {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.choices label {
    display: block;
    padding: 1rem;
    background-color: #ffffff;
    border: 1px solid #e0e5eb;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    color: #333;
}

.choices label:hover {
    transform: translateX(5px);
    background-color: #f5f7fa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.choices label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: rgba(52, 152, 219, 0.1);
    transition: width 0.3s ease;
    z-index: -1;
}

.choices label:hover::before {
    width: 100%;
}

.choices input[type="radio"] {
    margin-right: 10px;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.submit-btn:hover {
    transform: translateY(-2px);
    background-color: #2980b9;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.submit-btn:hover::after {
    left: 100%;
}

/* Card Styles */
.card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e5eb;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-body {
    padding: 1.5rem;
    color: #333333;
    background-color: #ffffff;
}

/* Quiz Results Styles */
.results-summary {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-weight: bold;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.result-item {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid #e0e5eb;
    color: #333333; /* Ensure text is readable */
}

.result-item.correct {
    background-color: rgba(76, 175, 80, 0.05);
    border-left: 5px solid #4caf50;
}

.result-item.incorrect {
    background-color: rgba(231, 76, 60, 0.05);
    border-left: 5px solid #e74c3c;
}

.result-item p {
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    font-weight: bold;
    color: #2c3e50;
}

.result-item ul {
    list-style-type: none;
    padding-left: 0;
}

.result-item li {
    padding: 8px 0;
    border-bottom: 1px solid #e0e5eb;
}

.result-item li:last-child {
    border-bottom: none;
}

.explanation {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f5f7fa;
    border-radius: 4px;
    font-style: italic;
    border: 1px dashed #e0e5eb;
    color: #444444; /* Darker color for explanation text */
}

.correct-choice {
    font-weight: bold;
    color: #27ae60;
}

.result-item .user-answer {
    font-weight: bold;
    color: #e74c3c;
}

.result-item .correct-answer {
    font-weight: bold;
    color: #27ae60;
}

.research-link, .try-again-link {
    margin-top: 2rem;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
}

.research-link:hover, .try-again-link:hover {
    transform: translateY(-2px);
    background-color: #2980b9;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    color: white;
}

.research-link::after, .try-again-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.try-again-link:hover::after, .research-link:hover::after {
    left: 100%;
}

/* Quiz Button Styles */
.quiz-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.quiz-button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, #7b68ee, #00f2fe);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(123, 104, 238, 0.4);
    text-align: center;
    min-width: 180px;
}

.quiz-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(123, 104, 238, 0.6);
    color: white;
}

.quiz-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.quiz-button:hover::after {
    left: 100%;
}

.research-button {
    background: linear-gradient(90deg, #7b68ee, #00f2fe);
}

.try-again-button {
    background: linear-gradient(90deg, #f0a6ca, #7b68ee);
}

.back-button {
    background: linear-gradient(90deg, #00f2fe, #4caf50);
}

/* Research Paper Page Styles */
.card {
    background-color: #1e1e2e;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(123, 104, 238, 0.3);
    border: 1px solid rgba(123, 104, 238, 0.2);
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-body {
    padding: 2rem;
}

blockquote {
    border-left: 4px solid #7b68ee;
    padding-left: 1rem;
    margin-left: 0;
    color: #b8b8d4;
    font-style: italic;
    background-color: rgba(123, 104, 238, 0.1);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

code {
    background-color: #252538;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    color: #00f2fe;
}

pre {
    background-color: #252538;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid rgba(123, 104, 238, 0.2);
}

pre code {
    background-color: transparent;
    padding: 0;
    color: #e0e0e0;
}

img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(123, 104, 238, 0.2);
}

th {
    background-color: #2d2d42;
    color: #f0a6ca;
}

tr:nth-child(even) {
    background-color: #252538;
}

tr:hover {
    background-color: #2d2d4a;
}

.back-to-quiz {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, #7b68ee, #00f2fe);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(123, 104, 238, 0.4);
}

.back-to-quiz:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(123, 104, 238, 0.6);
    color: white;
}

/* Navigation Styles */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.nav-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(90deg, #7b68ee, #00f2fe);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(123, 104, 238, 0.4);
}

.nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(123, 104, 238, 0.6);
    color: white;
}

/* Error Styles */
.error {
    padding: 1.5rem;
    background-color: rgba(231, 76, 60, 0.15);
    border-left: 5px solid #e74c3c;
    border-radius: 8px;
    margin-bottom: 2rem;
}


        /* Custom tab styling */
        .custom-tabs {
            display: flex;
            list-style: none;
            padding: 0;
            margin: 0;
            border-bottom: 1px solid #dee2e6;
        }
        .custom-tabs li {
            margin-bottom: -1px;
        }
        .custom-tab-button {
            position: relative;
            display: block;
            padding: 0.5rem 1rem;
            border: 1px solid transparent;
            border-top-left-radius: 0.25rem;
            border-top-right-radius: 0.25rem;
            cursor: pointer;
            background-color: transparent;
            font-size: 1rem;
            font-weight: 400;
            color: #495057;
        }
        .custom-tab-button:hover {
            border-color: #e9ecef #e9ecef #dee2e6;
            background-color: #f8f9fa;
        }
        .custom-tab-button.active {
            color: #495057;
            background-color: #fff;
            border-color: #dee2e6 #dee2e6 #fff;
        }
        .custom-tab-content {
            display: none;
            padding: 1rem 0;
        }
        .custom-tab-content.active {
            display: block;
        }
        /* Card styling */
        .card {
            position: relative;
            display: flex;
            flex-direction: column;
            min-width: 0;
            word-wrap: break-word;
            background-color: #fff;
            background-clip: border-box;
            border: 1px solid rgba(0,0,0,.125);
            border-radius: 0.25rem;
        }
        .card-body {
            flex: 1 1 auto;
            padding: 1rem;
        }
        .mt-3 {
            margin-top: 1rem;
        }
        .mb-4 {
            margin-bottom: 1.5rem;
        }
        .text-muted {
            color: #6c757d;
        }
        .card-title {
            margin-bottom: 0.75rem;
            font-size: 1.25rem;
        }
        .list-group {
            display: flex;
            flex-direction: column;
            padding-left: 0;
            margin-bottom: 0;
            border-radius: 0.25rem;
        }
        .list-group-item {
            position: relative;
            display: block;
            padding: 0.75rem 1.25rem;
            background-color: #fff;
            border: 1px solid rgba(0,0,0,.125);
        }
        .list-group-item:first-child {
            border-top-left-radius: inherit;
            border-top-right-radius: inherit;
        }
        .list-group-item:last-child {
            border-bottom-right-radius: inherit;
            border-bottom-left-radius: inherit;
        }

/* Mobile responsiveness for small phones */
@media (max-width: 600px) {
  body {
    padding: 0.75rem 0;
  }
  .container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 1rem;
    border-radius: 0;
    box-shadow: none;
    border: 0;
  }
  .quiz-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .quiz-card {
    text-align: left;
    min-height: auto;
    padding: 1rem;
  }
  .card-options {
    justify-content: stretch;
  }
  .card-options a {
    width: 100%;
    text-align: center;
  }
}
