/* 基础样式与变量 */
:root {
    --primary-color: #4f8fda;
    --primary-light: #e9f2ff;
    --secondary-color: #f0f5ff;
    --text-color: #333;
    --text-light: #666;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --card-bg: #ffffff;
    --sidebar-bg: #f8f9fa;
    --sidebar-width: 80px;
    --sidebar-expanded: 200px;
    --detail-width: 300px;
    --detail-collapsed: 60px;
    --border-radius: 12px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

/* 深色模式变量 */
body.dark-mode {
    --primary-color: #5b9aef;
    --primary-light: #2a3a51;
    --secondary-color: #1a2332;
    --text-color: #e0e0e0;
    --text-light: #aaaaaa;
    --gray-100: #1a1a1a;
    --gray-200: #2c2c2c;
    --gray-300: #3d3d3d;
    --gray-400: #5a5a5a;
    --gray-500: #6e6e6e;
    --card-bg: #1e2837;
    --sidebar-bg: #111827;
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    background-color: var(--secondary-color);
    font-size: 16px;
    line-height: 1.5;
    transition: var(--transition);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* 主容器布局 */
.container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr var(--detail-width);
    min-height: 100vh;
    position: relative;
}

/* 左侧导航栏 */
.sidebar {
    background: var(--sidebar-bg);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    position: sticky;
    top: 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
    z-index: 10;
    width: var(--sidebar-width);
}

.logo {
    margin-bottom: 30px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 10px;
}

.logo-icon {
    font-size: 18px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex-grow: 1;
}

.nav-item {
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
    position: relative;
}

.nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    color: var(--text-light);
    transition: var(--transition);
}

.nav-item svg {
    width: 22px;
    height: 22px;
    margin-bottom: 5px;
}

.nav-text {
    font-size: 12px;
    opacity: 0;
    transform: translateY(-5px);
    transition: var(--transition);
}

.nav-item:hover .nav-text,
.nav-item.active .nav-text {
    opacity: 1;
    transform: translateY(0);
}

.nav-item.active a {
    color: var(--primary-color);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    height: 70%;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 0 4px 4px 0;
    top: 15%;
    transform: scaleY(0.7);
}

.nav-footer {
    margin-top: auto;
    width: 100%;
    padding: 10px 0;
    text-align: center;
}

.settings {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-light);
}

.settings svg {
    width: 20px;
    height: 20px;
    margin-bottom: 5px;
}

/* 主内容区域 */
.main-content {
    padding: 20px;
    width: 100%;
    overflow-y: auto;
}

/* 欢迎栏 */
.welcome-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: var(--box-shadow);
}

.welcome-text h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.welcome-text p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.user-name {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-100);
    color: var(--text-light);
    transition: var(--transition);
}

.theme-toggle:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 内容区域 */
.content-area {
    width: 100%;
}

.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.section-header p {
    color: var(--text-light);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Bento 卡片布局 */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 20px;
}

.bento-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* 卡片大小配置 */
#profile-card {
    grid-column: span 1;
    grid-row: span 1;
}

#growth-card {
    grid-column: span 1;
    grid-row: span 2;
}

#goals-card {
    grid-column: span 1;
    grid-row: span 1;
}

#stats-card {
    grid-column: span 1;
    grid-row: span 1;
}

/* 卡片头部 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

/* 个人简介卡片 */
.profile-info {
    margin-bottom: 15px;
}

.profile-info li {
    padding: 8px 0;
    display: flex;
    border-bottom: 1px solid var(--gray-200);
}

.profile-info li span {
    font-weight: 500;
    margin-right: 10px;
    width: 60px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 5px 10px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 0.8rem;
}

/* 成长轨迹卡片 */
.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background-color: var(--gray-300);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding-bottom: 25px;
}

.timeline-dot {
    position: absolute;
    left: -26px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid var(--card-bg);
    z-index: 2;
}

.timeline-content h4 {
    margin-bottom: 5px;
    color: var(--primary-color);
}

.timeline-content p {
    color: var(--text-light);
}

/* 目标卡片 */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.goal-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.goal-progress {
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.goal-progress::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: var(--primary-color);
    width: attr(data-progress);
    border-radius: 4px;
}

.goal-progress[data-progress="75"]::after {
    width: 75%;
}

.goal-progress[data-progress="30"]::after {
    width: 30%;
}

.goal-progress[data-progress="90"]::after {
    width: 90%;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background-color: var(--primary-light);
    border-radius: 10px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* 作品展示页面 */
.work-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.work-preview {
    height: 160px;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin: -20px -20px 15px -20px;
}

.work-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.work-card:hover .work-preview img {
    transform: scale(1.05);
}

.work-card h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.work-card p {
    margin-bottom: 12px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* 技能树页面样式 */
.skills-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.skill-category {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
}

.skill-category h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.skill-icon svg {
    width: 20px;
    height: 20px;
}

.skill-details {
    flex: 1;
}

.skill-details h4 {
    margin-bottom: 5px;
    font-size: 1rem;
}

/* 收藏夹页面样式 */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.favorite-item {
    display: flex;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    gap: 15px;
}

.favorite-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.favorite-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.favorite-icon svg {
    width: 24px;
    height: 24px;
}

.favorite-details {
    flex: 1;
}

.favorite-details h3 {
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.favorite-details p {
    color: var(--text-light);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.favorite-link {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    transition: transform 0.2s ease;
}

.favorite-link:hover {
    transform: translateX(5px);
}

/* 右侧详情栏 */
.detail-sidebar {
    background-color: var(--card-bg);
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.03);
    padding: 20px;
    height: 100vh;
    position: sticky;
    top: 0;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    width: var(--detail-width);
}

.detail-sidebar.collapsed {
    width: var(--detail-collapsed);
    padding: 20px 10px;
}

.sidebar-toggle {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.detail-sidebar.collapsed .sidebar-toggle {
    left: 15px;
}

.detail-sidebar.collapsed .profile-header,
.detail-sidebar.collapsed .profile-details {
    opacity: 0;
    visibility: hidden;
}

.profile-header {
    text-align: center;
    margin-bottom: 25px;
    padding-top: 20px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--primary-light);
}

.profile-header h3 {
    margin-bottom: 5px;
}

.profile-header p {
    color: var(--text-light);
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.detail-section h4 {
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.detail-section h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.detail-section ul li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.detail-section ul li span {
    font-weight: 500;
    margin-right: 6px;
}

.detail-section svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.detail-section p {
    line-height: 1.6;
    color: var(--text-light);
}

.skill-progress {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skill {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.progress-bar {
    height: 6px;
    background-color: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* 移动端信息浮层 */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-overlay.transitioning {
    animation: shrinkToAvatar 1s forwards;
}

@keyframes shrinkToAvatar {
    0% {
        opacity: 1;
        visibility: visible;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        visibility: hidden;
        transform: scale(0.1) translateX(300px) translateY(-300px);
    }
}

.mobile-profile-panel {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    width: 85%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.4s ease;
}

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

.mobile-profile-header {
    padding: 25px 20px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--gray-200);
}

.close-profile {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.mobile-profile-details {
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    :root {
        --detail-width: 250px;
    }
    
    .container {
        grid-template-columns: var(--sidebar-width) 1fr var(--detail-width);
    }
    
    .skills-container,
    .favorites-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .container {
        grid-template-columns: var(--sidebar-width) 1fr;
    }
    
    .detail-sidebar {
        display: none;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        height: auto;
        width: 100%;
        padding: 10px 0;
        flex-direction: row;
        justify-content: space-around;
        z-index: 100;
    }
    
    .logo, .nav-footer {
        display: none;
    }
    
    .nav-links {
        flex-direction: row;
        justify-content: space-around;
    }
    
    .nav-item {
        margin-bottom: 0;
    }
    
    .nav-item.active::before {
        height: 4px;
        width: 50%;
        top: 0;
        left: 25%;
        transform: scaleY(1);
    }
    
    .nav-text {
        display: none;
    }
    
    .nav-item:hover .nav-text {
        display: none;
    }
    
    .main-content {
        padding-bottom: 80px;
    }
    
    .welcome-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        margin-top: 15px;
        align-self: flex-end;
    }
    
    .favorites-grid {
        grid-template-columns: 1fr;
    }
    
    .favorite-item {
        padding: 15px;
    }
} 