/* Comic Header Variables */
:root {
  --comic-red: #ff3b30;
  --comic-blue: #007aff;
  --comic-yellow: #ffcc00;
  --comic-green: #34c759;
  --comic-orange: #ff9500;
  --comic-purple: #af52de;
  --comic-black: #000000;
  --comic-white: #ffffff;
  --comic-border: 4px solid var(--comic-black);
  --comic-shadow: 6px 6px 0 rgba(0, 0, 0, 0.8);
  --comic-font: "Bangers", cursive;
  --header-height: 70px;
  --header-height-mobile: 60px;
  --header-padding: 15px 20px;
  --header-padding-mobile: 10px 15px;
}

/* Header Base Styling */
.header-panel {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  padding: 15px 25px;
  margin-bottom: 15px;
  border: var(--comic-border);
  box-shadow: var(--comic-shadow);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Comic-style header */
.header {
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo Styling */
.comic-logo {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
  margin-right: auto;
  position: relative;
}

.comic-logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-image {
  height: 70px; /* Increased from previous size */
  width: auto;
  transition: transform 0.3s ease;
}

/* Increase logo size */
.header-logo img {
  max-height: 60px;
  width: auto;
}

/* Logo Text for Comic Style */
.logo-text {
  font-family: var(--comic-font);
  font-size: 3.2rem; /* Increased from previous size */
  color: var(--comic-blue);
  text-shadow: 2px 0 0 var(--comic-white), -2px 0 0 var(--comic-white),
    0 2px 0 var(--comic-white), 0 -2px 0 var(--comic-white),
    1px 1px var(--comic-white), -1px -1px 0 var(--comic-white),
    1px -1px 0 var(--comic-white), -1px 1px 0 var(--comic-white),
    3px 3px 0 var(--comic-black);
  transform: rotate(-2deg);
}

/* Navigation Menu */
.header-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  margin-right: 20px;
}

.nav-menu a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  padding: 5px 0;
  position: relative;
}

/* User Area & Auth Buttons */
.user-area {
  display: flex;
  align-items: center;
  height: 100%;
}

/* REMOVE ALL PREVIOUS AUTH BUTTON STYLES */
/* Removing styles for .auth-buttons .btn, .btn-register, .btn-login, etc. */

/* NEW AUTH BUTTON STYLES */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-buttons .btn,
.auth-buttons .btn-register,
.auth-buttons .btn-login,
.auth-buttons .btn-profile,
.auth-buttons .btn-logout
.auth-buttons .btn-user {
  display: inline-block;
  padding: 8px 15px;
  margin: 0 4px;
  background-color: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 90px;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-buttons .btn:hover,
.auth-buttons .btn-register:hover,
.auth-buttons .btn-login:hover,
.auth-buttons .btn-profile:hover,
.auth-buttons .btn-logout:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

.auth-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  padding-right: 10px;
}

/* Comic Button Styles */
.comic-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border: 2px solid var(--comic-black);
  border-radius: 8px;
  background-color: #fff;
  color: var(--comic-black);
  font-family: "Bangers", cursive;
  font-size: 1rem;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  overflow: hidden;
  z-index: 1;
}

.comic-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0) 50%,
    rgba(255, 255, 255, 0.3) 100%
  );
  z-index: -1;
}

.comic-button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}

.comic-button i {
  margin-right: 5px;
  font-size: 0.9em;
}

/* Button Variants */
.login-btn {
  background-color: var(--comic-blue);
  color: white;
}

.register-btn {
  background-color: var(--comic-green);
  color: white;
}

/* User Profile Dropdown */
.comic-user-dropdown {
  position: relative;
}

.user-toggle {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--comic-black);
  overflow: hidden;
  position: relative;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.username {
  margin: 0 8px;
  font-weight: bold;
}

/* Container for main content */
.comic-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Comic border effect with zigzag corners */
.header-panel::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: white;
  z-index: -1;
}

/* Remove the textured overlay for pure white background */
.header-panel::after {
  content: none; /* Removing the textured pattern */
}

/* Media Queries for Responsive Design */
@media (max-width: 992px) {
  .comic-button {
    padding: 6px 12px;
    font-size: 0.9rem;
  }

  .logo-image {
    height: 55px; /* Still larger than original but appropriate for mobile */
  }
}

@media (max-width: 768px) {
  .header-panel {
    height: var(--header-height-mobile);
    padding: var(--header-padding-mobile);
  }

  .logo-image {
    height: 40px;
  }

  .comic-button {
    padding: 5px 10px;
    font-size: 0.85rem;
    border-width: 2px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8);
  }

  .comic-button i {
    margin-right: 4px;
  }

  .auth-buttons {
    gap: 8px;
  }

  .user-avatar {
    width: 36px;
    height: 36px;
  }

  .username,
  .icon {
    display: none;
  }

  .auth-buttons .btn,
  .auth-buttons .btn-register,
  .auth-buttons .btn-login {
    padding: 5px 12px;
    font-size: 0.85rem;
  }

  /* Slightly increased logo size for mobile as well, but proportionate */
  .header-logo img {
    max-height: 50px;
  }

  /* Responsive menu */
  .mobile-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu li {
    margin: 0;
  }

  .nav-menu a {
    display: block;
    padding: 10px 20px;
  }
}

@media (max-width: 480px) {
  .logo-image {
    height: 45px;
  }
}

@media (max-width: 360px) {
  .header-panel {
    padding: 8px 12px;
  }

  .logo-image {
    height: 32px;
  }

  .comic-button {
    padding: 4px 6px;
    font-size: 0.75rem;
  }
}
