:root {
    --django-green: #0C4B33;
    --django-light-green: #44B78B;
    --django-dark-green: #082E20;
}

.bg-django {
    background-color: var(--django-green) !important;
}

.text-django {
    color: var(--django-green) !important;
}

.btn-django {
    background-color: var(--django-green);
    color: white;
}

.btn-django:hover {
    background-color: var(--django-dark-green);
    color: white;
}

.hero-section {
    background: linear-gradient(135deg, var(--django-green) 0%, var(--django-light-green) 100%);
    color: white;
    padding: 3rem 0;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: var(--django-light-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.card-hover {
    transition: transform 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
}

.code-block {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

.chapter-title {
    border-bottom: 2px solid var(--django-green);
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.navbar-brand img {
    filter: brightness(0) invert(1);
}

.template-example {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin: 20px 0;
}

.template-example .example-header {
    background-color: #e9ecef;
    padding: 10px 15px;
    border-bottom: 1px solid #dee2e6;
    font-weight: bold;
}

.template-example .example-content {
    padding: 15px;
}

.template-diagram {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.template-diagram .diagram-item {
    display: inline-block;
    margin: 10px;
    padding: 15px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 150px;
}

.template-diagram .arrow {
    font-size: 24px;
    color: var(--django-green);
    margin: 0 10px;
}

.badge-django {
    background-color: var(--django-green);
    color: white;
}

/* 认证特定样式 */
.auth-flow {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.auth-flow .flow-step {
    text-align: center;
    padding: 15px;
}

.auth-flow .flow-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: var(--django-green);
    color: white;
    border-radius: 50%;
    line-height: 40px;
    margin-bottom: 10px;
}

.auth-example {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin: 20px 0;
    background-color: white;
}

.auth-example .auth-header {
    background-color: var(--django-green);
    color: white;
    padding: 10px 15px;
    border-bottom: 1px solid #dee2e6;
    font-weight: bold;
}

.auth-example .auth-content {
    padding: 20px;
}

.permission-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 5px;
}

.badge-perm { background-color: #007bff; color: white; }
.badge-group { background-color: #28a745; color: white; }
.badge-user { background-color: #6c757d; color: white; }
.badge-superuser { background-color: #dc3545; color: white; }
.badge-staff { background-color: #fd7e14; color: white; }

.security-level {
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

.security-high {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.security-medium {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.security-low {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.decorator-badge {
    background-color: #6f42c1;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-left: 5px;
}

.mixin-badge {
    background-color: #e83e8c;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-left: 5px;
}

.auth-comparison {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.auth-comparison > div {
    flex: 1;
}

.session-info {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin: 10px 0;
}

.copy-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.copy-btn:hover {
    opacity: 1;
}

/* 登录表单样式 */
.login-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.permission-matrix {
    width: 100%;
    border-collapse: collapse;
}

.permission-matrix th,
.permission-matrix td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: center;
}

.permission-matrix th {
    background-color: #e9ecef;
}

.permission-yes {
    background-color: #d4edda;
    color: #155724;
}

.permission-no {
    background-color: #f8d7da;
    color: #721c24;
}
