
/* ==================== 网站作品模块 ==================== */
.portfolio-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 25px;  /* 添加模块之间的间距 */
    border-left: 4px solid #43a047;
    transition: all 0.3s;
}

.portfolio-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(67, 160, 71, 0.2);
}

.portfolio-item h3 {
    color: #43a047;
    margin-bottom: 10px;
}

.portfolio-item p {
    color: #757575;
    margin-bottom: 15px;
}

.portfolio-item a {
    color: #43a047;
    font-weight: 600;
}



/* ==================== 统一导航栏样式 ==================== */
nav {
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

nav .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

nav .logo-img {
    max-height: 35px;
    width: auto;
}

nav .logo-text {
    color: #43a047;
    font-weight: bold;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* 默认导航链接样式 */
nav ul li a {
    color: #666;  /* 黑灰色正常字体 */
    text-decoration: none;
    font-weight: 500;  /* 正常字重 */
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
}

/* 当前页面高亮样式（墨绿色加粗） */
nav ul li a.active,
nav ul li a.current-page {
    color: #2e7d32;  /* 墨绿色 */
    font-weight: bold;  /* 加粗 */
    background: #e8f5e9;  /* 浅绿色背景 */
}

/* 悬停效果 */
nav ul li a:hover {
    background: #e8f5e9;
    color: #43a047;
}

/* 登录 | 注册 样式（小一号墨绿色字体） */
nav .auth-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

nav .auth-links a {
    color: #2e7d32;  /* 墨绿色 */
    font-size: 0.9rem;  /* 比其他栏目小1号（默认1rem） */
    font-weight: 400;  /* 正常字体，不加粗 */
    text-decoration: none;
    transition: all 0.3s;
}

/* 确保auth-links不被其他样式覆盖 */
nav .auth-links a.spacer {
    color: #999;  /* 分隔符颜色 */
    font-weight: 400;
    font-size: 0.9rem;
}

nav .auth-links a:hover {
    color: #43a047;
    text-decoration: underline;
}


/* ==================== 统一底栏样式 ==================== */
footer {
    background: white !important;
    color: #43a047;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    width: 100%;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;  /* 垂直居中 */
}

.footer-column {
    display: flex;
    flex-direction: column;
    justify-content: center;  /* 垂直居中 */
    align-items: center;  /* 水平居中 */
    min-height: 100%;
}

.footer-column h4 {
    color: #43a047;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-links, .social-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li, .social-links li {
    margin-bottom: 10px;
}

.footer-links a, .social-links a {
    color: #43a047;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.footer-links a:hover, .social-links a:hover {
    color: #2e7d32;
    text-decoration: underline;
}

/* User用户中心样式 - 登录用户访问 */

:root {
    --primary-color: #43a047;
    --secondary-color: #66bb6a;
    --accent-color: #2e7d32;
    --success-color: #43a047;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --border-color: #dee2e6;
    --green-gradient: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    --green-hover: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans), 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%) !important;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 用户Dashboard容器 */
.dashboard-container {
    max-width: 900px;
    margin: 40px auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.dashboard-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 28px;
}

.dashboard-header p {
    margin: 10px 0 0;
    opacity: 0.9;
}

.dashboard-content {
    padding: 30px;
}

/* 欢迎区域 */
.welcome-section {
    background: var(--light-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.welcome-section h2 {
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 10px;
}

/* 用户信息卡片 */
.user-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: var(--light-color);
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.info-card h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 10px;
}

.info-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* 编辑区域 */
.edit-section {
    background: var(--light-color);
    border-radius: 10px;
    padding: 30px;
    margin-top: 30px;
}

.edit-section h2 {
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* 按钮样式 */
.btn-save {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-save:active {
    transform: translateY(0);
}

.btn-logout {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c82333;
}

/* 消息提示 */
.message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 返回链接 */
.back-link {
    text-align: center;
    margin-bottom: 20px;
}

.back-link a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: background 0.3s;
}

.back-link a:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
}

/* 活动列表 */
.activity-list {
    list-style: none;
    padding: 0;
}

.activity-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-item .time {
    color: #999;
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .dashboard-container {
        margin: 20px auto;
    }
    
    .user-info {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-warning {
    background: var(--warning-color);
    color: #333;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

/* ==================== 用户信息样式 ==================== */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

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

.username {
    color: #43a047;
    font-weight: 600;
    font-size: 0.95rem;
}

.admin-badge {
    background: #43a047;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
}

#auth-links {
    display: block;
}

/* ==================== 网站作品页面样式（图文并茂） ==================== */
.portfolio-intro {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border-radius: 15px;
    border-left: 4px solid #43a047;
}

.portfolio-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #43a047;
    transition: all 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(67, 160, 71, 0.15);
}

.portfolio-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.portfolio-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.portfolio-title {
    flex: 1;
    min-width: 200px;
}

.portfolio-title h3 {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    color: #333;
}

.portfolio-title h3 a {
    color: #43a047;
    text-decoration: none;
    transition: all 0.3s;
}

.portfolio-title h3 a:hover {
    color: #2e7d32;
    text-decoration: underline;
}

.portfolio-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #43a047;
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.toggle-details {
    padding: 10px 20px;
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.toggle-details:hover {
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 160, 71, 0.3);
}

.toggle-details:active {
    transform: translateY(0);
}

.portfolio-summary {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    border-left: 3px solid #e0e0e0;
}

.portfolio-summary p {
    margin: 0;
    color: #555;
    line-height: 1.7;
    font-size: 1rem;
}

.portfolio-details {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e8f5e9;
    animation: fadeInDown 0.3s ease;
}

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

.detail-section {
    margin-bottom: 20px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h4 {
    color: #43a047;
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section h4 i {
    color: #43a047;
}

.detail-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.detail-section li {
    padding: 8px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #555;
    transition: all 0.3s;
}

.detail-section li:hover {
    background: #e8f5e9;
    border-color: #43a047;
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .portfolio-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .portfolio-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .portfolio-title h3 {
        font-size: 1.2rem;
    }

    .toggle-details {
        width: 100%;
        justify-content: center;
    }

    .detail-section ul {
        grid-template-columns: 1fr;
    }

    .portfolio-card {
        padding: 20px;
    }
}

/* ====== AI工具样式 ====== */

/* AI工具容器 */
.ai-tools-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 工具分类 */
.tools-category {
    margin-bottom: 50px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.tools-category:hover {
    box-shadow: 0 8px 30px rgba(67, 160, 71, 0.15);
}

/* 分类标题 */
.tools-category h2 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 1.8rem;
}

/* 分类头部 */
.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #e8f5e9;
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
}

.category-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

/* 工具网格 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

/* 工具卡片 */
.tool-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(67, 160, 71, 0.2);
    border-color: #43a047;
}

/* 工具名称 */
.tool-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.tool-name i {
    color: #43a047;
    font-size: 1.2rem;
}

/* 工具描述 */
.tool-desc {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    flex: 1;
}

/* 工具链接 */
.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    justify-content: center;
    margin-top: auto;
}

.tool-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.4);
    background: linear-gradient(135deg, #388e3c 0%, #43a047 100%);
}

.tool-link i {
    font-size: 0.9rem;
}

/* 博客文章样式 */
.blog-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.blog-post {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(67, 160, 71, 0.2);
}

.blog-post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-post h3 {
    padding: 20px 20px 10px;
    color: #2c3e50;
    font-size: 1.4rem;
}

.blog-post p {
    padding: 0 20px 20px;
    color: #555;
    line-height: 1.6;
}

.blog-post a {
    display: block;
    margin: 0 20px 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #43a047 0%, #66bb6a 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-post a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.4);
}


/* ==================== 侧边栏样式 ==================== */
.layout-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

.sidebar-nav {
    width: 220px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px;
    flex-shrink: 0;
}

.sidebar-nav h3 {
    color: #43a047;
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f5e9;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav ul li a {
    display: block;
    padding: 12px 15px;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.sidebar-nav ul li a:hover {
    background: #e8f5e9;
    color: #43a047;
}

.sidebar-nav ul li a.active {
    background: #43a047;
    color: white;
}

.sidebar-nav ul li a i {
    margin-right: 10px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

/* 响应式侧边栏 */
@media (max-width: 768px) {
    .layout-container {
        flex-direction: column;
    }
    
    .sidebar-nav {
        width: 100%;
        order: 1;
    }
    
    .main-content {
        order: 2;
    }
}
