:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --accent-color: #ec4899;
    --bg-accent: #f5f3ff;
    --sidebar-bg: #1e1b4b;
    --sidebar-text: #e0e7ff;
    --sidebar-hover: #312e81;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f1f5f9;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--text-dark);
}

a:hover {
    color: var(--primary-color);
}

/* Sidebar styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: none;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 5px 0;
}

.logo-container {
    padding: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
}

.logo-text span {
    color: var(--accent-color);
}

.nav-menu {
    list-style: none;
    padding: 10px 0;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    font-size: 14px;
    color: var(--sidebar-text);
    font-weight: 500;
    transition: all 0.2s;
    opacity: 0.85;
}

.nav-item a:hover {
    background-color: var(--sidebar-hover);
    opacity: 1;
    color: #ffffff;
}

/* Main Content styling */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-header {
    height: 60px;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: space-between;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: #f9f9f9;
}

.content-wrapper {
    padding: 20px;
    display: flex;
    gap: 20px;
    flex: 1;
}

.main-column {
    flex: 3;
}

.aside-column {
    flex: 1;
    min-width: 250px;
}

/* Breadcrumbs */
.breadcrumbs {
    background-color: var(--bg-white);
    padding: 12px 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--primary-color);
}

.breadcrumbs span {
    color: var(--text-light);
    margin: 0 5px;
}

/* Grid layout for categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.category-title {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eeeeeeb8;
    padding-bottom: 10px;
}

.subcat-list {
    list-style: none;
}

.subcat-list li {
    padding: 5px 0;
    font-size: 14px;
}

.subcat-list li a::before {
    content: "› ";
    color: var(--text-light);
    font-weight: bold;
    margin-right: 5px;
}

/* Question view styling */
.question-view {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.question-text {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.options-list {
    list-style: none;
    margin-bottom: 15px;
}

.options-list li {
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.answer-btn {
    background: #f0f0f0;
    border: 1px solid #dcdcdc;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.answer-btn:hover {
    background: #e0e0e0;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Custom Quiz Options */
.option-radio {
    display: none;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0px;
    width: 100%;
}

.option-label:hover {
    background-color: #f9f9f9;
}

.option-radio:checked + .option-label {
    border-color: var(--primary-color);
    background-color: var(--bg-accent);
}

.option-radio:checked + .option-label .option-letter {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.option-letter {
    flex-shrink: 0;
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    text-align: center;
    line-height: 22px;
    font-weight: bold;
    font-size: 13px;
    background: #ffffff;
    color: var(--text-light);
}

.option-content {
    flex-grow: 1;
}

/* Validation Colors */
.option-label.correct-selection {
    border-color: #28a745 !important;
    background-color: #f1fbe7 !important;
}

.option-label.correct-selection .option-letter {
    background-color: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
}

.option-label.incorrect-selection {
    border-color: #dc3545 !important;
    background-color: #fff4f4 !important;
}

.option-label.incorrect-selection .option-letter {
    background-color: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

.explanation-text {
    line-height: 1.6;
}

/* Form Error Styling */
.errorlist {
    color: #dc3545;
    list-style: none;
    padding: 0;
    margin: 5px 0;
    font-size: 13px;
    font-weight: 500;
}

.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
}

.auth-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
}

.auth-form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
