/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 100%);
  min-height: 100vh;
}

/* Header & Navigation */
header {
  background: rgba(10, 10, 26, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.2rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 1.2;
}

.nav-brand a {
  font-size: 0.85rem;
  font-weight: bold;
  color: #6dd5ed;
  text-decoration: none;
  background: linear-gradient(135deg, #6dd5ed, #2193b0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #6dd5ed;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  color: #fff;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #6dd5ed, #2193b0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #ccc;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s;
}

.feature:hover {
  transform: translateY(-5px);
  border-color: #6dd5ed;
}

.feature h3 {
  color: #6dd5ed;
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, #6dd5ed, #2193b0);
  color: #fff;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 20px rgba(109, 213, 237, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #6dd5ed;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #6dd5ed;
}

/* Auth Container */
.auth-container {
  max-width: 900px;
}

.auth-forms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
  margin-top: 2rem;
}

.form-section {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-section h2 {
  color: #6dd5ed;
  margin-bottom: 1.5rem;
}

/* Character Cards */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.character-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s;
}

.character-card:hover {
  transform: translateY(-5px);
  border-color: #6dd5ed;
}

.character-card h3 {
  color: #6dd5ed;
  margin-bottom: 1rem;
}

/* Character Details */
.character-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.character-info,
.character-stats,
.character-equipment {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.character-info h2,
.character-stats h2,
.character-equipment h2 {
  color: #6dd5ed;
  margin-bottom: 1rem;
}

/* Footer */
footer {
  background: rgba(10, 10, 26, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  margin-top: 4rem;
  text-align: center;
  color: #ccc;
}

/* Error Page */
.error-container {
  text-align: center;
  padding: 4rem 2rem;
}

.error-container h1 {
  color: #ff6b6b;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.error-container pre {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 5px;
  text-align: left;
  overflow-x: auto;
  margin: 2rem 0;
}

/* User Actions */
.user-actions,
.auth-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.user-menu {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .auth-forms {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   GLOBAL HEADERLESS LAYOUT ADJUSTMENTS
   ======================================== */

/* Header visibility controlled per-page */
/* Removed global display: none to allow header to show */

/* Remove top padding from all main containers */
body {
  padding-top: 0 !important;
}

main,
.container,
.content,
.page-container {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Full viewport for all pages */
html, body {
  height: 100%;
  overflow-x: hidden;
}

/* Ensure no spacing at top of pages */
body > * {
  margin-top: 0 !important;
}

/* Fix any fixed positioned elements that relied on header height */
.fixed-top-content {
  top: 0 !important;
}

/* Adjust any content that had header offset */
[style*="margin-top"],
[style*="padding-top"] {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
