/* Main Container Styles */
.csv-json-converter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

/* Hero Section */
.csv-json-hero {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.csv-json-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.csv-json-hero .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-top: 0;
}

/* Tool Wrapper */
.csv-json-tool-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 40px;
}

/* Input/Output Sections */
.csv-json-input-section,
.csv-json-output-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-header,
.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.input-header h2,
.output-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #444;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* Textarea Styles */
.csv-textarea,
.json-textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.csv-textarea:focus,
.json-textarea:focus {
    outline: none;
    border-color: #6e8efb;
    box-shadow: 0 0 0 3px rgba(110, 142, 251, 0.2);
}

.json-textarea {
    background-color: #f8f9fa;
    white-space: pre;
    overflow-x: auto;
}

/* Button Styles */
.sample-btn,
.clear-btn,
.copy-btn,
.download-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sample-btn {
    background-color: #e1f0ff;
    color: #1976d2;
}

.sample-btn:hover {
    background-color: #d0e5ff;
}

.clear-btn {
    background-color: #ffebee;
    color: #d32f2f;
}

.clear-btn:hover {
    background-color: #ffcdd2;
}

.copy-btn {
    background-color: #e8f5e9;
    color: #388e3c;
}

.copy-btn:hover {
    background-color: #c8e6c9;
}

.download-btn {
    background-color: #e3f2fd;
    color: #1565c0;
}

.download-btn:hover {
    background-color: #bbdefb;
}

/* File Upload */
.file-upload-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.file-upload-btn {
    position: relative;
    overflow: hidden;
    display: inline-block;
    padding: 8px 15px;
    background-color: #f5f5f5;
    color: #555;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-upload-btn:hover {
    background-color: #e0e0e0;
}

.file-upload-btn input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Delimiter and Format Options */
.delimiter-options,
.format-options {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.delimiter-options label,
.format-options label {
    font-weight: 500;
    color: #555;
}

.delimiter-options select,
.format-options select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

#custom-delimiter {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 80px;
}

/* Convert Button */
.convert-btn-container {
    display: flex;
    justify-content: center;
}

.convert-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(110, 142, 251, 0.3);
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(110, 142, 251, 0.4);
}

.convert-btn:active {
    transform: translateY(0);
}

.convert-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Info Section */
.csv-json-info-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.info-card h3 {
    margin-top: 0;
    color: #444;
    font-size: 1.4rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.steps-list {
    padding-left: 20px;
}

.steps-list li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.features-list {
    list-style-type: none;
    padding-left: 0;
}

.features-list li {
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
    line-height: 1.6;
}

.features-list li:before {
    content: "✓";
    color: #4caf50;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.use-case {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #6e8efb;
}

.use-case h4 {
    margin-top: 0;
    color: #333;
}

.faq-item {
    margin-bottom: 15px;
}

.faq-question {
    color: #1976d2;
    cursor: pointer;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.faq-answer {
    margin-top: 0;
    line-height: 1.6;
    color: #555;
}

/* Checkbox Styles */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #2196F3;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .csv-json-tool-wrapper {
        padding: 20px;
    }
    
    .file-upload-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .delimiter-options {
        width: 100%;
    }
    
    .use-cases-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .csv-json-hero h1 {
        font-size: 2rem;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: flex-end;
    }
    
    .convert-btn {
        width: 100%;
        justify-content: center;
    }
}




/* Alert Styles */
.alert-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 100%;
    max-width: 400px;
}

.conversion-alert {
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    text-align: center;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.alert-success {
    background-color: #4caf50;
}

.alert-error {
    background-color: #f44336;
}

.alert-info {
    background-color: #2196f3;
}