* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Cinzel", "Georgia", serif;
  min-height: 100vh;
  background: radial-gradient(
      ellipse at top,
      #1a0a3e 0%,
      #0f051a 50%,
      #000000 100%
    ),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="1" cy="1" r="1" fill="rgba(255,255,255,0.05)"/></svg>');
  padding: 40px 20px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 30%,
      rgba(100, 50, 200, 0.15) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(50, 100, 200, 0.15) 0%,
      transparent 40%
    );
  pointer-events: none;
  animation: nebula 15s ease-in-out infinite;
}

@keyframes nebula {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.7;
  }
}

.scroll-container {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.scroll-frame {
  background: linear-gradient(135deg, #2a4a5a 0%, #1e3a4a 50%, #2a4a5a 100%);
  border: 3px solid;
  border-image: linear-gradient(45deg, #4a7a8a, #5a8a9a, #4a7a8a) 1;
  padding: 8px;
  box-shadow: 0 0 30px rgba(74, 122, 138, 0.6),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
  position: relative;
}

.scroll-frame::before,
.scroll-frame::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid #6a9aaa;
  z-index: 10;
}

.scroll-frame::before {
  top: 15px;
  left: 15px;
  border-right: none;
  border-bottom: none;
}

.scroll-frame::after {
  bottom: 15px;
  right: 15px;
  border-left: none;
  border-top: none;
}

.scroll-inner-frame {
  background: linear-gradient(135deg, #1a2a3a 0%, #0f1a2a 100%);
  border: 2px solid #3a5a6a;
  padding: 6px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7);
}

.scroll-content {
  background: linear-gradient(
    to bottom,
    #f4e4c8 0%,
    #f9f0d8 10%,
    #f9f0d8 90%,
    #f4e4c8 100%
  );
  padding: 50px 60px;
  position: relative;
  box-shadow: inset 0 10px 20px rgba(139, 115, 85, 0.1),
    inset 0 -10px 20px rgba(139, 115, 85, 0.1);
}

.scroll-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(139, 115, 85, 0.02) 2px,
    rgba(139, 115, 85, 0.02) 4px
  );
  pointer-events: none;
}

.ornamental-border {
  position: absolute;
  top: 30px;
  left: 30px;
  right: 30px;
  bottom: 30px;
  pointer-events: none;
}

.home-link {
  display: inline-block;
  color: #8b6914;
  text-decoration: none;
  font-size: 0.95em;
  letter-spacing: 1px;
  margin-bottom: 20px;
  transition: color 0.3s ease;
}

.home-link:hover {
  color: #3d2817;
  text-decoration: underline;
}

.ornamental-border::before,
.ornamental-border::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(139, 115, 85, 0.3) 0%,
    rgba(139, 115, 85, 0.3) 48%,
    transparent 48%,
    transparent 52%,
    rgba(139, 115, 85, 0.3) 52%,
    rgba(139, 115, 85, 0.3) 100%
  );
}

.ornamental-border::before {
  top: 0;
}

.ornamental-border::after {
  bottom: 0;
}

.ornamental-star-top,
.ornamental-star-bottom {
  position: absolute;
  color: rgba(139, 115, 85, 0.5);
  font-size: 16px;
  left: 50%;
  line-height: 1;
}

.ornamental-star-top {
  top: 0;
  transform: translate(-50%, -50%);
}

.ornamental-star-bottom {
  bottom: 0;
  transform: translate(-50%, 50%);
}

h1 {
  text-align: center;
  color: #3d2817;
  font-size: 3em;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 4px;
  font-weight: bold;
  position: relative;
}

.logged-in-user {
  position: fixed;
  bottom: 20px;
  right: 20px;
  color: #3d2817;
  font-size: 0.95em;
  z-index: 1000;
  background: rgba(244, 228, 200, 0.95);
  padding: 8px 16px;
  border: 2px solid #8b7355;
  border-radius: 4px;
}

.logged-in-user strong {
  color: #8b6914;
}

a {
  text-decoration: underline;
  color: #8b6914;
}

h2.subtitle {
  text-align: center;
  color: #8b6914;
  font-size: 1.6em;
  margin-bottom: 20px;
  font-style: italic;
  font-weight: normal;
  letter-spacing: 2px;
}

.section {
  margin-bottom: 20px;
  position: relative;
}

.section-title {
  color: #3d2817;
  font-size: 1.8em;
  margin-top: 20px;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(139, 115, 85, 0.5);
  text-align: center;
  letter-spacing: 2px;
}

.centered {
  display: flex;
  justify-content: center;
  align-items: center;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid #b8976a;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.stat-number {
  font-size: 2.5em;
  font-weight: bold;
  color: #8b6914;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.stat-label {
  color: #5d4a2e;
  margin-top: 8px;
  font-size: 1.1em;
  letter-spacing: 1px;
}

.member-list {
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid #b8976a;
  padding: 20px;
}

.member-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 15px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid #c9b896;
}

.member-item:last-of-type {
  margin-bottom: 0;
}

.member-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.member-name {
  font-weight: bold;
  color: #3d2817;
  font-size: 1.2em;
}

.member-rank {
  color: #8b6914;
  font-style: italic;
  font-size: 0.95em;
  margin-top: 2px;
}

.member-actions {
  display: flex;
  gap: 10px;
}

select {
  padding: 8px 14px;
  border: 2px solid #8b7355;
  background: rgba(255, 255, 255, 0.7);
  color: #3d2817;
  font-family: inherit;
  cursor: pointer;
  font-size: 0.95em;
}

button {
  padding: 12px 20px;
  border: 2px solid #8b7355;
  background: #b8976a;
  color: #3d2817;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9em;
  white-space: nowrap;
  height: 48px;
}

input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #8b7355;
  background: rgba(255, 255, 255, 0.8);
  color: #3d2817;
  font-family: inherit;
  font-size: 1em;
  height: 48px;
}

input[type="text"]:focus {
  outline: none;
  border-color: #6b5a45;
}

.add-member-form {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.add-member-form input {
  flex: 1;
}

.scroll-footer {
  text-align: center;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 2px solid rgba(139, 115, 85, 0.3);
  position: relative;
}

.scroll-footer a {
  color: #8b6914;
  text-decoration: none;
  font-size: 0.95em;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.scroll-footer a:hover {
  color: #3d2817;
  text-decoration: underline;
}

.scroll-footer a:not(:last-child)::after {
  content: "•";
  margin: 0 12px;
  color: rgba(139, 115, 85, 0.5);
  text-decoration: none;
  display: inline-block;
}
