:root {
    --deba-blue: #0d6efd;
    --deba-gray: #6c757d;
    --deba-light: #f8fafc;
    --deba-border: #e9ecef;
}

body {
    padding-top: 64px;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background-color: #ffffff;
}

.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--deba-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    min-height: 64px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    position: relative;
}

.navbar-brand.d-lg-none {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 38px;
    color: #2c3e50;
    font-size: 1.4rem;
    padding: 0;
    margin-right: 4px;
    flex-shrink: 0;
}

.navbar-brand.d-none.d-lg-inline {
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.3px;
    margin-right: 2rem;
    flex-shrink: 0;
}

.navbar-brand.fw-bold.text-primary {
    color: var(--deba-blue);
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 0;
    padding: 0;
}

.navbar-nav .nav-item {
    list-style: none;
}

.navbar .navbar-nav .nav-link {
    font-weight: 450;
    color: #2c3e50;
    padding: 0.5rem 0.7rem;
    border-radius: 30px;
    transition: background 0.1s, color 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
}

.navbar .navbar-nav .nav-link i {
    font-size: 1.2rem;
    color: #5f6c80;
    transition: color 0.1s;
}

.navbar .navbar-nav .nav-link:hover {
    background: rgba(13, 110, 253, 0.05);
    color: var(--deba-blue);
}

.navbar .navbar-nav .nav-link:hover i {
    color: var(--deba-blue);
}

.navbar .navbar-nav .nav-link.active {
    color: var(--deba-blue);
    background-color: rgba(13, 110, 253, 0.08);
}

.navbar .navbar-nav .nav-link.active i {
    color: var(--deba-blue);
}

.navbar-nav .nav-link span {
    display: none;
}

.nav-scroll-container {
    flex: 1 1 auto;
    overflow: hidden;
    margin: 0 8px;
    white-space: nowrap;
    scrollbar-width: thin;
    text-align: center;
}

.nav-scroll-container::-webkit-scrollbar {
    height: 3px;
}

.nav-scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--deba-border);
    border-radius: 6px;
}

.nav-scroll-container .navbar-nav {
    display: inline-flex;
    flex-wrap: nowrap;
    width: auto;
}

.user-nav {
    flex-shrink: 0;
    margin-left: 4px;
    position: relative;
}

.user-nav .nav-link {
    padding: 0.5rem 0.7rem;
    background-color: #f8fafc;
    border: 1px solid #eef2f6;
}

.dropdown {
    position: static;
}

.navbar .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    margin: 0;
    border-radius: 12px;
    border: 1px solid #eef2f6;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    padding: 0.4rem 0;
    min-width: 140px;
    z-index: 1050;
}

.dropdown-item {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.dropdown-item i {
    font-size: 1rem;
    width: 1.2rem;
    color: #5f6c80;
}

.dropdown-item:hover {
    background-color: #f1f7ff;
}

.dropdown-item.active {
    background-color: #f1f7ff;
    color: var(--deba-blue);
}

.dropdown-item.active i {
    color: var(--deba-blue);
}

.dropdown-toggle::after {
    display: none;
}

.top-section {
    background-color: #f0f7ff;
    border-radius: 16px;
    padding: 1.5rem 1.25rem;
    margin: 2rem 0;
    border: 1px solid #e2eaf1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow: hidden;
}

.top-section .top-header {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 1rem;
    margin: 0 auto;
    max-width: fit-content;
    min-width: 0;
}

.top-section .section-block {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.top-section .section-block img {
    max-height: 150px;
    width: auto;
}

.top-section .title-block {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 0.5rem;
    min-height: fit-content;
    max-width: 100%;
}

.top-section .title-block h2 {
    font-weight: 700;
    color: #1a2634;
    margin-bottom: 0.3rem;
    font-size: 1.8rem;
    line-height: 1.2;
    word-break: break-word;
}

.top-section .title-block h6 {
    color: #4b5e6b;
    font-weight: 400;
    font-size: 1rem;
    margin-bottom: 0;
    word-break: break-word;
}

.top-section .action-block {
    display: flex;
    justify-content: center;
    align-items: center;
}

.top-section .action-block .btn {
    margin-top: 0;
    min-width: 140px;
}

/* 面包屑导航样式 */
.breadcrumb-wrapper {
    margin-top: 0.5rem;
    margin-bottom: -1rem;
}

.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.1s;
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item a:hover {
    color: var(--deba-blue);
}

.breadcrumb-item.active {
    color: #212529;
    font-weight: 450;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "/";
    color: #adb5bd;
}

@media (max-width: 991px) {
    .breadcrumb-wrapper.d-lg-block {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .top-section {
        margin: 1rem 0;
        padding: 1.25rem 1rem;
        gap: 1rem;
    }

    .top-section .top-header {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: center;
        gap: 0.75rem;
        max-width: 100%;
        width: 100%;
        overflow: hidden;
        padding: 0 0.25rem;
    }

    .top-section .section-block {
        justify-content: center;
        text-align: center;
        width: auto;
        max-width: 100%;
    }

    .top-section .section-block img {
        max-height: 100px;
        width: auto;
    }

    .top-section .title-block {
        width: auto;
        max-width: 100%;
        padding: 0;
    }

    .top-section .title-block h2 {
        font-size: 1.5rem;
    }

    .top-section .title-block h6 {
        font-size: 0.9rem;
    }

    .top-section .action-block .btn {
        width: 100%;
        max-width: 260px;
    }
}

.container.py-4 {
    padding-top: 0.5rem !important;
    padding-bottom: 2rem !important;
}

.footer {
    background-color: #ffffff;
    border-top: 1px solid #eef2f6;
    padding: 0.75rem 0;
    margin-top: auto;
    font-size: 0.85rem;
    color: #5a6a7a;
}

.footer a {
    color: #4a5a6a;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.1s;
    white-space: nowrap;
}

.footer a:hover {
    color: #0d6efd;
    border-bottom-color: #0d6efd80;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
}

.footer-copyright {
    color: #5a6a7a;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

@media (min-width: 991px) {
    .navbar-brand.d-lg-none {
        display: none !important;
    }

    .navbar-brand.d-none.d-lg-inline {
        display: inline-flex !important;
        align-items: center;
    }

    .navbar .navbar-nav .nav-link span {
        display: inline;
        margin-left: 4px;
        font-size: 0.95rem;
    }

    .navbar .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
        background-color: transparent;
        border: none;
    }

    .nav-scroll-container {
        white-space: normal;
        flex: 0 1 auto;
    }

    .user-nav .nav-link {
        background-color: transparent;
        border: none;
    }

    .dropdown-toggle::after {
        display: inline-block;
        margin-left: 0.4rem;
        vertical-align: middle;
    }

    .navbar .dropdown-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
    }
}

@media (max-width: 991px) {
    .footer-content {
        justify-content: center;
        gap: 0.35rem 1.2rem;
    }

    .footer-copyright {
        width: 100%;
        text-align: center;
        margin-bottom: 0.15rem;
    }

    .footer-links {
        justify-content: center;
        gap: 1.5rem;
    }

    .navbar .dropdown-menu {
        position: fixed;
        top: 60px;
        right: 16px;
        left: auto;
        width: auto;
        min-width: 150px;
    }

    .navbar-nav .nav-link.active {
        background-color: rgba(13, 110, 253, 0.12);
        border-color: var(--deba-blue);
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 0.6rem 0;
        font-size: 0.8rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
    }

    .footer-copyright {
        margin-bottom: 0.1rem;
        width: auto;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
    }

    .footer a {
        white-space: normal;
        word-break: keep-all;
    }
}

.ckeditor {
    font-size: 1rem;
    line-height: 1.6;
    color: #2c3e50;
}

.ckeditor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.ckeditor video {
    width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
    background: #000;
}

.modal-body {
    max-height: 80vh;
    overflow-y: auto;
}