/* File Upload Styling */
.input-container {
    position: relative;
}

.file-upload-area {
    position: relative;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: var(--neutral--500);
}

.file-upload-area.drag-over {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

.file-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.file-upload-area.drag-over .file-upload-overlay {
    opacity: 1;
}

.file-upload-message {
    text-align: center;
    color: white;
}

.file-upload-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Quick Example Styling */
.example-container {
    background-color: var(--neutral--700);
    border: 1px solid var(--neutral--600);
    border-radius: 16px;
    padding: 25px 23px;
    box-shadow: 0 2px 12px 0 var(--general--shadow-02);
}

.example-container:hover {
    border-color: var(--neutral--500);
    box-shadow: 0 2px 12px 0 var(--general--shadow-03);
}

/* Form controls */
.form-select {
    background-color: var(--neutral--700);
    border: 1px solid var(--neutral--600);
    color: var(--neutral--100);
    border-radius: 8px;
    padding: 8px 12px;
}

.form-select:focus {
    border-color: var(--neutral--500);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* JSON Output Styling */
.json-output-container {
    background-color: var(--neutral--700);
    border: 1px solid var(--neutral--600);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px 0 var(--general--shadow-02);
    margin-top: 1rem;
}

.json-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: var(--neutral--800);
    border-bottom: 1px solid var(--neutral--600);
}

.json-controls {
    display: flex;
    gap: 8px;
}

.output-actions {
    display: flex;
    gap: 8px;
}

.json-output-content {
    padding: 20px;
    max-height: 600px;
    overflow: auto;
    min-height: 200px;
}

/* JSON Collapsible Styling */
.json-line {
    position: relative;
}

.json-collapsible {
    cursor: pointer;
}

.json-toggle {
    display: inline-block;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
    white-space: pre;
}

.json-toggle:hover {
    color: #007bff;
}

.json-toggle i {
    margin-right: 8px;
    transition: transform 0.2s ease;
    color: #007bff;
}

.json-content {
    padding-left: 8px;
    border-left: 1.5px solid #4446;
    /* linha fina, cor suave, não formar bloco */
}

/* Preserve whitespace in JSON output */
.json-formatted {
    background: transparent;
    border: none;
    color: var(--neutral--100);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    white-space: pre;
    word-break: break-all;
}

/* Syntax Highlighting */
.json-formatted .json-key {
    color: #9cdcfe;
}

.json-formatted .json-string {
    color: #ce9178;
}

.json-formatted .json-number {
    color: #b5cea8;
}

.json-formatted .json-boolean {
    color: #569cd6;
}

.json-formatted .json-null {
    color: #569cd6;
}

/* Conversion result styling */
#conversionResult {
    background-color: var(--neutral--700);
    border: 1px solid var(--neutral--600);
    border-radius: 16px;
    padding: 20px;
    margin-top: 1rem;
}

#conversionOutput {
    background-color: var(--neutral--800);
    border: 1px solid var(--neutral--600);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .json-output-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .json-controls,
    .output-actions {
        justify-content: center;
    }

    .file-upload-area {
        min-height: 200px;
    }

    .json-output-content {
        max-height: 400px;
    }
}

/* Input container improvements */
.input-container {
    margin-bottom: 0;
}

.file-upload-area {
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: var(--neutral--500);
    background-color: rgba(255, 255, 255, 0.02);
}

/* Button improvements */
.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Ajuste visual: toggle à direita da chave */
.json-toggle {
    margin-left: 4px;
    vertical-align: middle;
}

#formatButton {
    padding: 0.75rem 1.25rem;
}

/* Edit icon styling */
.edit-icon {
    font-size: 12px;
    color: #007bff;
    opacity: 0.6;
    margin-left: 4px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.json-editable:hover .edit-icon {
    opacity: 1;
}

.json-editable:hover {
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 3px;
    padding: 1px 3px;
    margin: -1px -3px;
}

/* JSON Summary Styling */
/* JSON Summary Styling */
.json-summary-box {
    background-color: var(--neutral--700);
    border: 1px solid var(--neutral--600);
    border-radius: 16px;
    padding: 20px;
    color: var(--neutral--100);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.4;
    min-height: 100px; /* Reserva espaço mínimo */
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Estado oculto - mantém espaço mas invisível */
.json-summary-box.hidden {
    visibility: hidden;
    opacity: 0;
    min-height: 100px; /* Mantém o espaço reservado */
}

/* Estado visível */
.json-summary-box.visible {
    visibility: visible;
    opacity: 1;
}
/* Enhanced Content Styling */
.alert-info {
    background-color: rgba(0, 123, 255, 0.1);
    border-color: rgba(0, 123, 255, 0.3);
    color: var(--neutral--100);
}

.alert-info i {
    color: #007bff;
}

.card {
    background-color: var(--neutral--700);
    border: 1px solid var(--neutral--600);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--neutral--500);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-title {
    color: var(--neutral--100);
    font-weight: 600;
    margin-bottom: 1rem;
}

.card-body ul li {
    margin-bottom: 0.5rem;
    color: var(--neutral--200);
}

.card-body ul li i {
    margin-right: 0.5rem;
    width: 16px;
}

.alert-light {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--neutral--600);
    color: var(--neutral--200);
}

.alert-light h5 {
    color: var(--neutral--100);
    margin-bottom: 1rem;
}

.alert-light ul li {
    margin-bottom: 0.5rem;
}

/* Example Cards Styling */
.example-card {
    background-color: var(--neutral--700);
    border: 1px solid var(--neutral--600);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.example-card:hover {
    border-color: var(--neutral--500);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.example-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.example-header i {
    font-size: 1.2rem;
    margin-right: 8px;
}

.example-header h6 {
    margin: 0;
    color: var(--neutral--100);
    font-weight: 600;
}

.example-preview {
    position: relative;
    max-height: 120px;
    overflow: hidden;
}

.example-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, var(--neutral--700));
    pointer-events: none;
}

.example-preview code {
    font-size: 11px;
    line-height: 1.3;
    color: var(--neutral--300);
    display: block;
    white-space: pre-wrap;
    word-break: break-all;
}

.example-card:hover::before {
    opacity: 1;
}

.example-card:hover .example-preview {
    opacity: 0.3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .example-card {
        margin-bottom: 15px;
    }

    .example-preview {
        max-height: 80px;
    }

    .example-preview code {
        font-size: 10px;
    }
}

.list-unstyled li>i{
    margin-right: 0.5rem;
}

.content-sections .content-block {
    max-width: 960px;
    margin: 0 auto;
    color: var(--neutral--100);
}

.content-sections .content-block h2,
.content-sections .content-block h3 {
    color: var(--neutral--50);
    font-weight: 600;
}

.content-sections .content-block p {
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--neutral--200);
}

.content-sections .content-block ul,
.content-sections .content-block ol {
    margin-left: 1.25rem;
    line-height: 1.7;
    color: var(--neutral--200);
}

.content-sections .content-block ul li,
.content-sections .content-block ol li {
    margin-bottom: 0.5rem;
}

.before-after-cards .code-card {
    background-color: var(--neutral--800);
    border: 1px solid var(--neutral--600);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 18px rgba(0, 0, 0, 0.25);
}

.code-card-header {
    background: rgba(13, 110, 253, 0.1);
    border-bottom: 1px solid var(--neutral--600);
    color: var(--neutral--50);
    font-weight: 600;
    padding: 12px 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.code-card pre {
    margin: 0;
    padding: 18px 20px;
    background: transparent;
    color: var(--neutral--200);
    font-size: 13px;
    line-height: 1.6;
}

.code-card code {
    color: inherit;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
    /* Reduzir anúncios em mobile - carregar apenas 2 dos 5 */
    .ad-container {
        display: none !important;
    }

    .ad-container:nth-of-type(1),
    .ad-container:nth-of-type(3) {
        display: block !important;
    }

    /* Otimizar renderização JSON */
    .json-output-content {
        max-height: 400px;
        will-change: scroll-position;
        transform: translateZ(0); /* Force GPU acceleration */
        -webkit-overflow-scrolling: touch;
    }

    .json-line {
        contain: layout style paint;
    }

    /* Reduzir animações em mobile */
    .example-card {
        transition: none;
    }

    .example-card:hover {
        transform: none;
        box-shadow: none;
    }

    /* Desabilitar hover effects */
    .json-editable:hover {
        background-color: transparent;
    }

    /* Simplificar sombras para melhor performance */
    .json-output-container,
    .code-card {
        box-shadow: none;
    }

    /* Otimizar scroll */
    .json-formatted {
        -webkit-overflow-scrolling: touch;
    }

    /* Reduzir padding em mobile */
    .json-output-content {
        padding: 15px;
    }

    /* Simplificar cards de exemplo */
    .example-preview::after {
        display: none;
    }
}


