/* ========================================
   隔断精灵 PartitionDesigner — 主样式表
   Modern · Responsive · Professional
   ======================================== */

/* --- CSS Variables --- */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #7b8ff0;
    --accent: #f72585;
    --accent-light: #ff6ba6;
    --dark: #1a1a2e;
    --dark-2: #16213e;
    --light: #f8f9fc;
    --gray: #6c757d;
    --white: #ffffff;
    --radius: 16px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,.12);
    --transition: 0.3s cubic-bezier(.4,0,.2,1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #333;
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Navbar --- */
#mainNav {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,.06);
    transition: var(--transition);
    z-index: 1000;
}
#mainNav.scrolled {
    box-shadow: var(--shadow);
    background: rgba(255,255,255,.96);
}
#mainNav .navbar-brand {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--dark) !important;
}
.brand-icon { font-size: 1.4rem; }
#mainNav .nav-link {
    font-weight: 500;
    color: #555 !important;
    padding: .5rem 1rem !important;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}
#mainNav .nav-link:hover {
    color: var(--primary) !important;
    background: rgba(67,97,238,.08);
}
#mainNav .btn-outline-light {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* --- Main Content --- */
main {
    margin-top: 72px;
    min-height: calc(100vh - 72px);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, #7209b7 50%, var(--accent) 100%);
    color: var(--white);
    overflow: hidden;
    padding-bottom: 80px;
}
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
}
.hero-shape-1 {
    width: 600px; height: 600px;
    background: var(--white);
    top: -200px; right: -100px;
    animation: float 8s ease-in-out infinite;
}
.hero-shape-2 {
    width: 300px; height: 300px;
    background: var(--accent-light);
    bottom: -50px; left: 10%;
    animation: float 6s ease-in-out 2s infinite;
}
.hero-shape-3 {
    width: 200px; height: 200px;
    background: var(--primary-light);
    top: 40%; left: 60%;
    animation: float 7s ease-in-out 1s infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}
.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 80px;
    padding-bottom: 40px;
}
.min-vh-80 { min-height: 80vh; }
.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.2rem;
}
.text-gradient {
    background: linear-gradient(90deg, #fff 0%, #ffe066 50%, #ffd166 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: clamp(1rem, 2vw, 1.15rem);
    opacity: .92;
    max-width: 540px;
    line-height: 1.8;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
}
.hero-actions .btn-lg {
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}
.hero-actions .btn-primary {
    background: var(--white);
    color: var(--primary);
    border: none;
}
.hero-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,.2);
}
.hero-actions .btn-outline-light {
    border-width: 2px;
}
.hero-actions .btn-outline-light:hover {
    background: rgba(255,255,255,.15);
}
.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.stat-item {
    display: flex;
    flex-direction: column;
}
.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    opacity: .95;
}
.stat-label {
    font-size: .8rem;
    opacity: .7;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Hero Mockup (Desktop) */
.hero-mockup {
    perspective: 1000px;
}
.mockup-window {
    background: rgba(255,255,255,.12);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,.2);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.mockup-dots {
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    background: rgba(0,0,0,.1);
}
.mockup-dots span {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
}
.mockup-body {
    padding: 24px;
    min-height: 300px;
}
.mockup-3d {
    width: 100%;
    height: 280px;
    background: rgba(255,255,255,.08);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}
.mockup-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 30px 30px;
}
.mockup-door {
    position: absolute;
    bottom: 10%;
    width: 60px;
    height: 200px;
    border-radius: 4px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
}
.mockup-door-1 { left: 15%; }
.mockup-door-2 { left: 55%; }
.mockup-panel {
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 8px;
    background: rgba(255,255,255,.2);
    border-radius: 2px;
}

@keyframes pulse {
    0%, 100% { opacity: .3; }
    50% { opacity: .6; }
}

.hero-wave svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
}

/* ========================================
   SECTIONS (shared)
   ======================================== */
.features-section,
.workflow-section,
.articles-section {
    padding: 80px 0;
}
.workflow-section,
.articles-section {
    background: var(--light);
}
.section-header { max-width: 600px; margin-left: auto; margin-right: auto; }
.section-tag {
    display: inline-block;
    background: rgba(var(--primary-rgb, 67, 97, 238), .1);
    color: var(--primary);
    padding: 4px 16px;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.section-header h2 {
    font-weight: 800;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--dark);
}

/* ========================================
   FEATURE CARDS
   ======================================== */
.feature-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    height: 100%;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(67,97,238,.15);
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.feature-card h4 {
    font-weight: 700;
    margin-bottom: .5rem;
    color: var(--dark);
}
.feature-card p {
    font-size: .9rem;
    color: var(--gray);
    margin-bottom: 0;
}

/* ========================================
   WORKFLOW STEPS
   ======================================== */
.step-card {
    padding: 2.5rem 1.5rem;
    background: var(--white);
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
}
.step-card.highlight {
    background: linear-gradient(135deg, var(--primary), #7209b7);
    color: var(--white);
    box-shadow: 0 12px 40px rgba(67,97,238,.3);
    transform: scale(1.05);
}
.step-card.highlight .text-muted { color: rgba(255,255,255,.8) !important; }
.step-number {
    font-size: 3rem;
    font-weight: 900;
    opacity: .2;
    margin-bottom: .5rem;
    line-height: 1;
}
.step-card.highlight .step-number { opacity: .3; }
.step-card h4 {
    font-weight: 700;
    margin-bottom: .5rem;
}
.step-card p { font-size: .9rem; }

/* ========================================
   ARTICLE CARDS
   ======================================== */
.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    height: 100%;
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.article-img {
    height: 200px;
    overflow: hidden;
}
.article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.article-card:hover .article-img img { transform: scale(1.05); }
.article-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.article-category {
    display: inline-block;
    background: rgba(67,97,238,.1);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 50px;
    font-size: .75rem;
    font-weight: 600;
    align-self: flex-start;
}
.article-body h5 {
    font-weight: 700;
    line-height: 1.4;
}
.article-body h5 a {
    color: var(--dark);
    text-decoration: none;
}
.article-body h5 a:hover { color: var(--primary); }
.article-body p {
    font-size: .85rem;
    flex: 1;
}
.article-meta {
    font-size: .8rem;
    color: var(--gray);
    display: flex;
    gap: 1rem;
    padding-top: .5rem;
    border-top: 1px solid #eee;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    color: var(--white);
    padding: 80px 0;
}
.cta-section h2 {
    font-weight: 800;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}
.cta-section .btn-light {
    color: var(--primary);
    font-weight: 600;
    border-radius: 50px;
}
.cta-section .btn-light:hover { transform: translateY(-2px); }
.cta-section .btn-outline-light {
    border-radius: 50px;
    border-width: 2px;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--dark);
    color: #aaa;
    padding: 60px 0 20px;
}
footer h5, footer h6 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 1rem;
}
footer h6 { font-size: .95rem; }
footer ul li { margin-bottom: .4rem; }
footer ul li a {
    color: #999;
    text-decoration: none;
    font-size: .9rem;
    transition: var(--transition);
}
footer ul li a:hover { color: var(--primary-light); }
footer hr { border-color: rgba(255,255,255,.1); }

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    max-width: 400px;
    animation: slideIn .4s ease;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 991.98px) {
    .hero-section { padding-bottom: 40px; }
    .hero-content { padding-top: 40px; text-align: center; }
    .hero-desc { max-width: 100%; margin: 0 auto; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .min-vh-80 { min-height: auto; }
    .step-card.highlight { transform: none; }
    .feature-card:hover { transform: none; }
}

@media (max-width: 767.98px) {
    .features-section,
    .workflow-section,
    .articles-section { padding: 50px 0; }
    .hero-title { font-size: 1.8rem; }
    .hero-desc { font-size: .95rem; }
    .hero-stats { gap: 1.2rem; }
    .stat-number { font-size: 1.2rem; }
    .feature-card { padding: 1.5rem 1rem; }
    .feature-icon { font-size: 2rem; }
    .cta-section { padding: 50px 0; }
    footer { text-align: center; }
    .article-img { height: 160px; }
}

@media (max-width: 575.98px) {
    main { margin-top: 62px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .hero-actions .btn { width: 100%; max-width: 280px; }
    .hero-stats { gap: .8rem; }
    .section-header h2 { font-size: 1.4rem; }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
a { transition: var(--transition); }
.btn { font-weight: 500; transition: var(--transition); }
.card { border: none; }

/* Content Pages */
.container.py-4, .container.py-5 { max-width: 1140px; }

/* Code styling */
code {
    background: #f0f0f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .88em;
    color: var(--primary);
    font-family: "SF Mono", "Fira Code", monospace;
}
