:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --bg-light: #f8f9fa;
    --text-light: #495057;
    --card-bg-light: #ffffff;
}

body {
    transition: background-color 0.3s, color 0.3s;
    background-color: var(--bg-light);
    color: var(--text-light);
    padding-top: 56px;
}

.dark-mode {
    --bg-light: #121212;
    --text-light: #e0e0e0;
    --card-bg-light: #1e1e1e;
    background-color: var(--bg-light);
    color: var(--text-light);
}

.dark-mode .card, 
.dark-mode .accordion-item, 
.dark-mode .list-group-item {
    background-color: var(--card-bg-light);
    color: var(--text-light);
    border-color: #333;
}

.sticky-sidebar {
    position: sticky;
    top: 76px;
    height: fit-content;
}

.nav-link.active {
    border-left: 4px solid var(--secondary-color);
    font-weight: 600;
}

.code-example {
    border-radius: 8px;
    position: relative;
    margin-bottom: 1rem;
}

.copy-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    opacity: 0.7;
    transition: 0.3s;
    z-index: 10;
}

.copy-btn:hover {
    opacity: 1;
}

.interactive-example {
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    transition: 0.3s;
    background-color: var(--card-bg-light);
    margin-bottom: 1.5rem;
}

.progress-ring {
    display: block;
    margin: 0 auto;
}

.progress-ring circle {
    transition: stroke-dashoffset 0.35s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke: var(--secondary-color);
}

.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-title {
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.badge-custom {
    background-color: var(--secondary-color);
    color: white;
}

.quiz-container {
    background-color: var(--card-bg-light);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quiz-option {
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: background-color 0.3s;
}

.quiz-option:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.quiz-option.selected {
    background-color: rgba(52, 152, 219, 0.2);
    border-left: 3px solid var(--secondary-color);
}

.quiz-option.correct {
    background-color: rgba(46, 204, 113, 0.2);
    border-left: 3px solid #2ecc71;
}

.quiz-option.incorrect {
    background-color: rgba(231, 76, 60, 0.2);
    border-left: 3px solid #e74c3c;
}

.schema-visual {
    max-width: 100%;
    overflow-x: auto;
}

.schema-box {
    border: 2px solid var(--secondary-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: rgba(52, 152, 219, 0.1);
}

.schema-arrow {
    text-align: center;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.xml-editor {
    font-family: monospace;
    background-color: #2d2d2d;
    color: #ffffff;
    resize: vertical;
}

.xml-error {
    border-color: #e74c3c !important;
}

.table-custom {
    background-color: var(--card-bg-light);
}

.table-custom th {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--text-light);
}

@media (max-width: 768px) {
    .sticky-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
}