body {
  margin: 0;
  font-family: "Segoe UI", Roboto, sans-serif;
  background-color: #121212;
  color: #f1f1f1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main, main h2, main p {
  flex: 1;
  padding: 0.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column; 
  align-items: center; 
  justify-content: flex-start;
  gap: 2rem; 
}

header, footer {
  background-color: #1f1f1f;
  color: #f1f1f1;
}

header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between; 
  padding: 1rem 2rem;
  background-color: #1f1f1f;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  z-index: 900;
}

header h1 a {
  color: inherit;          
  text-decoration: none;   
  cursor: pointer;         
  transition: color 0.3s ease; 
}

header h1 a:hover {
  color: #3a8ef6; /
}


nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 901; 
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
nav a.logout-button {
  background-color: #ff4c4c;
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}
nav a.logout-button:hover {
  background-color: #e04343;
}

nav a.toggle {
  color: #ddd;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

nav a.toggle:hover {
  background-color: #333;
  color: #fff;
}
main {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

button {
  background-color: #3a8ef6;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  background-color: #2d6ed6;
}

input, select, textarea {
  width: 100%;
  padding: 0.5rem;
  margin: 0.3rem 0 1rem 0;
  background-color: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  color: #f1f1f1;
}

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  margin-top: auto;
  color: #aaa;
}


@media (max-width:700px){
  nav ul { flex-direction:column; gap:0.5rem; margin-right:0; }
  main { padding:1rem; }
}

form[action="logout.php"] {
  margin: 0;
  padding: 0;
}

form[action="logout.php"] button {
  position: fixed;
  top: 1rem;
  right: 1rem;
  min-width: 100px;
  background-color: #3a8ef6;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  z-index: 1001; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: background-color 0.3s ease;
}

form[action="logout.php"] button:hover {
  background-color: #2d6ed6;
}

.admin-badge {
  position: absolute;
  top: 50%;               
  left: 50%;              
  transform: translate(-50%, -50%);
  color: #ff4c4c;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid #ff4c4c;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background-color: rgba(255,76,76,0.1);
  z-index: 950;
  text-align: center;
  pointer-events: none;   
}

body {
    position: relative; 
}

body .side-left {
    position: absolute;
    top: 50%;         
    left: 20px;         
    transform: translateY(-50%);
    width: 150px;    
    height: auto;
    z-index: 50;     
}

body .side-right {
    position: absolute;
    top: 50%;         
    right: 20px;        
    transform: translateY(-50%);
    width: 150px;    
    height: auto;
    z-index: 50;     
}

/* Admin table styles for clearer admin pages */
.admin-table {
  width: 100%;
  max-width: 1100px;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem 0;
  background-color: #1a1a1a;
  color: #f1f1f1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.admin-table th, .admin-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #2b2b2b;
  text-align: left;
}
.admin-table thead th {
  background: linear-gradient(180deg,#232323,#1b1b1b);
  font-weight: 600;
}
.admin-table tbody tr:nth-child(even) {
  background-color: rgba(255,255,255,0.02);
}
.admin-table tbody tr:hover {
  background-color: rgba(58,142,246,0.06);
}
.box { background-color: #151515; padding: 1rem; border-radius: 8px; width:100%; }
