* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #1e1e1e;
  font-family: "Roboto Mono", monospace;
  color: #fff;
  height: 100vh;
  overflow: hidden;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
  flex-direction: row; /* Default: editor left, console right */
}

.editor-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.editor-header {
  background: #252526;
  padding: 8px 12px;
  border-bottom: 1px solid #333;
}

.main-title {
  font-family: "Lexend deca";
  letter-spacing: 0.7px;
}

/* Toolbar layout */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Left section (logo + title) */
.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-left img {
  width: 42px;
  height: auto;
}

.toolbar-left h1 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  color: #d4d4d4;
}

/* Right section (buttons) */
.toolbar-right {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

button {
  background: none;
  color: white;
  border: 1px solid #3b3b3b;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: background 0.3s ease;
}

button:hover {
  background: #0b84d4;
}

#runBtn {
  background: #0b84d4;
}

@media (max-width: 480px) {
  .toolbar-left h1 {
    font-size: 14px;
  }

  .toolbar-left img {
    width: 35px;
  }

  button {
    font-size: 12px;
    padding: 5px 10px;
  }
}

#editor {
  flex: 1;
  height: 100%;
}

.console-container {
  width: 40%;
  background: #111;
  border-left: 1px solid #333;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #252526;
  padding: 6px 10px;
  border-bottom: 1px solid #333;
}

.console-header span {
  font-size: 14px;
  color: #d4d4d4;
}

.clear-btn {
  background: #444;
  color: #ccc;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
}

.clear-btn:hover {
  background: #666;
}

#console {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  font-size: 16px;
  color: #d4d4d4;
  font-family: "Lexend Deca" !important;
  letter-spacing: "0.7px" !important;
}

.error {
  color: #ff5555;
}

.log {
  color: #4ec9b0;
}

/* Divider for resizing */
#divider {
  width: 3px;
  cursor: ew-resize;
  background: #333;
}

#divider:hover {
  background: #007acc;
}

.shortcut-hint {
  color: #cccccc;
  font-size: 11px;
}

/* 🔴 Highlighted error line background */
.errorLineDecoration {
  background-color: rgba(255, 99, 71, 0.2) !important; /* light red overlay */
  border-left: 3px solid #ff4d4f !important;
}

/* 🚨 Small red marker in the left margin */
.monaco-editor .margin .errorGlyph {
  background-color: #ff4d4f !important;
  border-radius: 50%;
  width: 8px !important;
  height: 8px !important;
  margin-left: 3px;
}

/* 🌍 Footer Styling */
.site-footer {
  background: #181818;
  color: #8f8f8f;
  font-family: "Lexend Deca", sans-serif;
  font-size: 13px;
  text-align: center;
  padding: 8px 10px;
  border-top: 1px solid #333;
  position: sticky;
  bottom: 0px;
  width: 100%;
  z-index: 99999;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #0b84d4;
  text-decoration: none;
  margin: 0 5px;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer i.fa-heart {
  color: #ff5555;
  margin: 0 3px;
}

/* Responsive footer text for small screens */
@media (max-width: 480px) {
  .site-footer {
    font-size: 12px;
    padding: 10px 5px;
  }

  .site-footer p {
    line-height: 1.4;
  }
}

/* ----------------- MOBILE RESPONSIVE ----------------- */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column; /* editor above, console below */
  }

  #divider {
    width: 100%;
    height: 6px;
    cursor: ns-resize;
  }

  .editor-section {
    width: 100% !important;
    height: 60%;
  }

  .console-container {
    width: 100% !important;
    height: 40%;
    border-left: none;
    border-top: 1px solid #333;
  }
}

/* Styling the entire scrollbar */
::-webkit-scrollbar {
  width: 10px; /* Adjust width as needed */
  background-color: #333; /* Dark background for the scrollbar track */
}

/* Styling the scrollbar thumb (the draggable part) */
::-webkit-scrollbar-thumb {
  background-color: #555; /* Darker color for the thumb */
  border-radius: 6px; /* Rounded corners for the thumb */
  border: 2px solid #333; /* Border to separate thumb from track */
}

::-webkit-scrollbar-track {
  background-color: #222; /* Even darker background for the track */
  width: 12px;
}

::-webkit-scrollbar-corner {
  background-color: #111;
}
