* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  line-height: 1.6;
}

.header-ad {
  background: #fff;
  padding: 10px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
}

.header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.header h1 {
  font-size: 3em;
  margin-bottom: 10px;
  font-weight: 300;
}

.header p {
  font-size: 1.2em;
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto;
}

.nav-tabs {
  background: #f8f9fa;
  display: flex;
  border-bottom: 1px solid #e1e5e9;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  flex-wrap: nowrap;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.nav-tab {
  flex: 1 1 auto;
  min-width: 0;
  padding: 15px 10px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  text-align: center;
  flex-shrink: 0;
  min-width: 80px;
}

.nav-tab.active {
  background: white;
  border-bottom-color: #3498db;
  color: #3498db;
}

.nav-tab:hover {
  background: #e9ecef;
}

.nav-tabs::before,
.nav-tabs::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-tabs::before {
  left: 0;
  background: linear-gradient(to right, #f8f9fa, transparent);
}

.nav-tabs::after {
  right: 0;
  background: linear-gradient(to left, #f8f9fa, transparent);
}

.main-wrapper {
  display: flex;
  flex: 1;
}

.sidebar-ad {
  width: 160px;
  background: #f8f9fa;
  padding: 20px 10px;
  border-right: 1px solid #e1e5e9;
}

.main-content {
  flex: 1;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.tab-content {
  display: none;
}

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

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

.input-section h3 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.3em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.json-input,
.file-input-area {
  width: 100%;
  min-height: 300px;
  padding: 20px;
  border: 2px dashed #e1e5e9;
  border-radius: 10px;
  font-family: "Courier New", monospace;
  font-size: 14px;
  resize: vertical;
  transition: all 0.3s ease;
  background: #fafafa;
}

.text-output {
  background: #f8f9fa !important;
  border-style: solid !important;
  border-color: #dee2e6 !important;
  color: #495057;
  cursor: text;
}

.json-input:focus {
  outline: none;
  border-color: #3498db;
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  background: white;
}

.file-input-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  position: relative;
}

.file-input-area:hover {
  border-color: #3498db;
  background: #f8fafc;
}

.file-input-area.dragover {
  border-color: #3498db;
  background: #eef2f7;
  border-style: solid;
}

.file-input {
  display: none;
}

.upload-icon {
  font-size: 3em;
  margin-bottom: 15px;
  opacity: 0.6;
}

.upload-text {
  font-size: 1.1em;
  color: #666;
  margin-bottom: 10px;
}

.upload-hint {
  font-size: 0.9em;
  color: #999;
}

.button-group {
  display: flex;
  gap: 15px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

.btn-secondary {
  background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  color: white;
}

.btn-warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  color: white;
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.content-ad {
  margin: 40px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  text-align: center;
}

.preview-section {
  margin-top: 30px;
}

.preview-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-top: 15px;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  min-width: 600px;
}

.preview-table th,
.preview-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e1e5e9;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-table th {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.preview-table tr:hover {
  background-color: #f8f9fa;
}

.message {
  padding: 15px;
  border-radius: 10px;
  margin: 15px 0;
  border-left: 4px solid;
}

.error-message {
  background-color: #ffe6e6;
  color: #d63031;
  border-left-color: #d63031;
}

.success-message {
  background-color: #e6ffe6;
  color: #00b894;
  border-left-color: #00b894;
}

.warning-message {
  background-color: #fff3cd;
  color: #856404;
  border-left-color: #ffc107;
}

.sample-data {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
  border-left: 4px solid #3498db;
}

.sample-data h4 {
  color: #333;
  margin-bottom: 10px;
}

.sample-data pre {
  background: white;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  font-family: "Courier New", monospace;
  font-size: 12px;
  border: 1px solid #e1e5e9;
  white-space: pre-wrap;
}

.footer {
  background: #2c3e50;
  color: white;
  padding: 50px 20px 20px;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  align-items: start;
}

.footer-section h3 {
  margin-bottom: 20px;
  color: #3498db;
  font-size: 1.2em;
}

.footer-section p,
.footer-section li {
  margin-bottom: 10px;
  color: #bdc3c7;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
  padding-left: 0;
}

.footer-section ul li a {
  color: #bdc3c7;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  padding: 5px 0;
  border-radius: 4px;
}

.footer-section ul li a:hover {
  color: #3498db;
  padding-left: 10px;
  background: rgba(52, 152, 219, 0.1);
}

.footer-bottom {
  border-top: 1px solid #34495e;
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  color: #95a5a6;
}

.footer-ad {
  background: #34495e;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
  border-radius: 10px;
}

.csv-options {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.csv-options h4 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 16px;
  font-weight: 600;
}

.option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.option-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #495057;
  cursor: pointer;
}

.option-group select {
  padding: 6px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background: white;
  font-size: 14px;
  min-width: 120px;
}

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

.ad-placeholder {
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  padding: 20px;
  text-align: center;
  color: #6c757d;
  border-radius: 5px;
  margin: 10px 0;
}

.ad-label {
  font-size: 12px;
  color: #999;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.feature-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5em;
  margin-bottom: 15px;
  color: #3498db;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .main-wrapper {
    flex-direction: column;
  }

  .sidebar-ad {
    width: 100%;
    order: 2;
  }

  .main-content {
    padding: 20px;
  }

  .header h1 {
    font-size: 2em;
  }

  .button-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .nav-tabs {
    padding: 0 5px;
  }

  .nav-tabs::before,
  .nav-tabs::after {
    opacity: 1;
  }

  .nav-tab {
    padding: 12px 8px;
    font-size: 12px;
    min-width: 70px;
    font-weight: 500;
  }

  .option-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .option-group label {
    width: 100%;
    justify-content: space-between;
  }

  .option-group select {
    min-width: 150px;
  }
}

@media (max-width: 480px) {
  .nav-tabs {
    padding: 0 2px;
  }

  .nav-tab {
    padding: 10px 6px;
    font-size: 11px;
    min-width: 60px;
  }
}

@media (max-width: 360px) {
  .nav-tabs {
    flex-direction: column;
    overflow-x: visible;
    overflow-y: auto;
    max-height: 200px;
  }

  .nav-tab {
    width: 100%;
    min-width: auto;
    padding: 12px 15px;
    font-size: 14px;
    border-bottom: 1px solid #e1e5e9;
    border-left: 3px solid transparent;
  }

  .nav-tab.active {
    border-bottom-color: transparent;
    border-left-color: #3498db;
  }
}

.why-choose-section {
  margin: 50px 0;
  padding: 40px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 15px;
}

.why-choose-section h2 {
  text-align: center;
  color: #333;
  font-size: 2.2em;
  margin-bottom: 40px;
  font-weight: 300;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
  padding: 0 20px;
}

.benefit-item {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-left: 4px solid #3498db;
}

.benefit-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.benefit-icon {
  font-size: 2.5em;
  margin-bottom: 15px;
  color: #3498db;
}

.benefit-item h4 {
  color: #333;
  font-size: 1.3em;
  margin-bottom: 15px;
  font-weight: 600;
}

.benefit-item p {
  color: #666;
  line-height: 1.6;
  font-size: 0.95em;
}

.faq-section {
  margin: 50px 0;
  padding: 40px 20px;
}

.faq-section h2 {
  text-align: center;
  color: #333;
  font-size: 2.2em;
  margin-bottom: 40px;
  font-weight: 300;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
}

.faq-question {
  padding: 25px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  transition: all 0.3s ease;
}

.faq-question h4 {
  margin: 0;
  font-size: 1.1em;
  font-weight: 500;
  flex: 1;
  padding-right: 20px;
}

.faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  transition: transform 0.3s ease;
  min-width: 30px;
  text-align: center;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 25px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: #fafafa;
}

.faq-item.active .faq-answer {
  padding: 25px;
  max-height: 200px;
}

.faq-answer p {
  margin: 0;
  color: #555;
  line-height: 1.6;
  font-size: 0.95em;
}

@media (max-width: 768px) {
  .why-choose-section {
    margin: 30px 0;
    padding: 30px 0;
  }
  
  .why-choose-section h2,
  .faq-section h2 {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 10px;
  }
  
  .benefit-item {
    padding: 25px 20px;
  }
  
  .faq-section {
    margin: 30px 0;
    padding: 30px 10px;
  }
  
  .faq-question {
    padding: 20px;
  }
  
  .faq-question h4 {
    font-size: 1em;
  }
  
  .faq-item.active .faq-answer {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .benefits-grid {
    padding: 0 5px;
  }
  
  .benefit-item {
    padding: 20px 15px;
  }
  
  .benefit-icon {
    font-size: 2em;
  }
  
  .faq-question {
    padding: 15px;
  }
  
  .faq-item.active .faq-answer {
    padding: 15px;
  }
}
/* Sub-navigation tabs for CSV to JSON */
.sub-nav-tabs {
  display: flex;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.sub-nav-tab {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  transition: all 0.3s ease;
  text-align: center;
}

.sub-nav-tab:hover {
  background: rgba(79, 172, 254, 0.1);
  color: #4facfe;
}

.sub-nav-tab.active {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 172, 254, 0.3);
}

.sub-tab-content {
  display: none;
}

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

/* Responsive design for sub-tabs */
@media (max-width: 768px) {
  .sub-nav-tabs {
    flex-direction: column;
    gap: 8px;
  }
  
  .sub-nav-tab {
    padding: 10px 12px;
    font-size: 13px;
  }
}
