@import url('https://fonts.googleapis.com/css2?family=Aboreto&display=swap');

/* -------------------- Base & Body -------------------- */
html, body {
  margin: 0;
  padding: 80px 0 0 0; /* leave space for fixed navbar */
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(135deg, #2a1a5f, #3b0c5a, #6B46C1);
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  font-family: 'Aboreto', Calibri, Arial, sans-serif;
  color: #fff;
  text-align: center;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('/images/soft-stars.png') repeat;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

/* -------------------- Navbar -------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  transition: background 0.3s ease;
  z-index: 2000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  box-sizing: border-box;
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.85);
}

.navbar * {
  box-sizing: border-box;
}

.navbar-logo img {
  height: 40px;
  width: auto;
  flex-shrink: 0;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 25px;
  flex-wrap: wrap;
  justify-content: flex-end;
  overflow: hidden;
}

.nav-list li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-list li a:hover {
  color: #D4B3FF;
  transform: translateY(-2px);
}

/* Mobile navbar */
@media (max-width: 750px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: 10px 20px;
  }

  .nav-list {
    width: 100%;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
  }

  .nav-list li a {
    font-size: 0.9rem;
  }
}

/* -------------------- Container & Sections -------------------- */
.container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  position: relative;
  z-index: 1;
}

.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.home-logo {
  width: 350px;
  height: 350px;
  object-fit: contain;
  margin-bottom: 30px;
  animation: float 3s ease-in-out infinite;
  z-index: 2;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

h1 {
  font-family: 'Aboreto', cursive;
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: 0.5rem;
  color: #E0CFFF;
  text-shadow: 0 0 8px rgba(255,255,255,0.4);
}

h2 {
  font-family: 'Aboreto', cursive;
  font-size: clamp(1.2rem, 3vw, 2rem);
  margin-bottom: 1rem;
  font-weight: normal;
  color: #D4B3FF;
  text-shadow: 0 0 4px rgba(255,255,255,0.2);
}

.hero-subtext {
  font-size: 1.25rem;
  line-height: 1.8;
  color: #EDE9FE;
  max-width: 600px;
  margin: 0 auto 30px auto;
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

button {
  padding: 14px 28px;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

button.primary {
  background: linear-gradient(135deg, #6B46C1, #805AD5);
  color: #fff;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(107,70,193,0.4);
}

button.primary:hover {
  background: linear-gradient(135deg, #805AD5, #6B46C1);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(107,70,193,0.6);
}

button.secondary {
  background-color: transparent;
  border: 2px solid #6B46C1;
  color: #6B46C1;
}

button.secondary:hover {
  background-color: #6B46C1;
  color: #fff;
  transform: translateY(-2px);
}

/* -------------------- info Cards -------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  width: 80%;
  margin: 20px auto;
}

.character-card,
.location-card {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, background 0.3s ease;
}

.character-card:hover,
.location-card:hover {
  transform: scale(1.03);
  background: rgba(255, 255, 255, 0.2);
}

.character-card h2,
.location-card h2 {
  margin-bottom: 5px;
  font-family: 'Aboreto', cursive;
}

.character-card p,
.location-card p {
  color: #ddd;
  font-size: 0.9rem;
  margin: 0.3rem 0;
}

.character-card img,
.location-card img,
.item-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px;
}

.single-card-view .character-card img,
.single-card-view .location-card img,
.single-card-view .item-card img {
    width: auto;
    max-width: 80%;
    height: 300px;
    object-fit: contain;
    margin: 0 auto 15px auto;
    display: block;
}

.character-card p { display: none; }
.character-card p:nth-of-type(1),
.character-card p:nth-of-type(2),
.character-card p:nth-of-type(3) { display: block; }

.character-card, .location-card {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.character-card.visible, .location-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* -------------------- Carousel, Footer, Socials -------------------- */
.carousel {
  position: relative;
  max-width: 800px;
  width: 100%;
  margin: 40px 0;
  overflow: hidden;
  border-radius: 20px;
  height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  border-radius: 20px;
  box-shadow: 0 0 0 8px rgba(107,70,193,0.6);
}

.carousel img.active { opacity: 1; z-index: 1; }
.carousel img.inactive { opacity: 0; z-index: 0; }

.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 5px;
  z-index: 2;
}

.prev { left: 10px; }
.next { right: 10px; }

.footer {
  padding: 20px;
  text-align: center;
  background-color: rgba(255,255,255,0.1);
  backdrop-filter: blur(6px);
  width: 100%;
  color: #fff;
}

/* -------------------- Custom Dropdown -------------------- */
.custom-select-wrapper {
    position: relative;
    width: 250px;
    margin: 20px auto;
    z-index: 10;
}

.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    background: #fff;
    color: #000;
    padding: 10px 14px;
    border-radius: 10px;
    border: 2px solid #6B46C1;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
    transition: background 0.2s ease, transform 0.1s ease;
    user-select: none;
}

.custom-select-trigger:hover {
    background: #f0e6ff;
    transform: translateY(-1px);
}

.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    color: #000;
    border-radius: 10px;
    border: 1px solid #6B46C1;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    max-height: 250px;
    overflow-y: auto;
    margin-top: 5px;
    display: none;
    z-index: 9999;
}

/* ✅ Show when wrapper has .open class */
.custom-select.open .custom-options {
    display: block;
}

.custom-option {
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.custom-option:hover,
.custom-option.highlighted {
    background: #6B46C1;
    color: #fff;
}

.dropdown-search {
    width: 90%;
    margin: 8px auto;
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #6B46C1;
    font-size: 0.9rem;
    outline: none;
}

.dropdown-search:focus {
    border-color: #805AD5;
    box-shadow: 0 0 4px rgba(128,90,213,0.4);
}

/* -------------------- Media Queries -------------------- */
@media (max-width: 900px) {
  .features-cards,
  .testimonials-cards,
  .pricing-cards,
  .steps {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 600px) {
  .carousel { height: 250px; }
  .prev, .next { font-size: 1.5rem; padding: 6px 12px; }
  .home-logo { width: 180px; height: 180px; margin-bottom: 20px; }
  body { padding-top: 80px; }
  h1 { font-size: clamp(1.5rem,6vw,3rem); }
  h2 { font-size: clamp(1rem,4vw,1.5rem); }
  .buttons { flex-direction: column; gap: 15px; }
}
/* ------------Factions Cards------------- */
.factions-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, background 0.3s ease;
}

.factions-card:hover {
    transform: scale(1.03);
    background: rgba(255, 255, 255, 0.2);
}

.factions-card img {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    margin-bottom: 10px;
}
/* Campaign Selector */
.campaign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.campaign-card {
    background: var(--secondary-bg);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 2px solid var(--accent);
    transition: all 0.3s ease;
    cursor: pointer;
}

.campaign-card:hover {
    border-color: var(--highlight);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.2);
}

.campaign-card h2 {
    margin: 0 0 1rem 0;
    color: var(--text-light);
}

.campaign-card button {
    margin-top: 1rem;
    width: 100%;
}

.role-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.role-badge.gm {
    background: var(--highlight);
    color: white;
}

.role-badge.player {
    background: var(--success);
    color: white;
}
/* -------------------- Timeline Styles -------------------- */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 2rem auto;
    padding: 20px 0;
}

.timeline-year {
    margin-bottom: 3rem;
}

.timeline-year-header {
    font-family: 'Aboreto', cursive;
    font-size: 2rem;
    color: #E0CFFF;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
}

.timeline-event {
    position: relative;
    padding-left: 50px;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.timeline-event.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 8px;
    width: 16px;
    height: 16px;
    background: #6B46C1;
    border: 3px solid #E0CFFF;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(107, 70, 193, 0.6);
    z-index: 2;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 24px;
    bottom: -24px;
    width: 2px;
    background: linear-gradient(to bottom, #6B46C1, transparent);
    z-index: 1;
}

.timeline-event:last-child::before {
    display: none;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, background 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.15);
    
}

.timeline-content:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.15);
    .timeline-event {
    cursor: pointer;  /* Shows hand cursor */
}

.timeline-event:hover .timeline-content {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.15);
}
}
.event-date {
    font-size: 0.9rem;
    color: #D4B3FF;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.season-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    font-weight: bold;
}

.season-badge.season-1 {
    background: #4ade80;
    color: #064e3b;
}

.season-badge.season-2 {
    background: #fbbf24;
    color: #78350f;
}

.season-badge.season-3 {
    background: #fb923c;
    color: #7c2d12;
}

.season-badge.season-4 {
    background: #60a5fa;
    color: #1e3a8a;
}

.event-title {
    font-family: 'Aboreto', cursive;
    font-size: 1.4rem;
    color: #fff;
    margin: 0.5rem 0;
}

.event-location {
    color: #D4B3FF;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.event-summary {
    color: #ddd;
    line-height: 1.6;
    margin: 1rem 0 0 0;
}

.gm-notes-box {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(107, 70, 193, 0.2);
    border-left: 3px solid #6B46C1;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #E0CFFF;
}

.timeline-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.timeline-filters select {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid #6B46C1;
    font-family: 'Aboreto', sans-serif;
}

.timeline-filters select option {
    background: #2a1a5f;
    color: #fff;
}
/* -------------------- Single Event Detail View -------------------- */
.single-card-view {
    max-width: 800px;
    margin: 2rem auto;
}

.event-detail-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.event-detail-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.event-detail-date {
    font-size: 1.1rem;
    color: #D4B3FF;
    font-weight: bold;
    margin-bottom: 1rem;
}

.event-detail-title {
    font-family: 'Aboreto', cursive;
    font-size: 2.5rem;
    color: #fff;
    margin: 1rem 0;
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.event-detail-location {
    color: #D4B3FF;
    font-size: 1.1rem;
    margin: 1rem 0;
}

.event-detail-description {
    margin: 2rem 0;
}

.event-detail-description h3 {
    color: #E0CFFF;
    margin-bottom: 1rem;
}

.event-detail-description p {
    color: #ddd;
    line-height: 1.8;
    font-size: 1.05rem;
    white-space: pre-wrap; /* Preserves line breaks */
}

.characters-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(107, 70, 193, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(107, 70, 193, 0.3);
}

.characters-section h3 {
    color: #E0CFFF;
    margin-bottom: 1rem;
}

.character-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.character-list li {
    padding: 0.5rem 0;
    color: #D4B3FF;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.character-list li:last-child {
    border-bottom: none;
}

.character-list li:hover {
    color: #fff;
    padding-left: 0.5rem;
}

.character-link {
    cursor: pointer;
}
/* -------------------- Single Character Detail View -------------------- */
.character-detail-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.character-detail-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.character-detail-img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    margin: 0 auto 1.5rem auto;
    display: block;
    border: 3px solid rgba(107, 70, 193, 0.5);
}

.character-detail-title {
    font-family: 'Aboreto', cursive;
    font-size: 2.5rem;
    color: #fff;
    margin: 1rem 0;
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.pc-badge, .npc-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin: 1rem 0;
}

.pc-badge {
    background: #4ade80;
    color: #064e3b;
}

.npc-badge {
    background: #94a3b8;
    color: #1e293b;
}

.character-info-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
}

.character-info-row p {
    color: #D4B3FF;
    font-size: 1.1rem;
}

.character-detail-bio {
    text-align: left;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(107, 70, 193, 0.05);
    border-radius: 12px;
}

.character-detail-bio h3 {
    color: #E0CFFF;
    margin-bottom: 1rem;
}

.character-detail-bio p {
    color: #ddd;
    line-height: 1.8;
    font-size: 1.05rem;
    white-space: pre-wrap;
}

.factions-section, .events-section {
    text-align: left;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(107, 70, 193, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(107, 70, 193, 0.3);
}

.factions-section h3, .events-section h3 {
    color: #E0CFFF;
    margin-bottom: 1rem;
}

.faction-list, .event-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.faction-list li, .event-list li {
    padding: 0.75rem 0;
    color: #D4B3FF;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.faction-list li:last-child, .event-list li:last-child {
    border-bottom: none;
}

.faction-list li:hover, .event-list li:hover {
    color: #fff;
    padding-left: 0.5rem;
}

.event-date-small {
    font-size: 0.9rem;
    color: #9ca3af;
    font-style: italic;
}
/* -------------------- Single Faction Detail View -------------------- */
.faction-detail-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.faction-detail-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.faction-detail-img {
    width: 300px;
    height: 300px;
    object-fit: contain;
    border-radius: 16px;
    margin: 0 auto 1.5rem auto;
    display: block;
    border: 3px solid rgba(107, 70, 193, 0.5);
}

.faction-detail-title {
    font-family: 'Aboreto', cursive;
    font-size: 2.5rem;
    color: #fff;
    margin: 1rem 0;
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.alignment-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin: 1rem 0;
    background: #805AD5;
    color: white;
}

.faction-detail-goals {
    text-align: left;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(107, 70, 193, 0.05);
    border-radius: 12px;
}

.faction-detail-goals h3 {
    color: #E0CFFF;
    margin-bottom: 1rem;
}

.faction-detail-goals p {
    color: #ddd;
    line-height: 1.8;
    font-size: 1.05rem;
    white-space: pre-wrap;
}

.members-section {
    text-align: left;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(107, 70, 193, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(107, 70, 193, 0.3);
}

.members-section h3 {
    color: #E0CFFF;
    margin-bottom: 1rem;
}

.member-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.member-list li {
    padding: 0.75rem 0;
    color: #D4B3FF;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.member-list li:last-child {
    border-bottom: none;
}

.member-list li:hover {
    color: #fff;
    padding-left: 0.5rem;
}

.char-type {
    font-size: 0.9rem;
    color: #9ca3af;
    font-style: italic;
}
/* -------------------- Admin Panel -------------------- */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 2rem 0 1rem 0;
    border-bottom: 2px solid rgba(107, 70, 193, 0.3);
}

.admin-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #D4B3FF;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-tab:hover {
    color: #fff;
    background: rgba(107, 70, 193, 0.1);
}

.admin-tab.active {
    color: #fff;
    border-bottom-color: #6B46C1;
    background: rgba(107, 70, 193, 0.2);
}

.tab-content {
    display: none;
    padding: 2rem 0;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.tab-header h2 {
    margin: 0;
    color: #E0CFFF;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: background 0.2s ease;
}

.admin-row:hover {
    background: rgba(255, 255, 255, 0.1);
}

.admin-row-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-row-info strong {
    color: #fff;
    font-size: 1.1rem;
}

.admin-row-meta {
    color: #9ca3af;
    font-size: 0.9rem;
}

.admin-row-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit, .btn-delete {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit {
    background: #6B46C1;
    color: white;
}

.btn-edit:hover {
    background: #805AD5;
}

.btn-delete {
    background: #dc2626;
    color: white;
}

.btn-delete:hover {
    background: #ef4444;
}
/* -------------------- Modal -------------------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 3000;
    overflow-y: auto;
}

.modal-content {
    background: linear-gradient(135deg, #2a1a5f, #3b0c5a);
    border: 2px solid rgba(107, 70, 193, 0.5);
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
    position: absolute;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(107, 70, 193, 0.3);
    padding-bottom: 1rem;
}

.modal-header h2 {
    margin: 0;
    color: #E0CFFF;
}

.modal-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    flex: 1 1 100%;
}

.form-group label {
    color: #D4B3FF;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(107, 70, 193, 0.5);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Aboreto', sans-serif;
}

.form-group input[type="text"]:focus,
.form-group input[type="url"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6B46C1;
    background: rgba(255, 255, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(107, 70, 193, 0.3);
    border-radius: 8px;
}

.checkbox-label {
    display: block;
    padding: 0.5rem;
    color: #D4B3FF;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 4px;
}

.checkbox-label:hover {
    background: rgba(107, 70, 193, 0.2);
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(107, 70, 193, 0.3);
}
/* -------------------- Auth Forms -------------------- */
.auth-form-container {
    max-width: 450px;
    margin: 2rem auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    border-radius: 20px;
    border: 2px solid rgba(107, 70, 193, 0.3);
}

.auth-form-container .form-group {
    margin-bottom: 1.5rem;
}

.auth-form-container label {
    display: block;
    color: #D4B3FF;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.auth-form-container input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(107, 70, 193, 0.5);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Aboreto', sans-serif;
    box-sizing: border-box;
}

.auth-form-container input:focus {
    outline: none;
    border-color: #6B46C1;
    background: rgba(255, 255, 255, 0.1);
}

.form-hint {
    display: block;
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.error-message {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.success-message {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
    color: #86efac;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.full-width {
    width: 100%;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(107, 70, 193, 0.3);
}

.auth-links p {
    color: #D4B3FF;
    font-size: 0.95rem;
}

.auth-links a {
    color: #6B46C1;
    text-decoration: none;
    font-weight: bold;
}

.auth-links a:hover {
    color: #805AD5;
    text-decoration: underline;
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

/* Tablets and smaller (below 768px) */
@media screen and (max-width: 768px) {
    
    /* Container adjustments */
    .container {
        padding: 1rem;
        max-width: 100%;
    }
    
    /* Logo sizing */
    .home-logo {
        max-width: 150px;
        margin-bottom: 1.5rem;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    /* Buttons */
    .buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    button, .buttons button, .buttons a button {
        width: 100%;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Cards */
    .card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    /* Campaign grid */
    .campaign-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .campaign-card {
        padding: 1.25rem;
    }
    
    /* Auth forms */
    .auth-form-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    /* Modals */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 1rem auto;
        padding: 1.5rem;
        max-height: 90vh;
        left: 50% !important;
        top: 5vh !important;
        transform: translateX(-50%) !important;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    /* Form rows - stack on mobile */
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-group {
        width: 100% !important;
    }
    
    /* Admin tabs */
    .admin-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .admin-tab {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 120px;
        font-size: 0.9rem;
        padding: 0.6rem 0.75rem;
    }
    
    /* Admin rows */
    .admin-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    
    .admin-row-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .admin-row-actions button {
        flex: 1;
    }
    
    /* Tab header */
    .tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .tab-header button {
        width: 100%;
    }
    
    /* Character/Event detail pages */
    .detail-header {
        flex-direction: column;
        text-align: center;
    }
    
    .detail-header img {
        margin: 0 auto 1rem auto;
    }
    
    /* Checkbox groups */
    .checkbox-group {
        max-height: 200px;
    }
    
    /* Navigation spacing */
    .section-list {
        gap: 0.75rem;
    }
    
    /* Timeline adjustments */
    .timeline-item {
        padding-left: 2rem;
    }
    
    .timeline-item::before {
        left: 0.5rem;
    }
    
    /* Error pages */
    div[style*="font-size: 6rem"] {
        font-size: 4rem !important;
    }
    
    /* Dashboard campaign name */
    #campaign-name {
        font-size: 0.9rem;
        word-break: break-word;
    }
}

/* Small mobile devices (below 480px) */
@media screen and (max-width: 480px) {
    
    /* Even smaller text */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    /* Logo */
    .home-logo {
        max-width: 120px;
    }
    
    /* Cards */
    .card {
        padding: 1rem;
    }
    
    /* Forms */
    .auth-form-container {
        padding: 1.25rem;
    }
    
    input, textarea, select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Buttons */
    button {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    /* Modal */
    .modal-content {
        padding: 1rem;
    }
    
    /* Admin tabs - full width on very small screens */
    .admin-tab {
        flex: 1 1 100%;
    }
    
    /* Reduce spacing */
    .container {
        padding: 0.75rem;
    }
    
    /* Form hints */
    .form-hint {
        font-size: 0.8rem;
    }
    
    /* Admin row meta */
    .admin-row-meta {
        font-size: 0.8rem;
    }
}

/* Landscape mobile orientation */
@media screen and (max-height: 600px) and (orientation: landscape) {
    
    .home-logo {
        max-width: 100px;
        margin-bottom: 1rem;
    }
    
    .modal-content {
        max-height: 85vh;
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    
    /* Larger tap targets */
    button, a, .admin-tab, .modal-close {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    button:hover, .admin-tab:hover {
        transform: none;
    }
    
    /* Better spacing for touch */
    .admin-row-actions button {
        padding: 0.75rem 1rem;
    }
}

/* Fix iOS input zoom */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
    font-size: 16px;
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

.container {
    overflow-x: hidden;
}