/* 全局样式 - 科技蓝渐变主题 */
:root {
    --primary-color: #1e88e5;
    --link-color: #1e88e5;
    --info-color: #1e88e5;
    --success-color: #48c774;
    --warning-color: #ffdd57;
    --danger-color: #f14668;
    --light-blue: #e3f2fd;
    --tech-blue-start: #667eea;
    --tech-blue-mid: #4f6fe5;
    --tech-blue-end: #1e88e5;
    --tech-blue-dark: #1565c0;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #4a4a4a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

main {
    flex: 1;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 页面加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    animation: fadeIn 0.5s ease-in;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.15);
    min-height: 4.5rem;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

.navbar.is-scrolled {
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.2);
}

.navbar-brand {
    min-height: 4.5rem;
}

/* 导航栏容器优化 - 防止换行 */
.navbar-menu {
    flex-shrink: 1;
}

.navbar-end {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    margin-left: auto;
}

.navbar-item {
    padding: 0.5rem 1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.navbar-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--tech-blue-start), var(--tech-blue-end));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-item:hover::after,
.navbar-item.is-active::after {
    width: 80%;
}

.navbar-item.is-active {
    color: var(--primary-color);
    font-weight: 600;
    background-color: var(--light-blue);
}

.navbar-item:hover {
    background-color: var(--light-blue);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 用户菜单优化 - 邮箱文本溢出处理 */
.navbar-item.has-dropdown {
    padding: 0.5rem 0.75rem;
}

.navbar-link {
    padding-right: 2.5em;
}

#userName {
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* 登录/注册按钮容器 */
#authButtons {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
}

#authButtons .navbar-item {
    padding: 0.5rem 1rem;
}

/* 品牌名称在小屏幕上缩小 */
@media screen and (max-width: 1200px) {
    .navbar-brand .navbar-item span {
        font-size: 1.1rem !important;
    }

    .navbar-item {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }

    #userName {
        max-width: 120px;
    }
}

@media screen and (max-width: 1024px) {
    .navbar-brand .navbar-item span {
        font-size: 1rem !important;
    }

    .navbar-item {
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
    }

    #userName {
        max-width: 100px;
    }

    /* 隐藏图标，只保留文字 */
    .navbar-item .icon {
        display: none;
    }
}

/* Hero区域渐变 - 科技蓝主题 */
.hero.is-info {
    background: linear-gradient(135deg, var(--tech-blue-start) 0%, var(--tech-blue-mid) 50%, var(--tech-blue-end) 100%);
    position: relative;
    overflow: hidden;
}

.hero.is-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
    pointer-events: none;
}

/* 自定义科技蓝Hero */
.hero.is-primary-gradient {
    background: linear-gradient(135deg, var(--tech-blue-start) 0%, var(--tech-blue-mid) 50%, var(--tech-blue-end) 100%);
}

/* 卡片悬停效果 - 3D效果 */
.card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 8px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(30, 136, 229, 0.15), 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Box悬停效果 - 光泽效果 */
.box {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.box:hover::before {
    left: 100%;
}

.box:hover {
    box-shadow: 0 8px 16px rgba(30, 136, 229, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

/* 按钮过渡 - 增强效果 */
.button {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.button::before {
    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;
}

.button:hover::before {
    width: 300px;
    height: 300px;
}

.button:hover:not([disabled]) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

.button.is-white:hover {
    background-color: #f5f5f5;
}

.button.is-info:hover {
    background-color: var(--tech-blue-dark);
}

/* 页脚样式 */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--link-color) !important;
}

/* 图标文字对齐 */
.icon-text {
    align-items: center;
}

/* 面包屑导航 */
.breadcrumb a {
    color: var(--link-color);
}

.breadcrumb li.is-active a {
    color: #4a4a4a;
}

/* 分页样式 */
.pagination-link.is-current {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 菜单激活状态 */
.menu-list a.is-active {
    background-color: var(--primary-color);
    color: #fff;
}

/* 返回顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    z-index: 99;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 8px rgba(10, 10, 10, 0.2);
}

#backToTop.show {
    display: block;
    animation: fadeIn 0.3s;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .hero.is-medium .hero-body {
        padding: 3rem 1.5rem;
    }

    .title.is-1 {
        font-size: 2rem;
    }

    .title.is-2 {
        font-size: 1.75rem;
    }
}

/* Markdown内容样式 */
.content {
    font-size: 1rem;
    line-height: 1.7;
}

.content h1, .content h2, .content h3,
.content h4, .content h5, .content h6 {
    font-weight: 600;
    line-height: 1.125;
}

.content blockquote {
    background-color: whitesmoke;
    border-left-color: var(--primary-color);
    padding: 1.25em 1.5em;
}

.content code {
    background-color: whitesmoke;
    color: var(--danger-color);
    padding: 0.25em 0.5em;
}

.content pre {
    background-color: whitesmoke;
    padding: 1.25em 1.5em;
}

.content pre code {
    background-color: transparent;
    color: #4a4a4a;
    padding: 0;
}

/* 表格样式 */
.table {
    background-color: white;
}

.table.is-striped tbody tr:nth-child(2n) {
    background-color: #fafafa;
}

/* 通知框样式 */
.notification {
    border-radius: 6px;
}

/* 自定义标签样式 */
.tag.is-info.is-light {
    background-color: #eff5fb;
    color: #296fa8;
}

/* 图片圆角和过渡效果 */
.image img {
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-image img {
    transition: all 0.4s ease;
}

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

/* 图片加载动画 */
@keyframes imageLoad {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.image img {
    animation: imageLoad 0.5s ease-out;
}

/* 加载动画 */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 工具提示 */
.has-tooltip {
    position: relative;
}

.has-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background-color: #363636;
    color: white;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 10;
}

/* 自定义滚动条（仅Webkit浏览器） */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 打印样式 */
@media print {
    .navbar, .footer, .button, #backToTop {
        display: none;
    }

    .box {
        box-shadow: none;
        border: 1px solid #dbdbdb;
    }
}
