/* Base layout */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: white;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: url('https://images.unsplash.com/photo-1542273917363-3b1817f69a2d?auto=format&fit=crop&w=1950&q=80') no-repeat center center/cover;
  position: relative;
}

/* Background overlay */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

/* Top IP bar */
#ip-info {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px 0;
  background: rgba(0, 0, 0, 0.75);
  color: #fffacd;
  font-size: 1em;
  text-align: center;
  z-index: 999;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

#ip-info img.flag {
  vertical-align: middle;
  margin-right: 8px;
  height: 12px;
  width: 16px;
  border-radius: 2px;
  box-shadow: 0 0 2px #000;
}

/* Toggle button for sidebar */
.sidebar-toggle {
  position: fixed;
  top: 50px; /* just below IP bar */
  left: 10px;
  z-index: 998;
  background-color: #222;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.sidebar-toggle:hover {
  background-color: #444;
}

/* Sidebar styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 50px 15px 20px 15px; /* ← increased top padding */
  color: #fff;
  height: calc(100% - 50px); /* avoid overlapping IP bar */
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.4);
  z-index: 997;
  backdrop-filter: blur(6px);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

/* Sidebar content */
.sidebar h2 {
  font-size: 1.1em;
  margin-bottom: 12px;
  color: #ffcc00;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
}

.sidebar ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.sidebar li {
  margin: 10px 0;
}

.sidebar a {
  text-decoration: none;
  color: #ddd;
  font-size: 0.95em;
  transition: color 0.3s ease;
}

.sidebar a:hover {
  color: #00c9a7;
}

/* Main content layout */
main.page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 20px 40px; /* top padding accounts for IP bar */
  text-align: center;
  z-index: 1;
}

/* Text styles */
h1 {
  font-size: 2em;
  margin: 0;
  color: #ffcc00;
  z-index: 1;
}

p {
  font-size: 1.2em;
  margin-top: 10px;
  z-index: 1;
}

/* Spinner */
.spinner {
  margin-top: 30px;
  border: 8px solid rgba(255,255,255,0.2);
  border-top: 8px solid #ffcc00;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  z-index: 1;
}

@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

/* Footer that sticks to bottom */
footer {
  text-align: center;
  color: #ccc;
  font-size: 0.5em;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.4);
}
