/* 自定义工具类 */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(to right, #3B82F6, #10B981);
}

.text-balance {
    text-wrap: balance;
}

.text-bolder {
    font-weight: 700;
}

.text-medium {
    font-weight: 500;
}

.text-soft {
    color: #64748B;
}

.leading-relaxed {
    line-height: 1.6;
}

.leading-comfortable {
    line-height: 1.75;
}

.card-hover {
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.card-hover:hover {
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.1), 0 8px 10px -6px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(to right, #3B82F6, #2563EB);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-0.125rem);
}

.btn-primary:focus {
    outline: none;
    ring: 2px;
    ring-color: #3B82F6;
    ring-opacity: 50%;
}

.btn-secondary {
    background: linear-gradient(to right, #64748B, #475569);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-0.125rem);
}

.btn-secondary:focus {
    outline: none;
    ring: 2px;
    ring-color: #64748B;
    ring-opacity: 50%;
}

.btn-outline {
    border: 1px solid #3B82F6;
    color: #3B82F6;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: #3B82F6;
    color: white;
    transform: translateY(-0.125rem);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-outline:focus {
    outline: none;
    ring: 2px;
    ring-color: #3B82F6;
    ring-opacity: 50%;
}

.nav-link {
    color: #475569;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0.125rem;
    background-color: #3B82F6;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #3B82F6;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: #3B82F6;
    font-weight: 500;
}

.nav-link.active::after {
    width: 100%;
}

.code-block {
    background-color: #1E293B;
    color: #F1F5F9;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.glass-effect {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
}

.card-border {
    border: 1px solid #F1F5F9;
}

.section-padding {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.heading-decoration {
    position: relative;
    display: inline-block;
}

/* 轮播图样式 */
.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 300px;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.carousel-inner {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.carousel-item:hover img {
    transform: scale(1.05);
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.4), transparent);
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease;
}

.carousel-item.active .carousel-caption {
    transform: translateY(0);
    opacity: 1;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.carousel-control:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev {
    left: 25px;
}

.carousel-control-next {
    right: 25px;
}

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.carousel-indicator:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.carousel-indicator.active {
    background-color: white;
    transform: scale(1.2);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* 代码高亮样式 */
.hljs {
    display: block;
    overflow-x: auto;
    padding: 0.5em;
    color: #333;
    background: #f8f8f8;
}

.hljs-comment,
.hljs-quote {
    color: #998;
    font-style: italic;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
    color: #333;
    font-weight: bold;
}

.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
    color: #008080;
}

.hljs-string,
.hljs-doctag {
    color: #d14;
}

.hljs-title,
.hljs-section,
.hljs-selector-id {
    color: #900;
    font-weight: bold;
}

.hljs-subst {
    font-weight: normal;
}

.hljs-type,
.hljs-class .hljs-title {
    color: #458;
    font-weight: bold;
}

.hljs-tag,
.hljs-name,
.hljs-attribute {
    color: #000080;
    font-weight: normal;
}

.hljs-regexp,
.hljs-link {
    color: #009926;
}

.hljs-symbol,
.hljs-bullet,
.hljs-built_in,
.hljs-builtin-name {
    color: #990073;
}

.hljs-meta {
    color: #999;
    font-weight: bold;
}

.hljs-deletion {
    background: #fdd;
}

.hljs-addition {
    background: #dfd;
}

.hljs-emphasis {
    font-style: italic;
}

.hljs-strong {
    font-weight: bold;
}