* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* 导航栏 */
.navbar {
    background-color: #fff;
    box-shadow: var(--shadow);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-menu a {
    color: var(--dark-text);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.username {
    color: var(--secondary-color);
    font-weight: 500;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* 主页 - 个性化头部 */
.home-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 4rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.home-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.gif-container {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.welcome-gif {
    max-width: 300px;
    max-height: 300px;
    width: auto;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: floatGif 3s ease-in-out infinite;
    transition: transform 0.3s;
}

.welcome-gif:hover {
    transform: scale(1.05);
}

@keyframes floatGif {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.header-text {
    position: relative;
    z-index: 2;
    flex: 1;
    text-align: left;
}

.main-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: fadeInLeft 0.8s ease;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.subtitle {
    font-size: 1.3rem;
    color: var(--secondary-color);
    font-weight: 300;
    animation: fadeInLeft 0.8s ease 0.2s both;
}

/* 模块卡片 */
.modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.module-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.module-card:hover::before {
    transform: scaleX(1);
}

.module-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.module-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.module-card:hover h2 {
    color: #764ba2;
}

.module-card p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.module-card .btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.module-card .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.module-card .btn:hover::after {
    width: 300px;
    height: 300px;
}

/* 不同卡片的特殊效果 */
.card-1 {
    background: linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
}

.card-2 {
    background: linear-gradient(135deg, #fff 0%, #fff5f8 100%);
}

.card-3 {
    background: linear-gradient(135deg, #fff 0%, #f0fff4 100%);
}

.card-4 {
    background: linear-gradient(135deg, #fff 0%, #fffef0 100%);
}

/* 文章列表 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    color: var(--dark-text);
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s;
}

.article-card:hover {
    box-shadow: var(--shadow-lg);
}

.article-card h2 {
    margin-bottom: 0.5rem;
}

.article-card h2 a {
    color: var(--dark-text);
    text-decoration: none;
    transition: color 0.3s;
}

.article-card h2 a:hover {
    color: var(--primary-color);
}

.article-meta {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 0.5rem 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* 文章详情 */
.article-detail {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.article-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.article-header h1 {
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.article-content {
    line-height: 1.8;
    margin-bottom: 2rem;
}

.article-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* Markdown样式 */
.markdown-body {
    color: var(--dark-text);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.25;
}

.markdown-body h1 {
    font-size: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3rem;
}

.markdown-body h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3rem;
}

.markdown-body h3 {
    font-size: 1.25rem;
}

.markdown-body p {
    margin-bottom: 1rem;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.markdown-body li {
    margin-bottom: 0.5rem;
}

.markdown-body code {
    background-color: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.markdown-body pre {
    background-color: #f4f4f4;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.markdown-body pre code {
    background-color: transparent;
    padding: 0;
}

.markdown-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-left: 0;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.markdown-body a {
    color: var(--primary-color);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

.markdown-body table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1rem;
}

.markdown-body table th,
.markdown-body table td {
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    text-align: left;
}

.markdown-body table th {
    background-color: var(--light-bg);
    font-weight: 600;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--dark-text);
}

.login-hint {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--light-bg);
    border-radius: 4px;
    font-size: 0.9rem;
}

.login-hint ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

/* 表单 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* 编辑文章 */
.edit-article {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.edit-article h1 {
    margin-bottom: 2rem;
    color: var(--dark-text);
}

.article-form textarea {
    font-family: 'Courier New', monospace;
    resize: vertical;
}

/* 用户管理 */
.users-table {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.users-table table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.users-table th {
    background-color: var(--light-bg);
    font-weight: 600;
}

.users-table tr:hover {
    background-color: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-level-3 {
    background-color: var(--danger-color);
    color: white;
}

.badge-level-2 {
    background-color: var(--success-color);
    color: white;
}

.badge-level-1 {
    background-color: var(--info-color);
    color: white;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--dark-text);
}

/* 提示消息 */
.flash-messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.empty-state p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.text-muted {
    color: var(--secondary-color);
}

/* 页脚 */
.footer {
    background-color: white;
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
    color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
}

/* 云盘样式 */
.cloud-actions {
    display: flex;
    gap: 1rem;
}

.breadcrumbs {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.breadcrumb-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: var(--secondary-color);
}

.breadcrumb-current {
    color: var(--dark-text);
    font-weight: 500;
}

.cloud-container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.cloud-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cloud-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s;
    gap: 1rem;
}

.cloud-item:hover {
    background-color: var(--light-bg);
    box-shadow: var(--shadow);
}

.item-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-weight: 500;
    color: var(--dark-text);
    text-decoration: none;
    display: block;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.item-name:hover {
    color: var(--primary-color);
}

.item-meta {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* 留言板样式 */
.guestbook-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 3rem;
}

.guestbook-section h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-text);
}

.message-form {
    max-width: 600px;
}

/* 控制台样式 */
.dashboard-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.dashboard-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.dashboard-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.dashboard-card p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* 留言列表样式 */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.message-content {
    margin-bottom: 1rem;
}

.message-content p {
    color: var(--dark-text);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.message-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.message-info span {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.message-actions {
    flex-shrink: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .home-header {
        flex-direction: column;
        gap: 2rem;
        padding: 1.5rem;
    }
    
    .welcome-gif {
        max-width: 200px;
        max-height: 200px;
    }
    
    .header-text {
        text-align: center;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .modules {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .module-card {
        padding: 1.5rem;
    }
    
    .card-icon {
        font-size: 2.5rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-detail,
    .edit-article,
    .users-table {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .home-header {
        padding: 1rem;
    }
    
    .welcome-gif {
        max-width: 150px;
        max-height: 150px;
    }
    
    .main-title {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .module-card {
        padding: 1rem;
    }
    
    .module-card h2 {
        font-size: 1.2rem;
    }
}

/* Wiki目录样式 */
.wiki-dirs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.wiki-dir-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wiki-dir-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.dir-icon {
    font-size: 3rem;
    text-align: center;
}

.dir-info {
    flex: 1;
}

.dir-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--dark-text);
    font-size: 1.3rem;
}

.dir-info p {
    color: var(--secondary-color);
    margin: 0;
    font-size: 0.9rem;
}

.dir-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dir-actions .btn {
    flex: 1;
    min-width: 80px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 2rem;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.text-warning {
    color: var(--warning-color);
}

/* 文件上传样式 */
input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
}

input[type="file"]:hover {
    border-color: var(--primary-color);
}

.file-list {
    margin-top: 0.5rem;
}

.file-list ul {
    list-style-type: disc;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.file-list li {
    margin: 0.25rem 0;
}

/* 工具箱样式 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.tool-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    margin: 0.5rem 0;
    color: var(--dark-text);
    font-size: 1.5rem;
}

.tool-card p {
    color: var(--secondary-color);
    margin: 1rem 0;
    min-height: 3rem;
}

/* 计算器样式 */
.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.calculator-form {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.calculator-result {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.result-section {
    margin-bottom: 1.5rem;
}

.result-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.result-total {
    border-top: 2px solid var(--border-color);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-weight: bold;
}

.result-item.result-final {
    border-top: 3px solid var(--primary-color);
    margin-top: 1rem;
    padding-top: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.result-label {
    color: var(--secondary-color);
}

.result-value {
    color: var(--dark-text);
    font-weight: bold;
}

.result-item.result-final .result-value {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* 相册样式 - 优化文件夹显示 */
.gallery-dirs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-dir-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.gallery-dir-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.dir-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.dir-info {
    flex: 1;
    text-align: center;
}

.dir-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--dark-text);
    font-size: 1.3rem;
    font-weight: 600;
}

.dir-info p {
    color: var(--secondary-color);
    margin: 0;
    font-size: 0.95rem;
}

.dir-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

/* 图片网格 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #f0f0f0;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 1rem;
    opacity: 1;
    transition: opacity 0.2s;
}

.gallery-item-name {
    color: white;
    font-size: 0.9rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 图片预览模态框 - 优化样式 */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.lightbox img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8);
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    transition: all 0.2s;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
}

.lightbox-close:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    font-size: 0.95rem;
    max-width: 80%;
    text-align: center;
    backdrop-filter: blur(10px);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 3rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    user-select: none;
    line-height: 1;
    padding: 0;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 2.5rem;
    }
    
    .lightbox-prev {
        left: 10px !important;
        right: auto !important;
    }
    
    .lightbox-next {
        right: 10px !important;
        left: auto !important;
    }
}

@media (max-width: 768px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

