body {
  font-family: 'Segoe UI', Arial, sans-serif;
  max-width: 100%;
  min-width: 320px;
  margin: 0 auto;
  padding: 15px;
  line-height: 1.5;
  color: #333;
  background-color: #f8f9fa;
  position: relative;
  min-height: 100vh;
  padding-bottom: 50px; /* Space for footer */
}

.container {
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  background-color: white;
  margin-bottom: 10px;
  max-width: 100%;
  box-sizing: border-box;
}

/* Header styles */
header {
  text-align: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

h1 {
  margin: 0;
  color: #2c3e50;
  font-size: 28px;
}

/* Converter section styles */
.converter-section {
  background-color: #f5f7f9;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-area {
  flex-direction: column;
  align-items: center;
  gap: 15px;
}


.file-input-container {
  width: calc(100% - 25px);
  margin-bottom: 15px;
}

#file-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.file-input-label {
  display: block;
  background-color: #e9ecef;
  color: #495057;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.file-input-label:hover {
  background-color: #dee2e6;
}

.primary-button, .download-button {
  display: inline-block;
  background-color: #4361ee;
  color: white;
  padding: 8px 15px;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
}

.primary-button {
  width: 100%;
}

.primary-button:hover {
  background-color: #3a56d4;
}

.download-button {
  background-color: #2ecc71;
}

.download-button:hover {
  background-color: #27ae60;
}

#status {
  font-weight: 500;
  min-height: 20px;
  margin: 0;
}

#download-area {
  margin: 0;
}

/* Process section styles */
.process-section {
  margin-top: 20px;
}

h2 {
  color: #2c3e50;
  margin-bottom: 15px;
  text-align: center;
  position: relative;
  font-size: 22px;
}

h2:after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background-color: #4361ee;
  margin: 8px auto 0;
}

/* Flow diagram styles */
.flow-diagram {
  margin: 20px 0;
  width: 100%;
}

.diagram-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  width: 100%;
}

.diagram-box {
  width: 80px;
  height: 60px;
  border: 2px solid #4361ee;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  cursor: pointer;
  transition: all 0.3s;
  background-color: #f8f9fa;
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  margin: 3px;
}

.diagram-box:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: #4361ee;
  transition: height 0.3s;
}

.diagram-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.diagram-box:hover:before {
  height: 6px;
}

.diagram-box.active {
  border-color: #2ecc71;
  background-color: #edfaf1;
}

.diagram-box.active:before {
  background-color: #2ecc71;
  height: 6px;
}

/* Icon styles */
.diagram-box .icon {
  width: 20px;
  height: 20px;
  margin: 4px auto 0;
  display: block;
}

.diagram-box img.icon {
  object-fit: contain;
}

.box-title {
  text-align: center;
  font-weight: 600;
  font-size: 10px;
  margin-top: 5px;
  line-height: 1.2;
}

.arrow {
  font-size: 16px;
  color: #4361ee;
  font-weight: bold;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 1px;
}

/* Panel styles */
.panel-container {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  min-height: 250px;
  border: 1px solid #e9ecef;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.panel h3 {
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e9ecef;
  font-size: 20px;
}

.panel-content {
  padding: 0;
}

.content-with-image {
  display: flex;
  gap: 20px;
}

.text-content {
  flex: 3;
}

.image-placeholder {
  flex: 2;
  background-color: #e9ecef;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border: 1px dashed #adb5bd;
}

.placeholder-text {
  color: #6c757d;
  font-style: italic;
  text-align: center;
  padding: 10px;
}

.image-container {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-image {
  max-width: 100%;
  max-height: 300px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.panel-columns {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

.panel-column {
  flex: 1;
}

.panel-column h4 {
  color: #4361ee;
  margin-bottom: 8px;
  font-size: 16px;
}

.panel-column:nth-child(2) h4 {
  color: #2ecc71;
}

.code-example {
  background-color: #f1f1f1;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  font-family: monospace;
  font-size: 13px;
  overflow-x: auto;
  white-space: pre;
  margin: 10px 0;
}

ul, ol {
  padding-left: 20px;
  margin: 10px 0;
}

li {
  margin-bottom: 5px;
}

p {
  margin: 8px 0;
}

/* Footer styles */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #2c3e50;
  color: white;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
  z-index: 100;
}

.footer-content {
  max-width: 100%;
  margin: 0 auto;
}

footer a {
  color: #74b9ff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Status message styles */
.status-uploading {
  color: #3498db;
  font-weight: 600;
}

.status-success {
  color: #2ecc71;
  font-weight: 600;
}

.status-error {
  color: #e74c3c;
  font-weight: 600;
}

/* Media queries for responsive layout */
@media (max-width: 1100px) {
  body {
    max-width: 95%;
  }
  
  .container {
    padding: 15px;
  }
  
  .panel-content {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .content-with-image {
    flex-direction: column;
  }
  
  .text-content {
    order: 1;
  }
  
  .image-placeholder, 
  .image-container {
    order: 0;
    margin-bottom: 15px;
    width: 100%;
  }
  
  .panel-columns {
    flex-direction: column;
  }
  
  .panel-column {
    margin-bottom: 15px;
  }
  
  .diagram-box {
    width: 85px;
    height: 70px;
    padding: 6px;
  }
  
  .box-title {
    font-size: 10px;
  }
  
  .diagram-box .icon {
    width: 18px;
    height: 18px;
    margin: 3px auto 0; 

  }
  
  .arrow {
    font-size: 16px;
  }
  
  /* Hide arrows when they would appear at the beginning of a wrapped line */
  .diagram-row {
    justify-content: center;
  }

}
.architecture-diagram {
  margin: 20px auto;
  width: 100%;
  max-width: 650px;
}

.arch-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Top row with user flow */
.user-flow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
}

/* Bottom row with backend services */
.backend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 5px;
}

/* Connectors between rows */
.connector-container {
  display: flex;
  justify-content: space-between;
  width: 420px; /* Adjust based on your layout */
  position: relative;
}

.vertical-arrow {
  color: #4361ee;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
}

.arch-box {
  width: 80px;
  height: 60px;
  border: 2px solid #4361ee;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  background-color: #f8f9fa;
  position: relative;
  overflow: hidden;
  margin: 0 5px;
}

.arch-box:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: #4361ee;
  transition: height 0.3s;
}

.arch-box.lambda {
  border-color: #e74c3c;
}

.arch-box.lambda:before {
  background-color: #e74c3c;
}

.arch-box.s3 {
  border-color: #2ecc71;
}

.arch-box.s3:before {
  background-color: #2ecc71;
}

.arch-icon {
  width: 24px;
  height: 24px;
  margin: 4px auto 0;
  display: block;
}

.arch-title {
  text-align: center;
  font-weight: 600;
  font-size: 10px;
  margin-top: 5px;
  line-height: 1.2;
}

.arch-arrow {
  font-size: 16px;
  color: #4361ee;
  font-weight: bold;
  margin: 0 5px;
}

.empty-space {
  width: 80px;
  opacity: 0;
  margin: 0 5px;
}

@media (max-width: 600px) {
.arch-icon {
  margin: 4px auto 0;
  width: 16px;
  height: 16px;
  display: block;
}

.arch-box {
  width: 40px;
  height: 50px;
  border: 2px solid #4361ee;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  background-color: #f8f9fa;
  position: relative;
  overflow: hidden;
  margin: 0;
}
.arch-title {
  text-align: center;
  font-weight: 600;
  font-size: 7px;
  margin-top: 0;
}

.empty-space {
  width: 50px;
  opacity: 0;
  margin: 0 5px;
}

.connector-container {
  display: flex;
  justify-content: space-between;
  width: 350px; /* Adjust based on your layout */
  position: relative;
}
}
