/* Main Container Styles */
.json-formatter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2d3748;
    line-height: 1.6;
}

/* Hero Section */
.json-formatter-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.json-formatter-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
}

.json-formatter-hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.json-formatter-subtitle {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

/* Tool Section */
.json-formatter-tool {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 4rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.json-formatter-input-section,
.json-formatter-output-section {
    padding: 2rem;
}

.json-formatter-input-header,
.json-formatter-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.json-formatter-input-header h2,
.json-formatter-output-header h2 {
    font-size: 1.5rem;
    color: #2d3748;
    margin: 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.json-formatter-input-header h2::before,
.json-formatter-output-header h2::before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    border-radius: 3px;
}

.json-formatter-actions {
    display: flex;
    gap: 12px;
}

.json-formatter-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.json-formatter-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.json-formatter-btn.primary {
    background: linear-gradient(to right, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.json-formatter-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.json-formatter-btn.secondary {
    background-color: #f8fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.json-formatter-btn.secondary:hover {
    background-color: #edf2f7;
    border-color: #cbd5e0;
}

.json-formatter-btn:active {
    transform: translateY(0);
}

.json-formatter-textarea {
    width: 100%;
    min-height: 220px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

.json-formatter-textarea:focus {
    outline: none;
    border-color: #a3bffa;
    box-shadow: 0 0 0 3px rgba(164, 202, 254, 0.45);
    background-color: white;
}

.json-formatter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: #f8fafc;
    border-top: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
}

.json-formatter-options {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.json-formatter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #4a5568;
}

.json-formatter-option input[type="checkbox"],
.json-formatter-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.json-formatter-output {
    width: 100%;
    min-height: 220px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f8fafc;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-x: auto;
}

.json-formatter-error {
    color: #e53e3e;
    margin-top: 12px;
    padding: 12px;
    background-color: #fff5f5;
    border-radius: 8px;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    display: none;
    border-left: 4px solid #e53e3e;
}

/* Info Boxes */
.json-formatter-info-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.json-formatter-info-box {
    background: white;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.json-formatter-info-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #667eea, #764ba2);
    transition: height 0.3s ease;
}

.json-formatter-info-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.json-formatter-info-box:hover::after {
    height: 6px;
}

.json-formatter-info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.2);
}

.json-formatter-info-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.json-formatter-info-box h3 {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    color: #2d3748;
    font-weight: 700;
}

.json-formatter-info-box p {
    color: #4a5568;
    line-height: 1.7;
    font-size: 1.05rem;
}

/* Content Section */
.json-formatter-content {
    margin-bottom: 5rem;
    position: relative;
}

.json-formatter-content-title {
    font-size: 2.6rem;
    color: #2d3748;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
}

.json-formatter-content-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 6px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 1.8rem auto;
    border-radius: 3px;
    opacity: 0.8;
}

.json-formatter-content-text {
    color: #4a5568;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.15rem;
    text-align: center;
    position: relative;
    padding: 0 2rem;
}

.json-formatter-content-text::before,
.json-formatter-content-text::after {
    content: '"';
    font-size: 4rem;
    color: #a0aec0;
    opacity: 0.15;
    position: absolute;
    font-family: Georgia, serif;
    font-weight: bold;
}

.json-formatter-content-text::before {
    top: -2.5rem;
    left: 0;
}

.json-formatter-content-text::after {
    bottom: -4rem;
    right: 0;
}

.json-formatter-content-subtitle {
    font-size: 2.2rem;
    color: #2d3748;
    text-align: center;
    margin: 5rem 0 3.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
}

.json-formatter-content-subtitle::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    background-color: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
}

.json-formatter-content-list {
    max-width: 700px;
    margin: 0 auto 3rem;
    padding-left: 2rem;
    color: #4a5568;
    line-height: 1.8;
    font-size: 1.15rem;
    list-style-type: none;
}

.json-formatter-content-list li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2rem;
}

.json-formatter-content-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 10px;
    height: 10px;
    background-color: #667eea;
    border-radius: 50%;
    transform: translateY(-50%);
}

/* Feature Grid */
.json-formatter-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto 5rem;
}

.json-formatter-feature-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.json-formatter-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #667eea, #764ba2);
    transition: height 0.3s ease;
}

.json-formatter-feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.json-formatter-feature-card:hover::before {
    height: 6px;
}

.json-formatter-feature-card h4 {
    color: #2d3748;
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
    font-weight: 700;
    position: relative;
    padding-left: 2.5rem;
}

.json-formatter-feature-card h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: #667eea;
    border-radius: 6px;
    opacity: 0.8;
}

.json-formatter-feature-card p {
    color: #4a5568;
    line-height: 1.7;
    font-size: 1.05rem;
}

/* FAQ Section */
.json-formatter-faq {
    margin-bottom: 5rem;
}

.json-formatter-faq-title {
    font-size: 2.6rem;
    color: #2d3748;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.json-formatter-faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.json-formatter-faq-item {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.json-formatter-faq-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.json-formatter-faq-question {
    width: 100%;
    padding: 1.5rem;
    background-color: white;
    border: none;
    text-align: left;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.json-formatter-faq-question:hover {
    background-color: #f8fafc;
}

.json-formatter-faq-question svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    color: #667eea;
}

.json-formatter-faq-item.active .json-formatter-faq-question svg {
    transform: rotate(180deg);
}

.json-formatter-faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    background-color: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.json-formatter-faq-item.active .json-formatter-faq-answer {
    padding: 0 1.5rem 1.5rem;
    max-height: 1000px;
}

.json-formatter-faq-answer p {
    color: #4a5568;
    line-height: 1.8;
    font-size: 1.05rem;
}

.json-formatter-internal-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 1px dashed #a3bffa;
}

.json-formatter-internal-link:hover {
    color: #764ba2;
    border-bottom: 1px solid #764ba2;
}

/* Syntax Highlighting */
.token.key { color: #d53f8c; font-weight: 600; }
.token.string { color: #2f855a; }
.token.number { color: #b83280; }
.token.boolean { color: #0987a0; }
.token.null { color: #0987a0; }
.token.punctuation { color: #718096; }

/* Responsive Styles */
@media (max-width: 1024px) {
    .json-formatter-hero-content h1 {
        font-size: 2.4rem;
    }
    
    .json-formatter-content-title,
    .json-formatter-faq-title {
        font-size: 2.2rem;
    }
    
    .json-formatter-content-subtitle {
        font-size: 1.9rem;
    }
}

@media (max-width: 768px) {
    .json-formatter-container {
        padding: 15px;
    }
    
    .json-formatter-hero {
        padding: 2.5rem 1.5rem;
    }
    
    .json-formatter-hero-content h1 {
        font-size: 2rem;
    }
    
    .json-formatter-subtitle {
        font-size: 1.1rem;
    }
    
    .json-formatter-input-section,
    .json-formatter-output-section {
        padding: 1.5rem;
    }
    
    .json-formatter-controls {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .json-formatter-options {
        flex-direction: column;
        gap: 12px;
    }
    
    .json-formatter-info-boxes,
    .json-formatter-feature-grid {
        grid-template-columns: 1fr;
    }
    
    .json-formatter-content-title,
    .json-formatter-faq-title {
        font-size: 2rem;
    }
    
    .json-formatter-content-subtitle {
        font-size: 1.7rem;
        margin: 4rem 0 3rem;
    }
    
    .json-formatter-content-text {
        font-size: 1.05rem;
        padding: 0 1rem;
    }
    
    .json-formatter-content-text::before,
    .json-formatter-content-text::after {
        font-size: 3rem;
    }
    
    .json-formatter-content-text::before {
        top: -1.5rem;
    }
    
    .json-formatter-content-text::after {
        bottom: -3rem;
    }
}

@media (max-width: 480px) {
    .json-formatter-hero {
        padding: 2rem 1rem;
        border-radius: 8px;
    }
    
    .json-formatter-hero-content h1 {
        font-size: 1.8rem;
    }
    
    .json-formatter-input-section,
    .json-formatter-output-section {
        padding: 1.25rem;
    }
    
    .json-formatter-input-header h2,
    .json-formatter-output-header h2 {
        font-size: 1.3rem;
    }
    
    .json-formatter-actions {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .json-formatter-btn {
        width: 100%;
        justify-content: center;
    }
    
    .json-formatter-content-title,
    .json-formatter-faq-title {
        font-size: 1.8rem;
    }
    
    .json-formatter-content-subtitle {
        font-size: 1.5rem;
    }
    
    .json-formatter-info-box,
    .json-formatter-feature-card {
        padding: 2rem 1.5rem;
    }
    
    .json-formatter-faq-question {
        padding: 1.25rem;
        font-size: 1.1rem;
    }
}