﻿/* Modern JSON Tools - Redesigned UI */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Modern Color Palette */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #8b5cf6;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-panel: #ffffff;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-focus: #6366f1;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 防止水平滚动的关键样式 */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* 移动端菜单激活时防止页面滚动 */
body.menu-active {
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header Styles */
.json-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.json-nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.json-brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    z-index: 1001;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    margin-left: 8rem;
}

.mobile-menu-toggle:hover {
    background: var(--bg-tertiary);
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

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

.brand-logo i {
    font-size: 2rem;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition);
}

.brand-logo:hover i {
    transform: rotate(10deg);
}

.brand-tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-left: 2.75rem;
    font-weight: 500;
}

.json-nav-controls {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.nav-link:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* 工具切换按钮组样式 */
.tool-navigation {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 99;
    margin-bottom: 2rem;
}

.tool-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.tool-nav-menu {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.tool-nav-link {
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

.tool-nav-link i {
    font-size: 0.875rem;
}

.tool-nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-1px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.tool-nav-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.tool-nav-link:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.nav-link i {
    font-size: 1rem;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.banner-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.float-item {
    position: absolute;
    left: var(--x);
    top: var(--y);
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(-10px) rotate(-5deg); }
    75% { transform: translateY(-30px) rotate(3deg); }
}

.banner-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.banner-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title-highlight {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.banner-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.banner-features {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.banner-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.25rem;
    font-family: 'Courier New', monospace;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.banner-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.json-preview {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    color: var(--text-primary);
    max-width: 400px;
    width: 100%;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.preview-tabs {
    display: flex;
    gap: 0.5rem;
}

.tab {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.tab.active {
    background: var(--primary-color);
    color: white;
}

.preview-actions {
    display: flex;
    gap: 0.25rem;
}

.action-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
}

.action-dot:nth-child(1) { background: #ef4444; }
.action-dot:nth-child(2) { background: #f59e0b; }
.action-dot:nth-child(3) { background: #10b981; }

.preview-content {
    margin-bottom: 1rem;
}

.json-input {
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.json-key { color: #dc2626; }
.json-string { color: #059669; }
.json-boolean { color: #7c3aed; }

.preview-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.format-indicator,
.size-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.format-indicator i { color: #10b981; }
.size-indicator i { color: var(--text-muted); }

.banner-cta {
    background: rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    padding: 2rem;
    border-radius: var(--radius-xl);
    text-align: center;
    backdrop-filter: blur(10px);
}

.cta-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.cta-content p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cta-btn.primary {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.cta-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.cta-btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Main Content */
.json-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    min-height: calc(100vh - 200px);
}

.json-tool-section {
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
}

.json-tool-section.active {
    display: block;
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-radius: var(--radius-xl);
    border: 1px solid rgba(99, 102, 241, 0.1);
    position: relative;
    overflow: hidden;
}

.tool-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.05), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.tool-header-content {
    flex: 1;
}

.tool-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tool-header h2 i {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: tool-icon-pulse 2s ease-in-out infinite;
}

@keyframes tool-icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.tool-header p {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin: 0;
    font-weight: 500;
}

.tool-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    background: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.stat-badge.success {
    background: #10b981;
}

.stat-badge.info {
    background: #06b6d4;
}

.usage-counter,
.validation-streak,
.conversion-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
}

.usage-counter i,
.validation-streak i,
.conversion-counter i {
    color: var(--accent-color);
}
/* Enhanced Features */
.quick-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-lg);
    color: #92400e;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
}

.tip-item:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.15));
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.tip-item i {
    color: var(--accent-color);
    font-size: 1.25rem;
}

.feature-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    color: #065f46;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
}

.feature-item:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.15));
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

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

.format-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.format-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s;
}

.format-option:hover::before {
    left: 100%;
}

.format-option:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.format-option.selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.format-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
}

.format-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-weight: 700;
    font-size: 1rem;
}

.format-info span {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.tool-controls {
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.tool-controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
}

.workflow-steps {
    display: flex;
    justify-content: center;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-secondary);
    padding: 1.5rem 2.5rem;
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
}

.step.active {
    color: var(--primary-color);
}

.step.completed {
    color: var(--primary-color);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    animation: pulse-step 2s infinite;
    box-shadow: var(--shadow-md);
}

.step.completed .step-number {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.step-text {
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
}

.step-arrow {
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: bold;
}

@keyframes pulse-step {
    0%, 100% { transform: scale(1); box-shadow: var(--shadow-md); }
    50% { transform: scale(1.1); box-shadow: var(--shadow-lg); }
}

.control-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Enhanced Buttons */
.json-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

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

.json-btn:hover::before {
    left: 100%;
}

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

.json-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.json-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.json-btn.secondary:hover {
    background: var(--border-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.json-btn.pulse {
    animation: pulse-button 2s infinite;
}

@keyframes pulse-button {
    0%, 100% {
        box-shadow: var(--shadow-md), 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: var(--shadow-lg), 0 0 0 15px rgba(99, 102, 241, 0);
    }
}

.btn-hint {
    position: absolute;
    right: -90px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    animation: bounce-hint 1s infinite;
    box-shadow: var(--shadow-md);
}

.btn-hint::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid var(--accent-color);
}

@keyframes bounce-hint {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(8px); }
}

.action-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Form Elements */
.json-select {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-panel);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.json-select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.json-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.json-checkbox input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    position: relative;
    transition: var(--transition);
}

.json-checkbox input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.json-checkbox input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}
/* Workspace Layout */
.json-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.json-workspace.compare-workspace {
    margin-bottom: 1rem;
}

.json-panel {
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
}

.json-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
}

.json-panel:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.json-panel.full-width {
    grid-column: 1 / -1;
}

.json-panel.compare-panel {
    min-height: 350px;
}

.panel-header {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.panel-header h3 i {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.25rem;
}

.panel-actions {
    display: flex;
    gap: 0.75rem;
}

/* Editor Styles */
.json-editor-container {
    position: relative;
    height: 450px;
    display: flex;
    flex-direction: column;
}

.json-editor {
    flex: 1;
    width: 100%;
    border: none;
    padding: 2rem;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
    background: var(--bg-panel);
    color: var(--text-primary);
    resize: none;
    outline: none;
    transition: var(--transition);
}

.json-editor:focus {
    background: var(--bg-primary);
}

.json-editor::placeholder {
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.6;
}

.json-output {
    flex: 1;
    padding: 2rem;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
    background: var(--bg-panel);
    color: var(--text-primary);
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.json-output:empty::before {
    content: "✨ Your formatted JSON will appear here!\n\n👈 Enter JSON in the left panel and click 'Format JSON'";
    color: var(--text-muted);
    font-style: italic;
}

.editor-info {
    background: var(--bg-tertiary);
    border-top: 2px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    flex-wrap: wrap;
    gap: 1rem;
}

.next-step {
    color: var(--primary-color);
    font-weight: 700;
    animation: blink-hint 2s infinite;
}

@keyframes blink-hint {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.6; }
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.status-indicator.success {
    color: var(--primary-color);
    animation: success-pulse 0.5s ease;
}

.status-indicator.error {
    color: #ef4444;
    animation: error-shake 0.5s ease;
}

.status-indicator.warning {
    color: var(--accent-color);
}

@keyframes success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes error-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Results Sections */
.validation-results,
.comparison-results {
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.validation-results::before,
.comparison-results::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
}

.result-header {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.result-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.result-header h3 i {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.25rem;
}

.result-content {
    padding: 2rem;
    min-height: 200px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
    text-align: center;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.125rem;
    font-weight: 500;
}

/* Quick Help */
.quick-help {
    margin-bottom: 1.5rem;
}

.help-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(99, 102, 241, 0.1));
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-xl);
    padding: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.help-card i {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    margin-top: 0.25rem;
}

.help-content h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.125rem;
}

.help-content ol {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.help-content li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    font-weight: 500;
}

/* Content Header */
.content-header {
    text-align: center;
    margin-bottom: 3rem;
}

.content-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.content-header h2 i {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-header p {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .banner-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .banner-title {
        font-size: 2.5rem;
    }
    
    .json-workspace {
        grid-template-columns: 1fr;
    }
    
    .tool-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-nav-container {
        position: fixed;
        top: 0;
        right: -100%; /* 使用百分比确保完全隐藏 */
        width: 100vw; /* 占据全屏宽度 */
        height: 100vh; /* 占据全屏高度 */
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        padding: 5rem 2rem 2rem;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: var(--shadow-xl);
        overflow-y: auto;
        transform: translateZ(0); /* 启用硬件加速 */
    }
    
    .mobile-nav-container.active {
        right: 0;
    }
    
    .json-nav-controls {
        display: flex;
        align-items: center;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%; /* 确保菜单项占满容器宽度 */
    }
    
    .panel-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .panel-actions .action-btn {
        margin-bottom: 0.5rem;
        flex: 1 0 auto;
        min-width: 100px; /* 最小宽度确保按钮可点击 */
    }
    
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .panel-header h3 {
        margin: 0;
    }
    
    .nav-link {
        padding: 1rem;
        justify-content: flex-start;
    }
    
    /* 移动端工具导航按钮组样式 */
    .tool-nav-container {
        padding: 0 1rem;
    }
    
    .tool-nav-menu {
        gap: 0.25rem;
        justify-content: center;
    }
    
    .tool-nav-link {
        padding: 0.625rem 0.75rem;
        font-size: 0.75rem;
        gap: 0.375rem;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 44px;
    }
    
    .tool-nav-link i {
        font-size: 0.75rem;
        margin-bottom: 0.125rem;
    }
    
    .banner-title {
        font-size: 2rem;
    }
    
    .banner-subtitle {
        font-size: 1rem;
    }
    
    .banner-features {
        justify-content: center;
    }
    
    .banner-stats {
        justify-content: center;
    }
    
    .json-main {
        padding: 2rem 1rem;
    }
    
    .tool-header {
        padding: 2rem 1rem;
    }
    
    .tool-header h2 {
        font-size: 1.75rem;
    }
    
    .step-indicator {
        padding: 1rem;
        gap: 1rem;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .step-text {
        font-size: 0.75rem;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .json-btn {
        justify-content: center;
    }
    
    .btn-hint {
        display: none;
    }
}

@media (max-width: 480px) {
    .json-nav {
        padding: 0 1rem;
    }
    
    .brand-logo {
        font-size: 1.25rem;
    }
    
    .brand-tagline {
        font-size: 0.75rem;
        margin-left: 2rem;
    }
    
    .hero-banner {
        padding: 2rem 0;
    }
    
    .banner-content {
        padding: 0 1rem;
    }
    
    .banner-title {
        font-size: 1.75rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .quick-tips,
    .feature-showcase,
    .format-preview {
        grid-template-columns: 1fr;
    }
    
    .step-indicator {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
}

/* Loading and Animation States */
.nav-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    overflow: hidden;
}

.nav-loading-bar {
    height: 100%;
    background: var(--bg-gradient);
    width: 100%;
    animation: loading-slide 0.6s ease-out;
}

@keyframes loading-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(0); }
}

/* Tutorials Section - Expandable Card Design */
.tutorials-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 3rem;
}

.tutorial-category-section {
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.tutorial-category-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
}

.category-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.category-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: var(--shadow-md);
}

.category-header h3 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.tutorial-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tutorial-card {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tutorial-card:last-child {
    border-bottom: none;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.05), transparent);
    transition: left 0.5s;
}

.card-header:hover::before {
    left: 100%;
}

.card-header:hover {
    background: var(--bg-secondary);
}

.tutorial-card.expanded .card-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
    border-bottom: 1px solid var(--border-color);
}

.card-expand-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.card-header:hover .card-expand-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.tutorial-card.expanded .card-expand-icon {
    color: var(--primary-color);
    transform: rotate(180deg);
}

.card-content {
    flex: 1;
}

.card-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.card-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.difficulty {
    padding: 0.4rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.difficulty.beginner {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.difficulty.intermediate {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
}

.difficulty.advanced {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
}

.duration {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
}

.duration::before {
    content: '⏱️';
    font-size: 1rem;
}

/* Expanded Content */
.card-expanded-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-secondary);
}

.tutorial-card.expanded .card-expanded-content {
    max-height: 2000px;
    animation: expandContent 0.4s ease-out;
}

@keyframes expandContent {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 2000px;
    }
}

.expanded-inner {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
}

.expanded-inner h5 {
    color: var(--text-primary);
    font-weight: 700;
    margin: 2rem 0 1rem;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.expanded-inner h5:first-child {
    margin-top: 0;
}

.expanded-inner h5::before {
    content: '📋';
    font-size: 1.25rem;
}

.expanded-inner h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    font-size: 1rem;
}

.expanded-inner p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.expanded-inner ul,
.expanded-inner ol {
    margin: 1rem 0;
    padding-left: 2rem;
    color: var(--text-secondary);
}

.expanded-inner li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.expanded-inner pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 1.5rem 0;
    border: 1px solid #334155;
    box-shadow: var(--shadow-md);
}

.expanded-inner code {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    font-family: 'Fira Code', monospace;
    font-size: 0.85em;
}

.expanded-inner pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Code Comparison in Expanded Content */
.code-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.wrong-code,
.correct-code {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.wrong-code h6,
.correct-code h6 {
    padding: 0.75rem 1rem;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
}

.wrong-code h6 {
    background: #fecaca;
    color: #991b1b;
}

.correct-code h6 {
    background: #bbf7d0;
    color: #166534;
}

.error-example {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.error-example h6 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Responsive Design for Tutorials */
@media (max-width: 768px) {
    .category-header {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .category-header h3 {
        font-size: 1.5rem;
    }
    
    .card-header {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .expanded-inner {
        padding: 1.5rem;
    }
    
    .code-comparison {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tutorials-container {
        gap: 2rem;
    }
    
    .category-header {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-content h4 {
        font-size: 1.125rem;
    }
    
    .card-content p {
        font-size: 0.875rem;
    }
    
    .expanded-inner {
        padding: 1rem;
    }
}

/* Copy Code Button */
.copy-code-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.copy-code-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(99, 102, 241, 0.1);
    z-index: 1000;
}

.progress-fill {
    height: 100%;
    background: var(--bg-gradient);
    width: 0%;
    transition: width 0.3s ease;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    transform: translateX(100%);
    transition: var(--transition);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

.toast.warning {
    background: var(--accent-color);
}

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

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.hidden { display: none; }
.visible { display: block; }

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
/* Footer Styles */
.json-footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.json-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
}

/* Newsletter Section */
.footer-newsletter {
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.newsletter-text h4 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.newsletter-text p {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    display: flex;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 0.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.newsletter-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
    color: white;
    font-size: 1rem;
    outline: none;
    border-radius: var(--radius-md);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.newsletter-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.newsletter-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
    margin: 0;
}

.newsletter-note i {
    color: var(--accent-color);
}

/* Footer Main */
.footer-main {
    padding: 3rem 0;
}

.footer-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-brand {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.footer-brand .brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand .brand-logo i {
    font-size: 2.5rem;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-description {
    font-size: 1.125rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Footer Bottom */
.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
}

.footer-bottom-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-legal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.875rem;
}

.legal-links {
    display: flex;
    gap: 2rem;
}

.legal-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.legal-links a:hover {
    color: white;
    text-decoration: underline;
}

/* Footer Responsive Design */
@media (max-width: 768px) {
    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .newsletter-text h4 {
        font-size: 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .newsletter-btn {
        justify-content: center;
    }
    
    .footer-brand .brand-logo {
        font-size: 1.5rem;
    }
    
    .footer-brand .brand-logo i {
        font-size: 2rem;
    }
    
    .brand-description {
        font-size: 1rem;
    }
    
    .social-links {
        gap: 0.75rem;
    }
    
    .social-links a {
        width: 44px;
        height: 44px;
        font-size: 1.125rem;
    }
    
    .footer-legal {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .legal-links {
        justify-content: center;
        gap: 1.5rem;
    }
    
    /* 针对面板操作按钮的移动端优化 */
    .panel-actions {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .panel-actions .action-btn {
        flex: 1 1 auto;
        margin-bottom: 0;
        min-width: auto;
        width: 100%;
        justify-content: center;
    }
    
    .panel-header {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .footer-newsletter {
        padding: 2rem 0;
    }
    
    .newsletter-content {
        padding: 0 1rem;
    }
    
    .footer-main {
        padding: 2rem 0;
    }
    
    .footer-section {
        padding: 0 1rem;
    }
    
    .social-links {
        flex-wrap: wrap;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}
/* Examples Section Styles */
.examples-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.example-category {
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.example-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
}

.example-category h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.example-category h3 i {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
}

.example-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.example-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
}

.example-item:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.example-item h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.example-item p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.code-example {
    position: relative;
    margin-bottom: 1.5rem;
}

.code-example pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 2rem;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
    border: 1px solid #334155;
    box-shadow: var(--shadow-md);
}

.code-example code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
}

/* JSON Syntax Highlighting */
.code-example pre .json-key {
    color: #fbbf24;
}

.code-example pre .json-string {
    color: #34d399;
}

.code-example pre .json-number {
    color: #60a5fa;
}

.code-example pre .json-boolean {
    color: #a78bfa;
}

.code-example pre .json-null {
    color: #f87171;
}

/* Copy Button for Code Examples */
.code-example::after {
    content: 'Copy';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.code-example:hover::after {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.example-notes {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(99, 102, 241, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.example-notes h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.example-notes h5::before {
    content: '💡';
    font-size: 1.25rem;
}

.example-notes ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.example-notes li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.example-notes li:last-child {
    margin-bottom: 0;
}

/* Examples Responsive Design */
@media (max-width: 768px) {
    .example-category {
        padding: 1.5rem;
    }
    
    .example-category h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .example-item {
        padding: 1.5rem;
    }
    
    .code-example pre {
        padding: 1.5rem;
        font-size: 0.8rem;
    }
    
    .code-example::after {
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .example-notes {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .example-category {
        padding: 1rem;
    }
    
    .example-item {
        padding: 1rem;
    }
    
    .code-example pre {
        padding: 1rem;
        font-size: 0.75rem;
    }
    
    .example-notes {
        padding: 1rem;
    }
    
    .example-notes ul {
        padding-left: 1.25rem;
    }
}

/* Content Section Styles for Configuration Pages */
.content-section {
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.section-header h1 i {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
}

.policy-content,
.terms-content,
.about-content,
.contact-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.policy-section,
.terms-section,
.about-section {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.policy-section h2,
.terms-section h2,
.about-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 1rem;
}

.policy-section p,
.terms-section p,
.about-section p,
.about-section ul {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary-color);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.value-item {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.value-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.value-item i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.value-item h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.value-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    margin: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    position: relative;
}

.timeline-date {
    min-width: 80px;
    padding: 0.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-align: center;
    flex-shrink: 0;
}

.timeline-content {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--primary-color);
    flex-grow: 1;
}

.timeline-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-info h2,
.contact-form-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-info h2 i,
.contact-form-section h2 i {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.contact-details p {
    color: var(--text-secondary);
    margin: 0.25rem 0;
}

.social-links-section {
    margin-top: 2rem;
}

.social-links-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

.social-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-form {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-panel);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.faq-section {
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
}

.faq-section > h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.faq-section > h2 i {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.faq-question {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--bg-tertiary);
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-panel);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--bg-panel);
}

.faq-item.active .faq-answer {
    padding: 1.5rem;
    max-height: 500px;
}

/* Configuration Pages Responsive Design */
@media (max-width: 768px) {
    .content-section {
        padding: 2rem 1.5rem;
        margin: 0 1rem 2rem;
    }
    
    .section-header h1 {
        font-size: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .policy-section,
    .terms-section,
    .about-section {
        padding: 1.25rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .timeline {
        margin: 1.5rem 0;
    }
    
    .timeline::before {
        left: 0.75rem;
    }
    
    .timeline-item {
        gap: 1rem;
    }
    
    .timeline-date {
        min-width: 70px;
        padding: 0.4rem;
        font-size: 0.875rem;
    }
    
    .timeline-content {
        padding: 1rem;
    }
    
    .faq-question {
        padding: 1.25rem;
    }
    
    .faq-answer {
        padding: 0 1.25rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .content-section {
        padding: 1.5rem;
        margin: 0 0.5rem 1.5rem;
    }
    
    .section-header h1 {
        font-size: 1.75rem;
    }
    
    .section-header p {
        font-size: 1.125rem;
    }
    
    .policy-section,
    .terms-section,
    .about-section {
        padding: 1rem;
    }
    
    .value-item {
        padding: 1.5rem 1rem;
    }
    
    .timeline-date {
        min-width: 60px;
        padding: 0.3rem;
        font-size: 0.8rem;
    }
    
    .timeline-content {
        padding: 0.75rem;
    }
    
    .timeline-content h4 {
        font-size: 1.1rem;
    }
}