/* csv-to-json-converter.css */
.csv-json-converter-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.converter-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #eaeaea;
}

.converter-card h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 600;
}

.description {
    color: #666;
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.5;
}

.input-section {
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.file-upload-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-label {
    display: inline-block;
    padding: 12px 24px;
    background: #4a6cf7;
    color: white;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.file-upload-label:hover {
    background: #3a5ce5;
    transform: translateY(-1px);
}

.file-name {
    margin-left: 15px;
    color: #666;
    font-style: italic;
}

.input-group textarea,
#json-output {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.input-group textarea:focus,
#json-output:focus {
    outline: none;
    border-color: #4a6cf7;
}

.input-group small {
    color: #888;
    font-size: 13px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #888;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.divider span {
    padding: 0 15px;
    font-size: 13px;
    font-weight: 500;
}

.options-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    align-items: center;
}

.option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.option label {
    cursor: pointer;
    color: #444;
    font-size: 14px;
}

.delimiter-badge {
    background: #e8f4ff;
    color: #2c3e50;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: monospace;
    font-weight: bold;
    font-size: 14px;
    border: 1px solid #c2d9ff;
}

.convert-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4a6cf7, #6a8aff);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.convert-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 108, 247, 0.3);
}

.convert-button:active {
    transform: translateY(0);
}

.spinner {
    font-style: italic;
    opacity: 0.9;
}

.output-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eaeaea;
}

.output-section h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
}

.output-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.action-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-button {
    background: #10b981;
    color: white;
}

.copy-button:hover {
    background: #0da271;
    transform: translateY(-1px);
}

.download-button {
    background: #3b82f6;
    color: white;
}

.download-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.clear-button {
    background: #ef4444;
    color: white;
}

.clear-button:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

#json-output {
    background: #f8f9fa;
    color: #2c3e50;
    min-height: 200px;
    margin-bottom: 10px;
}

.output-info {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 13px;
    margin-top: 5px;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    border-left: 4px solid #c33;
    font-size: 14px;
    display: none;
}

.instructions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
    color: #555;
}

.instructions h4 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 10px;
}

.instructions ol {
    margin: 10px 0;
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.instructions p {
    margin: 15px 0 0 0;
    padding: 12px;
    background: #f0f7ff;
    border-radius: 6px;
    font-size: 14px;
    border-left: 4px solid #4a6cf7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .csv-json-converter-container {
        padding: 10px;
    }
    
    .converter-card {
        padding: 20px;
    }
    
    .converter-card h2 {
        font-size: 24px;
    }
    
    .options-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .output-actions {
        flex-direction: column;
    }
    
    .action-button {
        width: 100%;
        justify-content: center;
    }
    
    .file-upload-wrapper {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .file-name {
        margin-left: 0;
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .converter-card {
        padding: 15px;
    }
    
    .input-group textarea,
    #json-output {
        padding: 12px;
        font-size: 13px;
    }
    
    .convert-button {
        padding: 14px;
        font-size: 15px;
    }
}