/* ===== Base Styles ===== */
:root {
    /* Colors */
    --dark-gray: #121212;
    --medium-gray: #1e1e1e;
    --light-gray: #2d2d2d;
    --white: #ffffff;
    
    /* Primary Colors */
    --primary: #1a73e8;
    --primary-light: #4dabff;
    --secondary: #7b2cbf;
    --accent: #00c4cc;
    --success: #4caf50;
    --warning: #ffc107;
    --error: #f44336;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1a73e8 0%, #4dabff 100%);
    --gradient-secondary: linear-gradient(135deg, #7b2cbf 0%, #a44dff 100%);
    --gradient-accent: linear-gradient(135deg, #00c4cc 0%, #4dffff 100%);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--dark-gray);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ===== Neural Network Background Animation ===== */
.neural-network {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.5;
}

/* ===== Layout ===== */
.container {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 260px;
    background-color: var(--medium-gray);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.logo span {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-menu {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.menu-category {
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
    margin-top: 20px;
}

.menu-category:first-child {
    margin-top: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 4px;
    transition: var(--transition-normal);
}

.menu-item i {
    margin-right: 12px;
    font-size: 18px;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(26, 115, 232, 0.2) 0%, rgba(26, 115, 232, 0.05) 100%);
    color: var(--primary-light);
    border-left: 3px solid var(--primary);
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    padding: 24px;
    margin-left: 260px;
    width: calc(100% - 260px);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
}

/* ===== Cards ===== */
.card {
    background-color: var(--medium-gray);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    outline: none;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(26, 115, 232, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* ===== AI Assistant ===== */
.ai-assistant {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
    z-index: 999;
    transition: var(--transition-normal);
}

.ai-assistant:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(26, 115, 232, 0.4);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: var(--medium-gray);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition-fast);
}

.close-modal:hover {
    color: var(--white);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
}

/* ===== AI Suggestions ===== */
.ai-suggestion {
    background: linear-gradient(90deg, rgba(26, 115, 232, 0.1) 0%, rgba(123, 44, 191, 0.1) 100%);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
    border-left: 3px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.ai-suggestion::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    opacity: 0.05;
    border-radius: 0 0 0 100%;
}

.ai-suggestion-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-light);
}

.ai-suggestion-title i {
    margin-right: 8px;
}

.ai-suggestion-content {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* ===== Stats Cards ===== */
.stat-card {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.1) 0%, rgba(123, 44, 191, 0.1) 100%);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hexagon-bg {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    opacity: 0.1;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transform: rotate(30deg);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-right: 16px;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.stat-content {
    flex: 1;
}

.stat-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-trend {
    font-size: 12px;
    display: flex;
    align-items: center;
}

.stat-trend i {
    margin-right: 4px;
}

.stat-trend.positive {
    color: var(--success);
}

.stat-trend.negative {
    color: var(--error);
}

.stat-trend.neutral {
    color: var(--warning);
}

/* ===== Progress Bar ===== */
.progress-bar {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

/* ===== Filters ===== */
.filters {
    display: flex;
    gap: 8px;
}

.filter {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-normal);
    color: rgba(255, 255, 255, 0.7);
}

.filter:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.05);
}

.filter.active {
    background-color: rgba(26, 115, 232, 0.2);
    color: var(--primary-light);
}

/* ===== AI Badge ===== */
.ai-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(90deg, rgba(26, 115, 232, 0.2) 0%, rgba(123, 44, 191, 0.2) 100%);
    border-radius: var(--radius-full);
    font-size: 14px;
    color: var(--primary-light);
}

.ai-chip i {
    margin-right: 6px;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: rgba(26, 115, 232, 0.2);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--primary-light);
}

.ai-badge i {
    margin-right: 4px;
    font-size: 10px;
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.tab {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-normal);
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.tab i {
    margin-right: 8px;
}

.tab:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.05);
}

.tab.active {
    background-color: rgba(26, 115, 232, 0.2);
    color: var(--primary-light);
}

/* ===== Switch Toggle ===== */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch.small {
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: var(--transition-normal);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-normal);
}

.switch.small .slider:before {
    height: 14px;
    width: 14px;
}

input:checked + .slider {
    background: var(--gradient-primary);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.switch.small input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* ===== Learning Path Visualization ===== */
.learning-path-visualization {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 20px 0;
    position: relative;
}

.learning-path-visualization::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.path-node {
    display: flex;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.node-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.path-node.completed .node-icon {
    background: var(--success);
    color: white;
}

.path-node.current .node-icon {
    background: var(--primary);
    color: white;
    animation: pulse 2s infinite;
}

.path-node.locked .node-icon {
    background: var(--light-gray);
    color: rgba(255, 255, 255, 0.5);
}

.node-content {
    background: var(--light-gray);
    border-radius: var(--radius-lg);
    padding: 16px;
    flex: 1;
}

.node-content h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.node-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.node-status {
    font-size: 12px;
}

.path-node.completed .node-status {
    color: var(--success);
}

.path-node.locked .node-status {
    color: rgba(255, 255, 255, 0.5);
}

.node-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.node-progress .progress-bar {
    flex: 1;
}

.node-progress span {
    font-size: 12px;
    color: var(--primary-light);
}

.path-legend {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.legend-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.legend-icon.completed {
    background: var(--success);
}

.legend-icon.current {
    background: var(--primary);
}

.legend-icon.locked {
    background: var(--light-gray);
}

/* ===== Animations ===== */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(26, 115, 232, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(26, 115, 232, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(26, 115, 232, 0);
    }
}

/* ===== Toast Notifications ===== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(33, 33, 33, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===== Loading Animation ===== */
.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(0.5);
        opacity: 0.5;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== Action Modal ===== */
#actionModal {
    z-index: 1001;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-left: 220px;
        width: calc(100% - 220px);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .logo span, .menu-item span, .menu-category {
        display: none;
    }
    
    .menu-item {
        justify-content: center;
    }
    
    .menu-item i {
        margin-right: 0;
        font-size: 20px;
    }
    
    .main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
        padding: 16px;
    }
    
    .card {
        padding: 16px;
    }
}

@media (max-width: 576px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .stat-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 12px;
    }
}

/* ===== Footer ===== */
.footer {
    background-color: var(--medium-gray);
    padding: 15px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 20px;
}

.copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* ===== 水印样式 ===== */
.watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 48px;
    color: rgba(255, 255, 255, 0.05);
    pointer-events: none;
    z-index: 1;
    user-select: none;
    font-weight: bold;
    letter-spacing: 8px;
}
