/* =========================================================
   02-layout · 布局骨架
   承载范围：原 style.css 第 143-422 行
   本节包含：
     - 顶部横幅
     - 樱花层
     - 主体布局 app-container
     - 侧边栏
     - 主内容区
   ========================================================= */

/* ============= 顶部横幅 ============= */
.banner {
    position: relative;
    width: 100%;
    height: var(--banner-height);
    overflow: hidden;
    background: var(--banner-gradient);
    z-index: 2;
}

.banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.5s ease;
}

.banner-img.has-image {
    opacity: 1;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--scrim-15);
    z-index: 3;
    pointer-events: none;
}

.banner-img.has-image + .banner-overlay {
    background: var(--scrim-30);
}

.banner-title {
    font-size: 42px;
    font-weight: 800;
    color: var(--white);
    text-shadow: 0 2px 12px var(--accent-shadow-strong);
    letter-spacing: 4px;
}

.banner-subtitle {
    font-size: 15px;
    color: var(--glass-85);
    margin-top: 8px;
    letter-spacing: 3px;
    text-shadow: 0 1px 6px var(--accent-shadow);
}

/* ============= 樱花层 ============= */
#sakuraCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
}

/* ============= 主体布局 ============= */
.app-container {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: calc(100vh - var(--banner-height) - var(--divider-height));
}

/* ============= 侧边栏（圆角卡片独立形式） ============= */
.sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--surface-soft);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    overflow-y: auto;
    margin: 20px 0 20px 20px;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

.sidebar-brand {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-light);
}

.sidebar-avatar {
    margin: 0 auto 10px;
    width: 72px;
    height: 72px;
    position: relative;
}

.sidebar-avatar::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-hover), var(--accent-soft));
    z-index: -1;
    animation: avatarGlow 3s ease-in-out infinite;
}

@keyframes avatarGlow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.12); opacity: 1; }
}

/* 头像跟随外框尺寸：外框（.sidebar-avatar）负责定大小，图片只负责填满 */
.sidebar-avatar .avatar-placeholder,
.sidebar-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pink-300);
    padding: 2px;
    background: linear-gradient(135deg, var(--pink-200), var(--pink-400));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-on-accent);
}

.sidebar-brand h3 {
    font-size: 16px;
    color: var(--pink-700);
    letter-spacing: 1px;
}

.sidebar-brand p {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* 导航 */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-soft);
    padding: 11px 16px;
    border-radius: 50px;
    font-weight: 600;
    color: var(--pink-700);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s;
    border: 1px solid var(--border-light);
    font-size: 14px;
}

.nav-item:hover {
    background: var(--accent-hover);
    border-color: var(--border-medium);
    transform: translateX(3px);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--pink-300), var(--pink-500));
    color: var(--white);
    box-shadow: 0 4px 14px var(--accent-glow);
    border-color: transparent;
}

.nav-icon {
    font-size: 17px;
    width: 22px;
    text-align: center;
}

.sidebar-footer {
    border-top: 1px dashed var(--border-light);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}



.sidebar-copy {
    font-size: 10px;
    color: var(--text-muted);
}

/* 侧边栏低调的管理面板入口：默认半透明，悬停才明显 */
.sidebar-admin-link {
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    opacity: 0.35;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.sidebar-admin-link:hover {
    opacity: 1;
    transform: rotate(30deg);
}

/* ============= 主内容区 ============= */
.main-content {
    flex: 1;
    padding: 36px 44px;
    min-height: 500px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.main-content::-webkit-scrollbar {
    width: 6px;
}
.main-content::-webkit-scrollbar-track {
    background: transparent;
}
.main-content::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

.content-panel {
    display: none;
    animation: panelIn 0.35s ease;
}

.content-panel.active-panel {
    display: block;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
