
:root {
    --bg-gradient-start: #fbc2eb;
    --bg-gradient-end: #a6c1ee;
    --glass-bg: rgba(255, 255, 255, 0.2);
    --border-color: rgba(255, 255, 255, 0.3);
    --text-color: #333;
    --correct-color: #28a745;
    --incorrect-color: #dc3545;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --link-color: #5856d6;
}

[data-theme='dark'] {
    --bg-gradient-start: #232526;
    --bg-gradient-end: #414345;
    --glass-bg: rgba(0, 0, 0, 0.3);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-color: #f1f1f1;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --link-color: #ff9500;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    transition: background 0.5s ease;
    font-size: 16px;
    line-height: 1.6;
}

.main-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
    max-width: 1024px;
}

header.nav-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 20px 30px;
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 30px;
}

header.nav-container a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    transition: color 0.3s ease;
}

header.nav-container a:hover {
    text-decoration: underline;
}


.quiz-and-history-container {
    display: flex;
    gap: 25px;
    width: 100%;
}

.quiz-container {
    flex: 2;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 30px;
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    color: var(--text-color);
    text-align: center;
    transition: background 0.5s ease, color 0.5s ease, box-shadow 0.5s ease;
}

.quiz-title {
    font-size: 2.2em;
    margin-bottom: 10px;
}

#theme-toggle-btn {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px var(--shadow-color);
    margin-bottom: 20px;
    color: var(--text-color);
}

#theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

[data-theme='dark'] #theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.4);
}

.instructions {
    font-size: 1.1em;
    margin-bottom: 30px;
}

.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.option-btn {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 15px 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px var(--shadow-color);
    color: var(--text-color);
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

[data-theme='dark'] .option-btn:hover {
    background: rgba(0, 0, 0, 0.4);
}

.option-btn.correct {
    background-color: var(--correct-color);
    color: white;
}

.option-btn.incorrect {
    background-color: var(--incorrect-color);
    color: white;
}

.next-btn {
    margin-top: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 15px 30px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.next-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.history-container {
    flex: 1;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 30px;
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    color: var(--text-color);
    transition: background 0.5s ease, color 0.5s ease, box-shadow 0.5s ease;
}

.history-title {
    font-size: 2em;
    text-align: center;
    margin-bottom: 20px;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    font-size: 1em;
}

[data-theme='dark'] .history-item {
    background: rgba(0, 0, 0, 0.2);
}

.history-item.correct {
    border-left: 5px solid var(--correct-color);
}

.history-item.incorrect {
    border-left: 5px solid var(--incorrect-color);
}

.history-item p {
    margin: 0;
}

.history-item span {
    font-weight: bold;
}

.ad-container {
    width: 100%;
    min-height: 90px;
    background: var(--glass-bg);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-color);
    box-sizing: border-box;
    padding: 10px;
}

/* New Styles for Content-Rich Site */
.static-page-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 30px 40px;
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    color: var(--text-color);
    transition: background 0.5s ease, color 0.5s ease, box-shadow 0.5s ease;
}

.static-page-container h1,
.static-page-container h2,
.static-page-container h3 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.static-page-container p {
    margin-bottom: 1em;
}

.static-page-container a {
    color: var(--link-color);
    text-decoration: none;
}

.static-page-container a:hover {
    text-decoration: underline;
}

.static-page-container ul, .static-page-container ol {
    padding-left: 20px;
}

.footer-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 20px 30px;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-container a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.footer-container a:hover {
    text-decoration: underline;
}

ul.article-list {
    list-style: none;
    padding: 0;
}

ul.article-list li {
    margin-bottom: 20px;
}

ul.article-list a {
    display: block;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

[data-theme='dark'] ul.article-list a {
    background: rgba(0, 0, 0, 0.2);
}

ul.article-list a:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

ul.article-list h2 {
    margin: 0 0 10px 0;
    font-size: 1.5em;
    color: var(--text-color);
}

ul.article-list p {
    margin: 0;
    font-size: 1em;
}

/* Custom Scrollbar for History */
.history-list::-webkit-scrollbar {
    width: 8px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

[data-theme='dark'] .history-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

[data-theme='dark'] .history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5);
}
