/* Variables */
:root {
    --primary-color: #1a73e8;
    --primary-dark: #1557b0;
    --sidebar-bg: #f8f9fa;
    --sidebar-width: 280px;
    --header-height: 60px;
    --text-color: #202124;
    --text-secondary: #5f6368;
    --border-color: #e0e0e0;
    --hover-bg: #e8f0fe;
    --content-max-width: 900px;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: #fff;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--text-secondary);
}

.menu-toggle:hover {
    background: var(--hover-bg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), #4285f4);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.logo-text {
    font-weight: 600;
    font-size: 18px;
    color: var(--text-color);
}

.logo-badge {
    background: var(--sidebar-bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.header-center {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    gap: 10px;
    transition: all 0.2s;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.search-box .material-icons {
    color: var(--text-secondary);
    font-size: 20px;
}

.search-box input {
    flex: 1;
    border: none;
    background: none;
    font-size: 14px;
    outline: none;
    color: var(--text-color);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.search-shortcut {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.version {
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--sidebar-bg);
    padding: 4px 10px;
    border-radius: 4px;
}

/* Main Container */
.main-container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 16px 0;
    transition: transform 0.3s ease;
}

.nav {
    padding: 0 12px;
}

.nav-group-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    padding: 12px 12px 8px 12px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.nav-group-title:first-child {
    margin-top: 0;
    border-top: none;
    padding-top: 8px;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
    transition: background 0.2s;
}

.nav-header:hover {
    background: var(--hover-bg);
}

.nav-header .material-icons {
    font-size: 20px;
    color: var(--text-secondary);
}

.nav-header .arrow {
    margin-left: auto;
    font-size: 18px;
    transition: transform 0.2s;
}

.nav-header.collapsed .arrow {
    transform: rotate(-90deg);
}

.nav-items {
    display: flex;
    flex-direction: column;
    padding-left: 42px;
    overflow: hidden;
    max-height: 500px;
    transition: max-height 0.3s ease;
}

.nav-header.collapsed + .nav-items {
    max-height: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

.nav-item.active {
    background: var(--hover-bg);
    color: var(--primary-color);
    font-weight: 500;
}

.nav-item .material-icons {
    font-size: 20px;
}

.badge-new {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: auto;
}

/* Content */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 40px;
    background: #fff;
}

.content-wrapper {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Typography */
h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
}

/* Quick Start Cards */
.quick-start {
    margin-bottom: 48px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
}

.card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.15);
    transform: translateY(-2px);
}

.card-icon {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* What's New */
.whats-new {
    margin-bottom: 48px;
}

.update-item {
    border-left: 3px solid var(--primary-color);
    padding: 16px 20px;
    margin-bottom: 16px;
    background: var(--sidebar-bg);
    border-radius: 0 8px 8px 0;
}

.update-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.update-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 8px;
}

.update-badge.new {
    background: #e8f5e9;
    color: #2e7d32;
}

.update-badge.improvement {
    background: #e3f2fd;
    color: #1565c0;
}

.update-item h4 {
    font-size: 16px;
    margin: 8px 0;
    color: var(--text-color);
}

.update-item p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.update-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.update-item a:hover {
    text-decoration: underline;
}

/* Content Footer */
.content-footer {
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.content-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.content-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .header-center {
        margin: 0 20px;
    }

    .search-shortcut {
        display: none;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        z-index: 999;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 24px;
    }

    .header-center {
        display: none;
    }

    h1 {
        font-size: 28px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Construction Notice */
.construction-notice {
    display: flex;
    gap: 20px;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 1px solid #ffb74d;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.construction-icon {
    background: #ff9800;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.construction-icon .material-icons {
    color: white;
    font-size: 28px;
}

.construction-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #e65100;
    margin-bottom: 8px;
}

.construction-content p {
    font-size: 14px;
    color: #5d4037;
    line-height: 1.6;
    margin-bottom: 8px;
}

.construction-content p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .construction-notice {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Chat Popup */
.chat-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1001;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #4285f4);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.4);
    transition: all 0.3s ease;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.5);
}

.chat-button .material-icons {
    color: white;
    font-size: 28px;
}

.chat-button .chat-icon-close {
    display: none;
}

.chat-button.active .chat-icon-open {
    display: none;
}

.chat-button.active .chat-icon-close {
    display: block;
}

.chat-window {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: chatSlideUp 0.3s ease;
}

.chat-window.open {
    display: flex;
}

@keyframes chatSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-color), #4285f4);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-avatar .material-icons {
    font-size: 24px;
}

.chat-header h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.chat-status {
    font-size: 12px;
    opacity: 0.9;
}

.chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background 0.2s;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-close .material-icons {
    font-size: 20px;
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    display: flex;
    gap: 10px;
    max-width: 90%;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-message-avatar .material-icons {
    color: white;
    font-size: 18px;
}

.chat-message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 16px;
    border-top-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chat-message.user .chat-message-content {
    background: var(--primary-color);
    color: white;
    border-radius: 16px;
    border-top-right-radius: 4px;
}

.chat-message-content p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.chat-message-content a {
    color: var(--primary-color);
}

.chat-message.user .chat-message-content a {
    color: white;
    text-decoration: underline;
}

.chat-footer {
    padding: 16px;
    background: white;
    border-top: 1px solid var(--border-color);
}

.chat-input-container {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus:not(:disabled) {
    border-color: var(--primary-color);
}

.chat-input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.chat-send .material-icons {
    color: white;
    font-size: 20px;
}

.chat-coming-soon {
    display: block;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

@media (max-width: 480px) {
    .chat-container {
        bottom: 16px;
        right: 16px;
    }

    .chat-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 120px);
        bottom: 70px;
        right: -8px;
    }

    .chat-button {
        width: 54px;
        height: 54px;
    }
}
