  /* header */
  /* HEADER STYLING */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #1d263b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 50px;
  border-bottom: 1px solid #24307a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

header .logo {
  font-size: 24px;
  letter-spacing: 3px;
  font-weight: bold;
}

header .header-nav a {
  margin-left: 20px;
  color: #ffffff;
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  transition: color 0.3s;
}

header .header-nav a:hover {
  color: orange;
}

header .header-right button {
  background: transparent;
  border: 1px solid orange;
  color: orange;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

header .header-right button:hover {
  background: orange;
  color: #000;
}

/* Responsive header */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 20px;
  }
  header .header-nav {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  header .header-right {
    margin-top: 10px;
    width: 100%;
  }
}

/* editor */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #1e1e1e;
    color: #fff;
}

/* Main layout */
#mainContainer { display: flex; flex: 1; }

/* Explorer */
#explorer {
    width: 220px;
    background-color: #252526;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
}
#explorer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #333;
}
#explorer-header h3 { margin: 0; font-size: 14px; color: #ccc; }
#newFileBtn { background-color: #0078d7; color: #fff; border: none; padding: 2px 6px; font-size: 12px; cursor: pointer; border-radius: 3px; }

.file-container { display: flex; justify-content: space-between; align-items: center; padding: 5px 10px; cursor: pointer; }
.file-container:hover { background-color: rgba(255,255,255,0.1); }
.file-name { flex: 1; }
.delete-file { color: red; margin-left: 5px; cursor: pointer; font-weight: bold; }
.download-file { color: #0a84ff; margin-left: 5px; cursor: pointer; font-weight: bold; }

/* Editor */
#editorContainer { flex: 1; display: flex; flex-direction: column; }
#tabsBar { display: flex; justify-content: space-between; align-items: center; height: 35px; background-color: #333; border-bottom: 1px solid #555; padding: 0 10px; }
#tabs { display: flex; align-items: center; height: 100%; }
.tab { padding: 5px 15px; cursor: pointer; color: #ccc; }
.tab.active { background-color: #1e1e1e; color: #fff; border-top: 2px solid #0078d7; }
#buttons { display: flex; gap: 5px; }
button { background-color: #0a84ff; color: #fff; border: none; padding: 4px 10px; font-size: 13px; cursor: pointer; border-radius: 3px; }

/* Editor */
#editor { flex: 1; }
.CodeMirror { height: 100%; font-size: 14px; }

/* Terminal */
#terminal { height: 150px; background-color: #1e1e1e; color: #0f0; font-family: monospace; padding: 5px; overflow-y: auto; border-top: 1px solid #555; display: none; white-space: pre-wrap;}

/* Settings panel */
#settingsPanel {
    position: fixed;
    top: 50px;
    right: 10px;
    width: 200px;
    background-color: #333;
    border: 1px solid #555;
    padding: 10px;
    display: none;
    z-index: 100;
}
#settingsPanel h4 { margin-top: 0; color: #fff; }
#settingsPanel label { display: block; margin: 5px 0 2px; color: #ccc; font-size: 12px; }
#settingsPanel input, #settingsPanel select { width: 100%; margin-bottom: 8px; }

/* Error highlight */
.cm-error-line {
    background-color: rgba(255,0,0,0.3);
}

/* footer */

/* Allow page to scroll */
html, body {
    height: 100%;
    overflow-y: auto;
}

/* Main content should fill screen but allow scrolling */
#mainContainer {
    flex: 1;
    min-height: calc(100vh - 80px); /* header height */
}

/* Footer naturally appears at bottom on scroll */
.site-footer {
    margin-top: 100px; /* space before footer */
}


/* ahahera */

.site-footer {
  background: linear-gradient(135deg, #0a0f1f, #0d1b2a);
  color: #cfd8dc;
  padding: 60px 20px 20px;
  font-family: "Segoe UI", Arial, sans-serif;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}

.footer-logo {
  font-size: 26px;
  margin-bottom: 15px;
}

.footer-text {
  font-size: 14px;
  line-height: 1.6;
  color: #b0bec5;
}

.footer-column h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #ffffff;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a,
.footer-column p a {
  color: #b0bec5;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-column ul li a:hover,
.footer-column p a:hover {
  color: orange;
}

.footer-socials {
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-socials a {
  font-size: 14px;
  color: orange;
  text-decoration: none;
  border: 1px solid orange;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.footer-socials a:hover {
  background: rgb(241, 190, 94);
  color: #0a0f1f;
}

/* ===== BOTTOM BAR ===== */
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  font-size: 13px;
  color: #90a4ae;
}

.footer-legal a {
  color: #90a4ae;
  text-decoration: none;
  margin: 0 6px;
}

.footer-legal a:hover {
  color: rgb(236, 186, 93);
}

/* new */
#editorContainer { flex: 1; display: flex; flex-direction: column; }
#editor { flex: 1; }
.CodeMirror { height: 100%; font-size: 14px; }

#mainContainer {
    display: flex;
    flex: 1;
    height: calc(100vh - 75px); /* Subtract header height */
}

#editorContainer { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    min-height: 0; /* allow flex to shrink properly */
}

#editor { 
    flex: 1; 
    min-height: 0; 
}

.CodeMirror { 
    height: 100% !important; /* force editor to fill container */
    font-size: 14px; 
}
header button {
  background: transparent;
  border: 1px solid orange;
  color: orange;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

header button:hover {
  background: orange;
  color: #000;
}