/* General body styling */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #EDE7F6; /* Light lilac page background */
}

/* Header styling */
header {
  background-color: #7B1FA2;  /* Theme header color */
  color: #fff;
  padding: 1rem;
}

/* Navigation buttons */
.nav-buttons {
  list-style: none;
  display: flex;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

.nav-button {
  background-color: #7B1FA2;
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 20px;
  transition: background-color 0.2s ease-in-out;
}

.nav-button:hover {
  background-color: #6A1B9A;
}

@media (max-width: 768px) {
  /* Stack the nav buttons vertically */
  .nav-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  /* Adjust the nav button spacing and padding for smaller screens */
  .nav-button {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem; /* adds spacing between buttons */
    width: 90%; /* makes buttons more touch friendly */
    text-align: center;
  }
}

@media (max-width: 900px), (pointer: coarse) {
  #end-portal-video {
    display: none !important;
  }
  body.minecraft-mods {
    background: url('/images/backgrounds/end_portal_fallback.png') center center / cover no-repeat !important;
  }
}

/* Main content */
main {
  padding: 2rem;
}

/* Footer styling */
footer {
  background-color: #BA68C8; /* More discernable footer color */
  color: #fff;
  text-align: center;
  padding: 1rem;
}

/* Graph section styling */
#graph-section {
  background-color: #2e2e2e; /* Dark background for the graph section */
  padding: 2rem;
  border-radius: 12px;
  border: 2px solid #BA68C8;
  margin-bottom: 2rem;
}

#graph-section h2 {
  color: #fff;
  text-align: center;
  margin-bottom: 1rem;
}

/* Graph container styling */
#mynetwork {
  width: 100%;
  height: 80vh;
  border: 1px solid lightgray;
  background-color: #2e2e2e; /* Dark background for the graph */
}

/* Contact form container (for contact page) */
.contact-form-container {
  max-width: 600px;
  margin: 2rem auto;
  background-color: #F3E5F5;
  padding: 2rem;
  border-radius: 12px;
  border: 2px solid #BA68C8;
}

/* Form actions container */
.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* Send and Home button styling (for contact page) */
.send-button,
.home-button {
  background-color: #7B1FA2;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.send-button:hover,
.home-button:hover {
  background-color: #6A1B9A;
}

/* Form group styling */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #4A148C;
}

.name-row {
  display: flex;
  gap: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #7B1FA2;
  border-radius: 20px;
  outline: none;
  font-size: 1rem;
  box-sizing: border-box;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

/* Invite link styling */
.invite-link {
  color: #7B1FA2;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
  transition: color 0.2s ease-in-out;
}

.invite-link:hover {
  color: #6A1B9A;
}

/* Social button (if still used elsewhere) remains as defined earlier */
.social-button {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background-color: #EDE7F6;
  border: 2px solid #EDE7F6;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem;
}

.discord-logo {
  width: 24px;
  height: 24px;
  color: #7B1FA2;       /* Set the element's color so currentColor becomes #7B1FA2 */
  fill: currentColor;   /* Ensures the path uses the computed color */
  transition: fill 0.2s ease-in-out;
}

.social-button:hover .discord-logo {
  color: #6A1B9A;       /* Change the color on hover */
  fill: currentColor;
}  

/* Dropdown Section Styling */
.dropdown-section {
  margin-bottom: 2rem;
  border: 2px solid #BA68C8;
  border-radius: 12px;
  background-color: #F3E5F5;
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.section-link {
  font-size: 1.25rem;
  color: #7B1FA2;
  text-decoration: none;
  font-weight: bold;
}

.dropdown-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #7B1FA2;
  transform: rotate(90deg);
  transition: transform 0.3s ease;
}

.dropdown-toggle.rotated {
  transform: rotate(0deg);
}

.dropdown-content {
  display: none;
  padding: 1rem;
  border-top: 1px solid #BA68C8;
}

.dropdown-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.resizable-container {
  width: 100%;
  min-height: 300px;  /* initial minimum height */
  height: 300px;      /* start at 300px */
  position: relative;
  overflow: hidden;
  border: 1px solid #BA68C8; /* optional visual cue */
}

/* Make the iframe fill the container */
.resizable-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Style the custom drag handle */
.drag-handle {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10px;       /* Adjust as needed */
  background-color: #7B1FA2;  /* Change to a visible color */
  cursor: ns-resize;
  z-index: 10;        /* Ensure it sits on top */
  border-radius: 8px; /* Round all corners */
  transition: background-color 0.2s ease;
}  

.drag-handle:hover {
  background-color: #6A1B9A;
}

.no-select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
  width: 12px; /* Width of the scrollbar */
}

::-webkit-scrollbar-track {
  background: #EDE7F6; /* Background of the scrollbar track */
}

::-webkit-scrollbar-thumb {
  background-color: #7B1FA2; /* Color of the scrollbar thumb */
  border-radius: 6px; /* Roundness of the scrollbar thumb */
  border: 3px solid #EDE7F6; /* Padding around the scrollbar thumb */
}

::-webkit-scrollbar-thumb:hover {
  background-color: #6A1B9A; /* Color of the scrollbar thumb on hover */
}

/* Apply the same styling to the iframe's scrollbar */
.resizable-container iframe::-webkit-scrollbar {
  width: 12px;
}

.resizable-container iframe::-webkit-scrollbar-track {
  background: #EDE7F6;
}

.resizable-container iframe::-webkit-scrollbar-thumb {
  background-color: #7B1FA2;
  border-radius: 6px;
  border: 3px solid #EDE7F6;
}

.resizable-container iframe::-webkit-scrollbar-thumb:hover {
  background-color: #6A1B9A;
}

/* Custom alert box styling */
.alert-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #F3E5F5;
  border: 2px solid #BA68C8;
  border-radius: 12px;
  padding: 1rem;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.alert-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.close-alert-button {
  background-color: #7B1FA2;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: background-color 0.2s ease-in-out;
}

.close-alert-button:hover {
  background-color: #6A1B9A;
}

.settings-panel {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 300px;
  height: auto;
  background-color: #2e2e2e;
  border: 1px solid #BA68C8;
  transition: transform 0.3s ease;
  padding: 1rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  border-radius: 12px;
  transform: translateY(0); /* Open downwards */
  z-index: 1001;
  display: none;
}

.settings-panel.open {
  display: block;
}

.settings-panel h3 {
  color: #fff;
  margin-bottom: 1rem;
}

.settings-panel .section {
  margin-bottom: 2rem;
}

.settings-panel .section h4 {
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.settings-panel .section h4::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #5b5b5b; /* Arrow color */
  margin-right: 0.5rem;
  transition: transform 0.3s ease;
}

.settings-panel .section.collapsed h4::before {
  transform: rotate(-90deg);
}

.settings-panel .section .slider-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
}

.settings-panel .section.collapsed .slider-container {
  display: none;
}

.settings-panel .section .slider-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
}

.settings-panel .section .slider-container label {
  color: #fff;
  margin-bottom: 0.5rem;
}

.settings-panel .section .slider-container input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 2px;
  background: #d3d3d3;
  outline: none;
  opacity: 0.7;
  transition: opacity .2s;
}

.settings-panel .section .slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  background: #ffffff; /* Dot color */
  cursor: pointer;
  border-radius: 50%;
}

.settings-panel .section .slider-container input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  background: #ffffff; /* Dot color */
  cursor: pointer;
  border-radius: 50%;
}

.settings-panel .section-divider {
  border-top: 1px solid #363636;
  margin: 1rem 0;
  width: 100%; /* Take up the whole width of the settings panel */
}

.gear-icon, .close-icon, .reset-icon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 24px;
  height: 24px;
  cursor: pointer;
  z-index: 1002; /* Ensure icons are above the canvas */
  fill: currentColor;
}

.close-icon {
  width: 24px; /* Make the close icon smaller */
  height: 24px; /* Make the close icon smaller */
  display: none;
  top: 1.5rem; /* Shift down */
  right: 1.25rem; /* Shift to the left */
}

.reset-icon {
  width: 24px; /* Make the reset icon smaller */
  height: 24px; /* Make the reset icon smaller */
  display: none;
  top: 1.5rem; /* Shift down */
  right: 3.5rem; /* Shift to the left */
}

.settings-panel.open + .close-icon {
  display: block;
}

.settings-panel.open + .reset-icon {
  display: block;
}

.gear-icon {
  display: block; /* Show by default */
}

.close-icon, .reset-icon {
  display: none; /* Hide by default */
}

.slider-tooltip {
  position: absolute;
  background: #000;
  color: #fff;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 12px;
  transform: translate(-50%, 0); /* Center the tooltip horizontally and move it above the slider */
  white-space: nowrap;
  display: none;
  left: 50%; /* Center the tooltip horizontally */
}

.slider-tooltip::after {
  content: '';
  position: absolute;
  top: 100%; /* Position the tail below the tooltip */
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #000 transparent transparent transparent; /* Create a pointed tail */
}

.slider-container:hover .slider-tooltip {
  display: block;
}

.resizable-console {
  position: relative;
  width: 100%;
  min-height: 300px;
  height: 300px;
  overflow: hidden;
  border: 1px solid #BA68C8;
  border-radius: 8px;
}

#console {
  background: #1e1e1e;
  color: #fff;
  padding: 1rem 1rem 2rem 1rem; /* extra bottom padding added */
  height: 100%;
  overflow-y: scroll;
  border-radius: 8px;
  font-family: Consolas, monospace;
  white-space: pre-wrap;
  box-sizing: border-box;
}


.resizable-console .drag-handle {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 10px;              /* Adjust as needed */
  background-color: #7B1FA2;   /* Base theme color */
  cursor: ns-resize;
  border-radius: 8px;          /* Fully rounded edges */
  transition: background-color 0.2s ease;
  z-index: 10;
}

.resizable-console .drag-handle:hover {
  background-color: #6A1B9A;   /* Hover color */
}

/* Only for the Minecraft Mods page */
body.minecraft-mods {
  position: relative; /* establish a stacking context */
  overflow-x: hidden;   /* allow vertical scrolling */
  font-family: 'Mojangles', Arial, sans-serif;
  cursor: url('/images/cursors/pixelated_cursor.cur') 8 8, auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-shadow:
     1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000,
    -1px  0px 0 #000,
     1px  0px 0 #000,
     0px -1px 0 #000,
     0px  1px 0 #000;
}

body.minecraft-mods a,
body.minecraft-mods button {
  cursor: url('/images/cursors/pixelated_pointer.cur') 8 8, pointer;
}

/* Fullscreen video background */
#end-portal-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 1.0; /* Optional: change for visibility */
  pointer-events: none; /* Prevent interaction */
}

body.minecraft-mods .dropdown-section {
  margin: 0 0 2rem 0;
  padding: 0;
  background: none !important;
  border-radius: 0;
  border: none !important; /* Remove purple border */
}

body.minecraft-mods .dropdown-header {
  background: url('/images/backgrounds/grass_block_side.png') repeat-x !important;
  background-size: auto 62px !important;
  image-rendering: pixelated !important;
  border-radius: 0;
  padding: 1rem;
}

body.minecraft-mods .dropdown-content {
  background: url('/images/backgrounds/dirt.png') repeat !important;
  background-size: auto 62px !important;
  image-rendering: pixelated !important;
  border-radius: 0;
  padding: 1rem;
  border-top: none !important;
}

body.minecraft-mods main {
  background: transparent;
  flex: 1 0 auto;
}

body.minecraft-mods footer {
  background: url('/images/backgrounds/bedrock.png') repeat;
  background-size: auto 100%;
  image-rendering: pixelated;
  color: #fff;
  text-align: center;
  padding: 1rem;
  border-top: 2px solid #222;
  flex-shrink: 0;
}

/* Custom arrow for minecraft-mods.html only */
body.minecraft-mods .custom-arrow {
  background: url("images/icons/arrow.png") no-repeat center;
  background-size: 30px 30px; /* Bigger arrow */
  width: 30px;
  height: 30px;
  border: none;
  cursor: url('/images/cursors/pixelated_pointer.cur') 8 8, pointer;
  transform: rotate(-135deg);
  transition: transform 0.3s ease;
  image-rendering: pixelated; /* Hard edge scaling */
}

/* When expanded (rotated more) */
body.minecraft-mods .custom-arrow.rotated {
  transform: rotate(-225deg); /* -135 - 90 = -225 */
}

body.minecraft-mods .dropdown-header {
  background: url('/images/backgrounds/grass_block_side.png') repeat-x !important;
  background-size: auto 72px !important;
  image-rendering: pixelated !important;
}

body.minecraft-mods .dropdown-content {
  background: url('/images/backgrounds/dirt.png') repeat !important;
  background-size: auto 72px !important;
  image-rendering: pixelated !important;
}

body.minecraft-mods .dropdown-header,
body.minecraft-mods .dropdown-header a,
body.minecraft-mods .dropdown-content {
  color: #fff !important; /* Use white text for readability */
  text-shadow: 1px #000; /* Optional: add shadow for contrast */
}

body.minecraft-mods .dropdown-header,
body.minecraft-mods .dropdown-content {
  width: 100%;
  box-sizing: border-box;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Font face for Minecraft Mods */
@font-face {
  font-family: 'Mojangles';
  src: url('/fonts/mojangles.ttf') format('truetype');
  font-display: swap;
}

/* Dashboard authentication button styling */
#dashboard-auth button {
  background-color: #7B1FA2;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  margin: 1rem 0;
}

#dashboard-auth button:hover {
  background-color: #6A1B9A;
}
