/* ===== UNIFIED SIDEBAR STYLES ===== */

.menu-icon {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  font-size: 20px;
  color: #ff8c00;
  background: #1a1a1a;
  border: 3px solid #ff4500;
  cursor: pointer;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 4px 4px 0 #000;
  font-family: 'Press Start 2P', monospace;
}

.menu-icon:hover {
  background-color: #ff8c00;
  color: #000;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
}

.menu-icon::before {
  content: "MENU";
  position: absolute;
  top: -25px;
  font-size: 0.6rem;
  color: #00ff00;
  opacity: 0;
  transition: opacity 0.3s;
}

.menu-icon:hover::before {
  opacity: 1;
}

.sidebar {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 102%;
  background-color: #222;
  background-image: 
    linear-gradient(90deg, rgba(255, 140, 0, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(255, 140, 0, 0.1) 1px, transparent 1px);
  background-size: 10px 10px;
  color: #ffa500;
  border-left: 4px solid #ff4500;
  transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1001;
  overflow-y: auto;
  box-shadow: -8px 0 20px rgba(0, 0, 0, 0.5);
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateY(-5deg);
}

.sidebar.active {
  right: 0;
  transform: perspective(1000px) rotateY(0deg);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 3px solid #ff4500;
  background-color: rgba(0, 0, 0, 0.8);
}

.sidebar-header h2 {
  font-size: 1rem;
  color: #ffd700;
  text-shadow: 2px 2px 0 #000;
  margin: 0;
}

.sidebar-close {
  background: #1a1a1a;
  border: 3px solid #ff4500;
  color: #ffa500;
  width: 30px;
  height: 30px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 2px 2px 0 #000;
}

.sidebar-close:hover {
  background-color: #ff8c00;
  color: #000;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 #000;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 10px;
}

.sidebar-link {
  color: #ffa500;
  text-decoration: none;
  padding: 12px 15px;
  border: 3px solid transparent;
  border-left: 4px solid #ff8c00;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 15px;
  background-color: rgba(0, 0, 0, 0.6);
  position: relative;
  font-size: 0.8rem;
  text-transform: uppercase;
  cursor: pointer;
}

.sidebar-link:hover,
.sidebar-link:focus {
  background-color: rgba(255, 140, 0, 0.2);
  border-color: #ffd700;
  padding-left: 25px;
  transform: translateX(5px);
}

.sidebar-link::before {
  content: ">";
  color: #00ff00;
  position: absolute;
  left: 8px;
  opacity: 0;
  transition: opacity 0.3s;
}

.sidebar-link:hover::before {
  opacity: 1;
}

.auth-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #ff4500;
}

.user-info {
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.8);
  border: 2px solid #ff8c00;
  margin-bottom: 10px;
  font-size: 0.7rem;
}

.auth-link {
  background-color: rgba(255, 140, 0, 0.3) !important;
  border-color: #ffd700 !important;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5px;
  text-align: center;
  font-size: 0.7rem;
  background-color: rgba(0, 0, 0, 0.9);
  border-top: 3px solid #ff4500;
  color: #888;
  line-height: 1;
}

.loading-pixel {
  width: 16px;
  height: 16px;
  background-color: #ff8c00;
  animation: loadingPixel 1.5s infinite;
  margin: 10px auto;
}

@keyframes loadingPixel {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.8); }
}

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

.auth-modal {
  display: none;
  position: fixed;
  z-index: 1003;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

.auth-modal-content {
  background-color: #111;
  border: 4px solid #ff4500;
  box-shadow: 8px 8px 0 #000;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  position: relative;
  font-family: 'Press Start 2P', cursive;
}

.auth-close {
  color: #ffa500;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 20px;
}

.auth-close:hover {
  color: #ff4500;
}

.auth-form h2 {
  color: #ffd700;
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.auth-form input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  background: #222;
  border: 2px solid #ff8c00;
  color: #ffa500;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  box-sizing: border-box;
}

.auth-form input:focus {
  outline: none;
  border-color: #ffd700;
}

.auth-btn, .google-btn {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  background-color: #ffa500;
  border: 3px solid #000;
  color: #000;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
  transition: all 0.2s;
}

.auth-btn:hover, .google-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #000;
}

.google-btn {
  background-color: #fff;
  color: #444;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-switch {
  text-align: center;
  margin-top: 15px;
  font-size: 0.6rem;
  color: #888;
}

.auth-switch a {
  color: #ffa500;
  cursor: pointer;
  text-decoration: underline;
}

.auth-switch a:hover {
  color: #ffd700;
}

/* Responsive sidebar */
@media (max-width: 768px) {
  .sidebar {
    width: 250px;
    right: -250px;
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 100%;
    right: -100%;
  }
  
  .auth-modal-content {
    width: 95%;
    padding: 20px;
  }
}
