/* 
 * DocTrans Pro Feature Pages Design System 
 * Style: Refined Modern Tech - Enhanced Version
 */

/* ==================== CSS Variables ==================== */
:root {
    /* Brand Colors - Indigo/Purple Palette */
    --primary: #4F46E5;           /* Indigo 600 */
    --primary-light: #818CF8;     /* Indigo 400 */
    --primary-dark: #3730A3;       /* Indigo 800 */
    --primary-fade: rgba(79, 70, 229, 0.08);
    --primary-fade-hover: rgba(79, 70, 229, 0.12);
    
    /* Accent Colors */
    --accent-cyan: #06B6D4;       /* Cyan 500 */
    --accent-emerald: #10B981;    /* Emerald 500 */
    --accent-amber: #F59E0B;       /* Amber 500 */
    --accent-rose: #F43F5E;       /* Rose 500 */

    /* Neutral Colors (Slate) */
    --bg-page: #F8FAFC;           /* Slate 50 */
    --bg-card: #FFFFFF;
    --bg-subtle: #F1F5F9;         /* Slate 100 */
    --text-main: #0F172A;         /* Slate 900 */
    --text-body: #334155;         /* Slate 700 */
    --text-muted: #64748B;        /* Slate 500 */
    --text-light: #94A3B8;        /* Slate 400 */
    --border-subtle: #E2E8F0;     /* Slate 200 */
    --border-hover: #CBD5E1;       /* Slate 300 */

    /* Functional Colors */
    --success: #10B981;
    --success-bg: #ECFDF5;
    --warning: #F59E0B;
    --warning-bg: #FFFBEB;
    --danger: #EF4444;
    --danger-bg: #FEF2F2;
    --info: #3B82F6;
    --info-bg: #EFF6FF;

    /* Shadows & Effects */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.15);
    --shadow-glow-sm: 0 0 10px rgba(79, 70, 229, 0.1);
    
    /* Border Radius */
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-xs: 4px;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
}

/* ==================== Base Reset ==================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--text-body);
    background-color: var(--bg-page);
    /* Subtle background pattern */
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 80px 24px;
}

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    letter-spacing: -0.01em;
}

h2::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    margin-right: 16px;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.4);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
}

p {
    margin: 0 0 16px 0;
    color: var(--text-body);
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.7;
}

/* ==================== Header Section ==================== */
header {
    text-align: center;
    margin-bottom: 64px;
    position: relative;
}

.header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg), var(--shadow-glow-sm);
    position: relative;
    overflow: hidden;
}

.header-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.header-icon i {
    font-size: 36px;
    color: white;
    position: relative;
    z-index: 1;
}

/* ==================== Cards ==================== */
.card, .feature-section, .demo-section, .demo-stage, .layer-card, .editor-ui {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-subtle);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover, .feature-section:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title i {
    color: var(--primary);
    font-size: 1.25rem;
}

/* Card Body */
.card-body {
    color: var(--text-body);
    line-height: 1.7;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-sm), var(--shadow-glow-sm);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-subtle);
    color: var(--text-body);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--border-subtle);
    border-color: var(--border-hover);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-fade);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--primary);
    background: var(--primary-fade);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn i {
    font-size: 1.1em;
}

/* ==================== Tags & Badges ==================== */
.tag, .badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.tag-primary {
    background: var(--primary-fade);
    color: var(--primary);
}

.tag-success {
    background: var(--success-bg);
    color: var(--success);
}

.tag-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.tag-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.tag-info {
    background: var(--info-bg);
    color: var(--info);
}

.tag-vip {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
}

/* Feature Tag */
.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--primary-fade) 0%, rgba(6, 182, 212, 0.08) 100%);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 4px;
    transition: all 0.2s ease;
}

.feature-tag:hover {
    background: var(--primary-fade-hover);
    transform: translateY(-1px);
}

.feature-tag i {
    font-size: 0.9em;
}

/* ==================== Tabs ==================== */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0;
}

.tab-btn {
    padding: 12px 20px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-main);
    background: var(--bg-subtle);
}

.tab-btn.active {
    color: var(--primary);
    background: var(--primary-fade);
    font-weight: 600;
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ==================== Lists ==================== */
.feature-list, .benefit-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li, .benefit-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    color: var(--text-body);
    border-bottom: 1px solid var(--border-subtle);
}

.feature-list li:last-child, .benefit-list li:last-child {
    border-bottom: none;
}

.feature-list li i, .benefit-list li i {
    color: var(--success);
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ==================== Grid Layouts ==================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ==================== Icons ==================== */
.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary-fade);
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.icon-box-sm {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
}

.icon-box-lg {
    width: 64px;
    height: 64px;
    font-size: 2rem;
    border-radius: var(--radius-lg);
}

/* ==================== Progress & Stats ==================== */
.stat-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    transition: all 0.25s ease;
}

.stat-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==================== Animations ==================== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Stagger animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ==================== Utility Classes ==================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

.bg-primary { background-color: var(--primary-fade); }
.bg-success { background-color: var(--success-bg); }
.bg-warning { background-color: var(--warning-bg); }
.bg-danger { background-color: var(--danger-bg); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .container {
        padding: 60px 20px;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 40px 16px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .card, .feature-section, .demo-section, .demo-stage {
        padding: 24px;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        padding: 10px 16px;
        white-space: nowrap;
    }
    
    .header-icon {
        width: 64px;
        height: 64px;
    }
    
    .header-icon i {
        font-size: 28px;
    }
    
    .btn {
        padding: 10px 20px;
    }
    
    .stat-card {
        padding: 24px 16px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    .card, .feature-section, .demo-section, .demo-stage {
        padding: 20px;
        border-radius: var(--radius-md);
    }
    
    .feature-tag {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    body {
        background: white;
    }
    
    .card, .feature-section, .demo-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .btn {
        display: none;
    }
}
