/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: Arial, sans-serif;
  background-color: #f9f9f9;
  display: flex;
}

/* Sidebar styles */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 200px; /* updated from 250px */
  height: 100%;
  background-color: #333; /* updated from #ccc */
  color: white;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Title box inside sidebar */
.title-box {
  background-color: #bbb;
  width: 90%;
  padding: 20px;
  text-align: center;
  border-radius: 8px;
  margin-bottom: 40px;
}

.title-box h1 {
  font-size: 24px;
  font-weight: bold;
  color: #222;
  margin-bottom: 5px;
}

.title-box h2 {
  font-size: 18px;
  color: #444;
}

/* Navigation links */
.sidebar nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 20px; /* from new styles */
}

.sidebar nav a {
  color: white; /* updated from #333 */
  text-decoration: none;
  margin: 10px 0; /* updated from padding/margin combo */
}

.sidebar nav a:hover {
  text-decoration: underline; /* updated hover effect */
}

/* Main content styles */
.main-content {
  margin-left: 250px; /* updated from 250px */
  margin-top: 10px;   /* added from new styles */
  padding: 20px;      /* updated from 40px */
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  text-align: center;
}

/* Content area wrapper (new) */
.content-area {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 10px;
}

/* Tables */
table {
  width: 100%;
  max-width: 800px;
  border-collapse: collapse;
  margin-top: 20px;
}

th, td {
  padding: 12px; /* updated from 10px */
  border-bottom: 1px solid #ccc; /* replaces full border */
  text-align: left; /* added */
}

th {
  background-color: #f5f5f5;
}

/* Input fields */
input[type="text"] {
  padding: 10px;
  width: 100%;
  margin-bottom: 20px;
  border: 1px solid #ccc;
}

/* Tag input section */
.tag-input {
  margin-top: 5px;
  display: flex;
  gap: 5px;
}

.tag-input input {
  flex: 1;
  padding: 6px;
}

.tag-input button {
  padding: 6px 10px;
  background-color: #5c85d6;
  color: white;
  border: none;
  cursor: pointer;
}

.sidebar {
  width: 250px;
  background-color: #2c3e50;
  height: 100vh;
  color: white;
  padding: 20px;
  position: fixed;
}

.title-box h1, .title-box h2 {
  margin: 0;
}

.sidebar nav a {
  display: block;
  padding: 10px;
  margin: 5px 0;
  color: white;
  text-decoration: none;
}

.sidebar nav a:hover {
  background-color: #34495e;
}

.button-link {
  display: block;
  padding: 10px;
  margin: 5px 0;
  color: white;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
}

.button-link:hover {
  background-color: #34495e;
}

.button-container {
  margin-top: 20px;
  border-top: 1px solid #4a5a6a;
  padding-top: 10px;
}

/* ========== MODAL STYLES ========== */

/* Modal Container */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  display: none;
  /* Flex centered alignment */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modal Content Box */
.modal-content {
  background: #fff;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  position: relative;
}


.modal-content h2,
.modal-content h3,
.modal-content h4 {
  margin-top: 0;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

#notesInput,
#newLinkInput,
.modal-content textarea,
.modal-content input[type="text"] {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.modal-content button {
  padding: 8px 12px;
  background-color: #5c85d6;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.modal-content button:hover {
  background-color: #466bb7;
}

#linkList {
  list-style-type: disc;
  padding-left: 20px;
  margin-bottom: 10px;
}

#linkList li a {
  color: #2a5db0;
  text-decoration: underline;
}

