:root {
  --bg-color: #0f0f0f;
  --text-color: #ffffff;
  --accent-color: #00ffff;
}

body.light-mode {
  --bg-color: #f5f5f5;
  --text-color: #000000;
  --accent-color: #0077cc;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Pacifico', cursive;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 18px;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: 10px;
  right: 20px;
  background-color: var(--bg-color);
  color: var(--accent-color);
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 0 5px var(--accent-color);
  z-index: 1001;
}
.theme-toggle input {
  transform: scale(1.2);
  margin-left: 8px;
  cursor: pointer;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #1a1a1a;
  color: var(--accent-color);
  padding: 10px 0;
  text-align: center;
  font-size: 18px;
  box-shadow: 0 2px 10px var(--accent-color);
  z-index: 1000;
}
.navbar a {
  color: var(--accent-color);
  margin: 0 15px;
  text-decoration: none;
}
.navbar a:hover {
  text-shadow: 0 0 8px var(--accent-color);
  color: #ffffff;
}

/* Sidebars */
.links-sidebar {
  position: fixed;
  top: 60px;
  bottom: 0;
  width: 20%;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #0f0f0f;
}
.left-sidebar {
  left: 0;
}
.right-sidebar {
  right: 0;
}
.sidebar-link {
  margin: 12px 0;
  font-size: 20px; /* Larger text */
  font-weight: bold;
  text-align: center;
  word-break: break-word;
  color: var(--accent-color);
  transition: text-shadow 0.3s ease, transform 0.3s ease;
}
.sidebar-link:hover {
  text-shadow: 0 0 10px var(--accent-color);
  transform: scale(1.05); /* Slight zoom on hover */
  color: #ffffff;
}
.sidebar-image {
  width: 100px;
  height: auto;
  margin: 8px 0;
  border-radius: 4px;
  box-shadow: 0 0 3px var(--accent-color);
}
.sidebar-image:hover {
  transform: scale(1.05); /* Slight zoom on hover */
}

/* Main content */
.container {
  margin: 100px auto 40px auto;
  width: 60%;
  margin-left: 22%;
  margin-right: 22%;
  padding: 0 20px;
  text-align: center;
}

/* Glowing heading */
h1 {
  font-size: 48px;
  color: var(--accent-color);
  text-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color);
  margin-bottom: 20px;
  transition: text-shadow 0.3s ease;
}
h2 {
  font-size: 28px;
  color: var(--accent-color);
  text-shadow: 0 0 6px var(--accent-color);
  margin-top: 40px;
}

/* Settings */
.settings select {
  margin: 0 10px;
  padding: 6px;
  border-radius: 4px;
  border: none;
  background-color: #1a1a1a;
  color: var(--accent-color);
  box-shadow: 0 0 5px var(--accent-color);
}
select:hover {
  box-shadow: 0 0 10px var(--accent-color);
  background-color: #222;
}

/* Upload form (horizontal layout) */
.upload-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}
.upload-form {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.form-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background-color: #1a1a1a;
  padding: 8px;
  border-radius: 4px;
  box-shadow: 0 0 5px var(--accent-color);
  color: var(--accent-color);
}
.form-group label {
  margin-bottom: 4px;
}
.upload-form select,
.upload-form input[type="file"],
.upload-form input[type="submit"] {
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  background-color: #1a1a1a;
  color: var(--accent-color);
  box-shadow: 0 0 5px var(--accent-color);
}
.upload-form input[type="submit"]:hover {
  box-shadow: 0 0 10px var(--accent-color);
  background-color: #222;
}

/* Tables */
.table-container {
  display: none;
  margin-top: 20px;
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 20px;
}
table {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 16px;
  background-color: #1a1a1a;
  color: var(--text-color);
  box-shadow: 0 0 10px var(--accent-color);
}
th, td {
  border: 1px solid var(--accent-color);
  padding: 10px;
  text-align: left;
}
table tr:hover {
  background-color: #222;
  box-shadow: inset 0 0 10px var(--accent-color);
}

/* File icons */
td.file-audio::before { content: '🎵 '; }
td.file-image::before { content: '🖼️ '; }
td.file-video::before { content: '🎬 '; }
td.file-pdf::before { content: '📄 '; }
td.file-txt::before { content: '📃 '; }
td.file-zip::before { content: '🗜️ '; }
td.file-default::before { content: '📁 '; }

/* Previews */
img.thumbnail {
  max-width: 100px;
  border-radius: 4px;
}
video.preview {
  max-width: 150px;
}
audio {
  width: 100%;
  max-width: 200px;
  margin-top: 5px;
}

/* Pagination */
.pagination-container {
  margin: 10px 0;
  font-size: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}
.pagination-container a {
  color: var(--accent-color);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  background-color: #1a1a1a;
  box-shadow: 0 0 5px var(--accent-color);
}
.pagination-container a:hover {
  text-shadow: 0 0 8px var(--accent-color);
  background-color: #222;
  color: #ffffff;
}
.hidden-page-link {
  display: none;
}

/* Iframe */
.iframe-container {
  width: 75%;
  height: 600px;
  margin: 40px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #1a1a1a;
}
.iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  background-color: #1a1a1a;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  .container {
    width: 95%;
    margin-left: auto;
    margin-right: auto;
  }
  .links-sidebar {
    position: static;
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    flex-wrap: wrap;
    max-height: none;
  }
  .sidebar-image {
    width: 40px;
    margin: 5px;
  }
  .upload-form {
    flex-direction: column;
    align-items: stretch;
  }
  table {
    font-size: 14px;
  }
}
