body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 95vh;
  background-color: #f5f7fb;
  color: #333;
}

h1 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 24px;
  color: #2c3e50;
  font-weight: 600;
}

#app-container {
  display: flex;
  flex: 1;
  gap: 20px;
  height: calc(100% - 60px);
}

.workspace-wrapper {
  position: relative;
  flex: 1.4;
  height: 100%;
}

#blocklyDiv {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  background-color: #ffffff;
  overflow: hidden;
}

#outputDiv {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  background-color: #1e1e1e;
  border-radius: 12px;
  box-sizing: border-box;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  gap: 12px;
  min-width: 0;
}

#outputDiv h3 {
  margin-top: 0;
  margin-bottom: 4px;
  color: #9cdcfe;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.panel-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

textarea, pre {
  flex: 1;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.4;
  padding: 10px;
  border: none;
  background-color: #141414;
  color: #d4d4d4;
  resize: none;
  outline: none;
  border-radius: 6px;
  margin: 0;
  overflow-y: auto;
  overflow-x: auto;
  width: 100%;
  box-sizing: border-box;
}

#consoleOutput {
  color: #ffffff;
  white-space: pre-wrap;
  word-break: break-all;
  background-color: #0c0c0c;
  border-left: 3px solid #16db93;
}

.accordion-header {
  background-color: #2d2d2d;
  color: #e2c08d;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  border-left: 3px solid #e2c08d;
}

.accordion-header:hover {
  background-color: #383838;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out, margin-top 0.25s ease-out;
  display: flex;
  flex-direction: column;
}

.accordion-section.active .accordion-content {
  max-height: 180px;
  margin-top: 8px;
}

#filePreview {
  color: #e2c08d;
  background-color: #151515;
  height: 180px;
}

.blocklyFlyoutBackground {
  fill: #f8f9fa !important;
}

#hintModal {
  display: none; 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  background-color: rgba(0, 0, 0, 0.75); 
  z-index: 9999999 !important; 
  justify-content: center; 
  align-items: center;
}

.hint-modal-content {
  background-color: #1e1e1e; 
  color: #ffffff; 
  padding: 25px; 
  border-radius: 12px; 
  box-shadow: 0 10px 35px rgba(0,0,0,0.6); 
  width: 80%; 
  max-width: 850px; 
  height: 70vh;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#hintBlocklyDiv {
  flex: 1;
  width: 100%;
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}
#pythonCode {
  display: block !important;
  white-space: pre-wrap !important; /* Trzyma strukturę \n oraz automatycznie zawija zbyt długie linie */
  word-wrap: break-word !important;
}

/* 🔥 WYMUSZENIE WIELOLINIOWOŚCI I ŁAMANIA ENTRÓW DLA ARCHITEKTURY PRISM */
.code-editor-container pre[class*="language-"], 
.code-editor-container pre[class*="language-"] code,
#pythonCode,
#pythonCode span {
  white-space: pre !important;        /* Kluczowe dla zachowania tradycyjnych enterów i tabulacji Pythona */
  word-spacing: normal !important;
  word-break: normal !important;
  word-wrap: normal !important;
  display: block-inline !important;
}

/* Dodatkowe upewnienie się, że kontener nadrzędny pozwala na bloki */
.code-editor-container pre {
  display: block !important;
  white-space: pre !important;
}
