/* ==========================================================================
   CSS Custom Properties & Reset — 少女粉白主题 ♡
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=Nunito:wght@400;600;700;800&display=swap');

:root {
    /* Colors - Soft Pink & White Theme */
    --bg-main: #FFF5F7;
    --bg-sidebar: #FFFFFF;
    --bg-surface: #FFFFFF;
    --bg-surface-hover: #FFF0F3;

    --border-color: #F5C6D0;
    --border-light: #FADCE3;

    --primary: #FF6B95;
    --primary-hover: #FF85A8;
    --primary-glow: rgba(255, 107, 149, 0.12);

    --secondary: #C084FC;
    --success: #34D399;
    --warning: #FBBF24;
    --danger: #FB7185;

    --text-main: #4A3040;
    --text-muted: #9B7A8C;
    --text-dark: #3B1F30;
    --surface: #FFFFFF;
    --border: #F5C6D0;

    /* Typography: Extremely Rounded / Kawaii Font Stack */
    --font-main: 'Baloo 2', 'YouYuan', '幼圆', 'Nunito', 'M PLUS Rounded 1c', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Layout */
    --sidebar-width: 280px;
    --right-sidebar-width: 320px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(255, 107, 149, 0.08);
    --shadow-md: 0 4px 14px rgba(255, 107, 149, 0.12);
    --shadow-lg: 0 8px 30px rgba(255, 107, 149, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30.5 45c-4.5 0-8.5-4-9-8.5-.5-5.5 3-10 8-10.5 5.5-.5 10.5 3.5 10.5 9 0 5.5-4 10-9.5 10zM19.5 29c-3 0-5.5-2.5-6-5.5-.5-3.5 1.5-6.5 5-7 3.5-.5 6.5 1.5 7 5 .5 3.5-2 6.5-6 7.5zM41.5 29c-4 1-6.5-2-6-5.5.5-3.5 3.5-5.5 7-5 3.5.5 5.5 3.5 5 7-.5 3 3 5.5-3zM28.5 16.5c-3 0-5.5-2.5-6-5.5-.5-3.5 1.5-6.5 5-7 3.5-.5 6.5 1.5 7 5 .5 3.5-2 6.5-6 7.5z' fill='%23FFB3C6' fill-opacity='0.25' fill-rule='evenodd'/%3E%3C/svg%3E");
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.3;
    font-weight: 600;
    color: var(--text-dark);
}

.highlight {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    gap: 0.4rem;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B95, #FF85A8);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FF85A8, #FFB3C6);
    box-shadow: 0 4px 15px rgba(255, 107, 149, 0.35);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-surface-hover);
    border-color: var(--primary);
}

.btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
}

/* ==========================================================================
   Sidebar — 粉色简洁风
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #FFFFFF 0%, #FFF5F7 100%);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #FF6B95, #C084FC);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
}

.sidebar-search {
    padding: 1rem 1.5rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-box input {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem 0.6rem 2.2rem;
    border-radius: 20px;
    color: var(--text-main);
    outline: none;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-box input::placeholder {
    color: #D4A0B0;
}

.sidebar-nav {
    padding: 0.5rem 1rem;
    flex-grow: 1;
    overflow-y: auto;
}

.nav-group {
    margin-bottom: 1.5rem;
}

.nav-group h3 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    font-weight: 700;
}

.nav-group ul li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.6rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    border-radius: 10px;
}

.nav-group ul li a i {
    font-size: 0.95rem;
    width: 20px;
    text-align: center;
    color: #E0B0C0;
}

.nav-group ul li a:hover {
    background: var(--bg-surface-hover);
    color: var(--text-dark);
}

@keyframes paw-wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-15deg) translateY(-2px);
    }

    75% {
        transform: rotate(15deg) translateY(-2px);
    }
}

.nav-group ul li a:hover i {
    color: var(--primary);
    animation: paw-wiggle 0.5s ease;
}

.nav-group ul li a.active {
    background: var(--primary-glow);
    color: var(--primary);
    font-weight: 600;
}

.nav-group ul li a.active i {
    color: var(--primary);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.progress-widget .progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 6px;
    background: var(--bg-main);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF6B95, #C084FC);
    border-radius: 3px;
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    margin-right: var(--right-sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-bar {
    height: 70px;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 245, 247, 0.92);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.content-wrapper {
    padding: 2.5rem 3rem;
    max-width: 1400px;
    width: 100%;
}

.kb-section {
    margin-bottom: 4rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.section-title h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.section-title i {
    color: var(--text-muted);
}

.section-title i.highlight {
    color: var(--primary);
}

.cards-grid {
    display: grid;
    gap: 1.5rem;
}

.shortcut-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.tutorials-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Note Cards */
.note-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.note-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Shortcut Cards */
.shortcut-card {
    display: flex;
    flex-direction: column;
}

.shortcut-card .card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.shortcut-card h4 {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 600;
    color: var(--text-dark);
}

.key-badge {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--primary);
    white-space: nowrap;
}

.shortcut-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Tutorial Cards */
.tutorial-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.note-image {
    height: 160px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.note-image .tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    color: var(--primary);
    border: 1px solid rgba(255, 107, 149, 0.2);
}

.note-image .level-beginner {
    color: var(--success);
}

.note-image .level-advanced {
    color: var(--danger);
}

.note-image .level-intermediate {
    color: var(--primary);
}

.note-image .level-expert {
    color: #8B5CF6;
}

.tutorial-card .card-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tutorial-card .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-weight: 600;
    color: var(--text-dark);
}

.tutorial-card .card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.simple-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.simple-footer .date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-weight: 500;
}

.status-review {
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.status-done {
    background: rgba(52, 211, 153, 0.1);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

/* Tabs */
.simple-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover {
    background: var(--bg-surface-hover);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary-glow);
    color: var(--primary);
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .right-sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        margin-right: 0;
    }

    .top-bar,
    .content-wrapper {
        padding: 1.5rem;
    }

    .shortcut-grid,
    .tutorials-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Right Sidebar (Shortcuts) — 粉色快捷键面板
   ========================================================================== */
.right-sidebar {
    width: var(--right-sidebar-width);
    background: linear-gradient(180deg, #FFFFFF 0%, #FFF5F7 100%);
    border-left: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.right-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.right-sidebar-header h2 {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.right-sidebar-header i {
    color: var(--primary);
    font-size: 1.2rem;
}

.right-sidebar-content {
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto;
}

.shortcut-category {
    margin-bottom: 2rem;
}

.shortcut-category h3 {
    font-size: 0.85rem;
    color: var(--text-dark);
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.shortcut-category h3 i {
    color: var(--primary);
}

.shortcut-item {
    margin-bottom: 1.2rem;
}

.shortcut-item .keys {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

.shortcut-item .keys kbd {
    background: #FFF0F3;
    border: 1px solid var(--border-color);
    border-bottom-width: 2px;
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-family: var(--font-main);
    font-weight: 600;
    color: var(--primary);
}

.shortcut-item .keys .plus {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.shortcut-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}