/* Converter Box Styles */
.converter-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin: 30px 0;
}

.converter-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #ffffff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.form-control-file {
    width: 100%;
    padding: 12px 16px;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control-file:hover {
    border-color: #ffffff;
    background: #ffffff;
}

.form-control-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.95);
    font-family: 'Courier New', monospace;
    resize: vertical;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control-textarea:focus {
    outline: none;
    border-color: #ffffff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Tab Styles */
.input-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tab-btn.active {
    background: #ffffff;
    color: #667eea;
    border-color: #ffffff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Button Styles */
.btn-convert {
    width: 100%;
    padding: 14px 24px;
    background: #ffffff;
    color: #667eea;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.btn-convert:disabled {
    background: #cbd5e0;
    color: #718096;
    cursor: not-allowed;
    transform: none;
}

/* Progress Bar */
.progress-container {
    display: none;
    margin-top: 25px;
}

.progress-bar-custom {
    width: 100%;
    height: 35px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    width: 0%;
    transition: width 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    border-radius: 20px;
}

/* Status Message */
.status-message {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 8px;
    display: none;
    font-weight: 500;
    text-align: center;
}

.status-success {
    background: rgba(72, 187, 120, 0.2);
    color: #ffffff;
    border: 2px solid rgba(72, 187, 120, 0.5);
}

.status-error {
    background: rgba(245, 101, 101, 0.2);
    color: #ffffff;
    border: 2px solid rgba(245, 101, 101, 0.5);
}

/* Preview Section */
.preview-section {
    display: none;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

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

.preview-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 22px;
    font-weight: 700;
}

.btn-preview-toggle {
    padding: 8px 20px;
    background: #667eea;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-preview-toggle:hover {
    background: #5568d3;
}

/* Table Preview */
.preview-table-container {
    display: block;
    margin-bottom: 20px;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.preview-table thead {
    background: #f7fafc;
}

.preview-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 700;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.preview-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
}

.preview-table tbody tr:hover {
    background: #f7fafc;
}

.preview-table tbody tr:last-child td {
    border-bottom: none;
}

/* Raw Preview */
.preview-raw-container {
    display: none;
    background: #1a202c;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.preview-raw-container pre {
    margin: 0;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Download Button in Preview */
.download-container-preview {
    margin-top: 20px;
}

.btn-download {
    width: 100%;
    padding: 14px 24px;
    background: #48bb78;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-download:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-download svg {
    width: 20px;
    height: 20px;
}

/* Features Section */
.section-heading {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 25px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.feature-item {
    background: #f7fafc;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.feature-item h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 14px;
    color: #718096;
    margin: 0;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .converter-box {
        padding: 25px 20px;
    }
    
    .converter-title {
        font-size: 24px;
    }
    
    .preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}