:root {
    --django-green: #0C4B33;
    --django-light-green: #44B78B;
    --django-dark-green: #082E20;
}
.template-architecture {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 2rem;
    color: white;
    margin: 2rem 0;
    text-align: center;
}

.template-layer {
    display: inline-block;
    margin: 0 1rem;
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 5px;
    min-width: 150px;
}

.template-syntax-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.syntax-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.syntax-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--django-light-green);
}

.syntax-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--django-green);
}

.template-inheritance {
    background-color: #d1ecf1;
    border-left: 4px solid #0dcaf0;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 5px 5px 0;
}

.inheritance-diagram {
    background-color: #e9ecef;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.template-level {
    display: inline-block;
    margin: 0 1rem;
    padding: 1rem;
    background: white;
    border-radius: 5px;
    border: 2px solid var(--django-green);
    min-width: 200px;
}

.inheritance-arrow {
    font-size: 1.5rem;
    color: var(--django-green);
    margin: 0 0.5rem;
}

.tag-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.tag-filter-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1.5rem;
}

.tag-filter-title {
    text-align: center;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--django-green);
    border-bottom: 2px solid var(--django-light-green);
    padding-bottom: 0.5rem;
}

.template-examples {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 5px 5px 0;
}

.example-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.example-title {
    text-align: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--django-green);
}

.template-context {
    background-color: #e7f3ff;
    border-left: 4px solid #0d6efd;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 5px 5px 0;
}

.context-flow {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 5px;
}

.context-arrow {
    text-align: center;
    margin: 0.5rem 0;
    color: var(--django-green);
    font-weight: bold;
}

.custom-tags {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
}

.custom-tag-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 5px;
}

.custom-tag-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--django-green);
    flex-shrink: 0;
}

.custom-tag-content {
    flex-grow: 1;
}

.template-debugging {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 5px 5px 0;
}

.interactive-template {
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 5px;
    padding: 2rem;
    margin: 2rem 0;
}

.template-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.template-editor {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1rem;
}

.template-output {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1rem;
}

.template-code {
    width: 100%;
    height: 300px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 0.5rem;
    resize: vertical;
}

.preview-area {
    width: 100%;
    height: 300px;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 1rem;
    background: #f8f9fa;
    overflow-y: auto;
}

.template-tips {
    background-color: #e7f3ff;
    border-left: 4px solid #0d6efd;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 5px 5px 0;
}

.best-practices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.practice-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.practice-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--django-light-green);
}

.practice-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--django-green);
}

.template-structure {
    background-color: #e9ecef;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
}

.structure-tree {
    background: white;
    border-radius: 5px;
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.directory {
    font-weight: bold;
    color: var(--django-green);
}

.file {
    margin-left: 1.5rem;
    color: #6c757d;
}

.template-variables {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 5px 5px 0;
}

.variable-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.variable-table th,
.variable-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.variable-table th {
    background-color: var(--django-light-green);
    color: white;
}

.variable-table tr:hover {
    background-color: #f8f9fa;
}

.template-security {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 5px 5px 0;
}

.code-tabs {
    margin: 1.5rem 0;
}

.tab-content {
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 5px 5px;
    padding: 1rem;
}

.nav-tabs .nav-link.active {
    background-color: var(--django-green);
    color: white;
    border-color: var(--django-green);
}

.nav-tabs .nav-link {
    color: var(--django-green);
}

.template-performance {
    background-color: #d1ecf1;
    border-left: 4px solid #0dcaf0;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 5px 5px 0;
}
