/* General Body Styling */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: #f8f9fa;
  color: #333;
}

header {
  background: #007bff;
  color: white;
  padding: 20px;
  text-align: center;
}

.container {
  max-width: 1100px;
  margin: 10px auto;
  padding: 0 15px;
}

/* Editor Section */
#editor {
  height: 280px;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 15px;
}

/* Button Grid */
.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

button {
  padding: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #007bff;
  color: white;
  transition: 0.3s;
}

button:active { transform: scale(0.95); }

/* --- FLOWCHART VIEWPORT --- */
#output {
  width: 100%;
  height: 500px;
  overflow: auto; /* মোবাইলে হাত দিয়ে সরানোর জন্য */
  border: 2px solid #eee;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  justify-content: center; /* ডেস্কটপে মাঝখানে */
  align-items: flex-start;
  padding: 15px;
  box-sizing: border-box;
}

#output svg {
  display: block;
  margin: 0 auto;
}

/* Console Styling */
#console {
  background: #1e1e1e;
  color: white;
  padding: 12px;
  border-radius: 8px;
  margin-top: 15px;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  min-height: 60px;
  white-space: pre-wrap;
}

/* --- MOBILE SPECIFIC FIXES --- */
@media (max-width: 600px) {
  .buttons { grid-template-columns: 1fr; }
  
  #output { 
    display: block; /* মোবাইলে ব্লক দিলে স্ক্রলিং ভালো হয় */
    height: 450px;
  }

  #output svg {
    /* মোবাইলে জোর করে বিশাল বড় করবে না */
    max-width: none !important; 
    margin: 0; /* বাম দিক থেকে শুরু হবে */
  }
}
