/* 公共样式文件 - 全新现代化设计 */

/* ==================== 全局样式 ==================== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --dark-light: #334155;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --gray-lighter: #f1f5f9;
    --white: #ffffff;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --text: #0f172a;
    --text-light: #475569;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

/* ==================== 容器 ==================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1500px;
    }
}

/* ==================== 工具类 ==================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

/* ==================== Grid 布局辅助样式 ==================== */
/* 确保卡片在 Bootstrap grid 中正确显示和等高 */
.row [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.row [class*="col-"] > * {
    flex: 1;
    width: 100%;
}

/* 确保 grid 间距在移动端正确显示 */
@media (max-width: 768px) {
    .row.g-3 > *,
    .row.g-4 > * {
        margin-bottom: 1.5rem;
    }
    
    /* 移动端确保单列显示 */
    .row [class*="col-md-"],
    .row [class*="col-lg-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

/* ==================== 响应式工具类 ==================== */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

/* ==================== 选择文本样式 ==================== */
::selection {
    background: var(--primary-light);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary-light);
    color: var(--white);
}

/* ==================== 导航栏 ==================== */
.navbar-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.navbar-modern.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.logo-text {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item {
    padding: 0.625rem 1.25rem;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-item.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-item.btn-install {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: var(--white);
    margin-left: 0.5rem;
}

.nav-item.btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    color: var(--white);
}

@media (max-width: 768px) {
    .navbar-menu {
        flex-wrap: wrap;
    }
}

/* ==================== 页面头部样式 ==================== */
.page-header-modern {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: var(--white);
    margin-top: 80px;
}

.page-header-content {
    max-width: 800px;
}

.breadcrumb-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.breadcrumb-modern a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb-modern a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.breadcrumb-modern .separator {
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb-modern .current {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .page-header-modern {
        padding: 6rem 0 3rem;
        margin-top: 70px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
}

/* ==================== 页脚 ==================== */
.footer-modern {
    background: var(--dark);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--gray-light);
    margin: 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.link-group h5,
.link-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.link-group a {
    display: block;
    color: var(--gray-light);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.link-group a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--gray-light);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* ==================== 通用卡片样式（feature-item） ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    padding: 2.5rem;
    background: var(--white);
    border-radius: 1.5rem;
    border: 1px solid var(--gray-light);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon-wrapper {
    margin-bottom: 1.5rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: var(--gradient-primary);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    transition: transform 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.feature-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-light);
    margin: 0;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-item {
        padding: 2rem;
    }
}
