/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e0e0e0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.logo::before {
    content: "FW";
}

.brand-text {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: #667eea;
    transition: width 0.3s ease;
}

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

.language-selector {
    display: flex;
    gap: 5px;
    margin-left: 20px;
}

.lang-btn {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: transparent;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 12px;
}

.lang-btn:hover, .lang-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Hero Section */
.hero {
    margin-top: 70px;
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="white" stroke-opacity="0.1" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: white;
    color: #667eea;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* Format Demo */
.format-demo {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.demo-before, .demo-after {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
}

.demo-before h3, .demo-after h3 {
    margin-bottom: 10px;
    font-size: 1rem;
    opacity: 0.8;
}

.demo-before code, .demo-after code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.4;
    color: #88ff88;
}

.demo-arrow {
    text-align: center;
    font-size: 2rem;
    margin: 20px 0;
    opacity: 0.7;
}

/* Sections */
.tools, .features, .about {
    padding: 80px 0;
}

.tools {
    background: #f8f9fa;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: #666;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.tool-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.tool-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
}

/* About Section */
.about {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.about .section-title {
    color: white;
}

.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 50px;
    opacity: 0.9;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand .brand-text {
    color: white;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.format-demo {
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Tool Interface Styles */
.tool-interface {
    padding: 40px 0;
    background: #f8f9fa;
    min-height: 600px;
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tool-header h2 {
    color: #333;
    margin: 0;
}

.tool-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.control-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.control-group:first-child {
    min-height: 50px;
    align-items: flex-start;
}

/* 工具特定按钮样式 */
.json-only, .csv-only, .text-only, .url-only, .base64-only {
    margin-left: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.json-only:hover, .csv-only:hover, .text-only:hover, .url-only:hover, .base64-only:hover {
    opacity: 1;
}

.tool-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.input-panel, .output-panel {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.input-panel h3, .output-panel h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1rem;
}

.input-panel textarea, .output-panel textarea {
    width: 100%;
    height: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-panel textarea:focus {
    border-color: #667eea;
}

.output-panel textarea {
    background: #f8f9fa;
}

.input-info, .output-info {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.special-controls {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.control-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.control-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

.control-row select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

#validation-status {
    font-weight: 500;
}

#validation-status.valid {
    color: #28a745;
}

#validation-status.invalid {
    color: #dc3545;
}

/* Responsive adjustments for tool interface */
@media (max-width: 768px) {
    .tool-workspace {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tool-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .control-group {
        justify-content: center;
    }
    
    .tool-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .control-row {
        justify-content: center;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
} 