/* index/index.css */

/* Global reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body styles */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

/* Header sticky and flex */
header {
  position: sticky;
  top: 0;
  background: #D32F2F; /* Red Theme */
  color: white;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

/* Hamburger menu */
.menu-btn {
  width: 28px;
  cursor: pointer;
}

.menu-btn div {
  height: 3px;
  background: white;
  margin: 5px 0;
}

/* Sections */
section {
  min-height: 100vh;
  padding: 40px 16px;
}

/* Menu container */
#menu {
  position: fixed;
  top: 60px;
  right: -220px;
  width: 200px;
  background: #D32F2F; /* Red Theme */
  color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: right 0.3s;
  padding: 20px;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#menu button {
  background: none;
  color: white;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 16px;
}

/* -----------------------------------------------------------
   SHARED FORM STYLING (Auth & Create Server)
----------------------------------------------------------- */
input, select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

input:focus, select:focus {
  outline: 2px solid #D32F2F; /* Red Focus */
  border-color: #D32F2F;
}

/* -----------------------------------------------------------
   AUTH MODAL / POP-UP STYLING
----------------------------------------------------------- */

/* When the Auth Section becomes a Modal */
#auth.modal-mode {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* Dark Overlay */
  z-index: 9999;
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* The White Box inside the Modal */
#auth.modal-mode #authContentWrapper {
  background: white;
  width: 100%;
  max-width: 500px;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  position: relative;
  max-height: 90vh; /* Prevent it from being taller than screen */
  overflow-y: auto; /* Make it scrollable internally */
}

/* Close Button (Hidden by default, shown in modal mode) */
.close-modal-btn {
  display: none;
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  z-index: 10;
}

#auth.modal-mode .close-modal-btn {
  display: block;
}

/* -----------------------------------------------------------
   BUTTONS & ACTION ROWS (Updated for Side-by-Side)
----------------------------------------------------------- */

/* Container to hold buttons side-by-side */
.auth-action-row {
  display: flex;
  gap: 15px; /* Space between buttons */
  justify-content: space-between;
  width: 100%;
  margin-top: 15px;
}

/* Choice Buttons */
.choice-btn {
  /* flex: 1 makes them share the width equally */
  flex: 1; 
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
}

/* If a button is alone (like Submit), allow it to be full width */
.choice-btn.full-width {
  width: 100%;
  flex: none;
}

.choice-btn.primary {
  background-color: #D32F2F; /* Red Theme */
  color: white;
}

.choice-btn.secondary {
  background-color: #f0f0f0;
  color: #333;
  border: 1px solid #ccc;
}


.auth-text-link {
  display: inline-block;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #D32F2F;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

.auth-text-link:focus {
  outline: 2px solid #D32F2F;
  outline-offset: 3px;
}
