/* ===========================
   主题变量（深色 + 玻璃）
   =========================== */
:root {
    --primary: rgba(98, 95, 255, 0.85);
    --background: #0b1220;
    --surface: rgba(30, 41, 59, 0.65);
    --surface-strong: rgba(30, 41, 59, 0.9);
    --surface-light: rgba(51, 65, 85, 0.6);
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.15);
    --blur: blur(16px);
    --radius: 16px;
    --transition: 0.35s cubic-bezier(.4, 0, .2, 1);
}

/* ===========================
   全局重置
   =========================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    background: radial-gradient(
        circle at 20% 20%,
        rgba(98,95,255,0.12),
        transparent 40%
    ), var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow: hidden;
}

/* ===========================
   侧边栏
   =========================== */

.sidebar-wrapper {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
}

.sidebar {
    width: 72px;
    height: 100vh;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    backdrop-filter: var(--blur);
    border-right: 1px solid var(--border);
    transition: width var(--transition);
    overflow: hidden;
}

/* 展开 */
.sidebar:hover {
    width: 230px;
}

/* 头部 */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-left: 8px; 
    transition: padding-left var(--transition);
}


.sidebar-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    transition: margin-right var(--transition);
}
.sidebar:not(:hover) .sidebar-logo {
    margin-right: -12px; 
}
.sidebar:hover .sidebar-logo {
    margin-right: 0;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity var(--transition), margin-left var(--transition);
}

.sidebar:hover .sidebar-title {
    opacity: 1;
    margin-left: 0;
}

/* ===========================
   导航项
   =========================== */

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-muted);
    transition: all var(--transition);
    position: relative;
}

.nav-item .text {
    opacity: 0;
    white-space: nowrap;
    transition: opacity var(--transition);
}

.sidebar:hover .nav-item .text {
    opacity: 1;
}

/* 图标 */
.icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform var(--transition);
}

/* hover 效果 */
.nav-item:hover {
    background: var(--surface-light);
    color: var(--text);
    transform: translateX(6px);
}

.nav-item:hover .icon {
    transform: scale(1.15);
}

/* active */
.nav-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px rgba(98,95,255,0.4);
}

/* ===========================
   主区域
   =========================== */

.main {
    margin-left: 72px;
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

.sidebar:hover ~ .main {
    margin-left: 230px;
}

/* ===========================
   顶栏
   =========================== */

.topbar {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 28px;
    background: var(--surface);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border);
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 6px;
}

.breadcrumb-current {
    font-size: 14px;
    color: var(--text);
}

/* ===========================
   内容居中重构
   =========================== */

.content {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 40px;
}

/* 卡片 */
.box {
    background: var(--surface);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 60px 80px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    transition: transform var(--transition);
}

.box:hover {
    transform: translateY(-6px);
}

/* 标题区域 */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 40px;
}

.logo {
    width: 64px;
    height: 64px;
    transition: transform var(--transition);
}

.logo:hover {
    transform: rotate(8deg) scale(1.1);
}

h1 {
    font-size: 40px;
    font-weight: 700;
}

h1 span {
    color: var(--primary);
}

/* ===========================
   搜索栏（玻璃升级版）
   =========================== */

.search-bar {
    width: 520px;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 12px 0 20px;
    border-radius: 20px;
    background: var(--surface-strong);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.search-bar:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(98,95,255,0.25);
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 16px;
}

.search-bar button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all var(--transition);
}

.search-bar button:hover {
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(98,95,255,0.6);
}
