/* Grundlæggende layout */
html, body {
  height: 100%; /* Sikrer at body fylder hele skærmen */
  margin: 0;
  background-color: #0d0d0d;
  font-family: Arial, sans-serif;
  color: #fff;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* CENTER HELPER - Bruges til Login-siden */
.center {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* LOGIN KONFIGURATION */
.login-container {
  background-color: #1a1a1a;
  padding: 2.5em;
  border-radius: 15px;
  border: 1px solid #333;
  text-align: center; /* Centrerer tekst og inline-elementer (som dit logo) */
  width: 100%;
  max-width: 350px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.centered-image {
  display: block;
  margin: 0 auto 20px auto; /* Centrerer billedet og giver luft i bunden */
}

.login-container h2 {
  color: #ffd166;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-container h6 {
  margin-top: 0;
  color: #888;
  margin-bottom: 25px;
}

.login-container label {
  display: block;
  text-align: left;
  font-size: 0.8rem;
  margin-bottom: 5px;
  color: #ffd166;
}

.login-container input {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  background: #0d0d0d;
  border: 1px solid #333;
  border-radius: 6px;
  color: #fff;
  box-sizing: border-box;
}

.login-container button {
  width: 100%;
  margin: 10px 0 0 0 !important; /* Overstyrer margin fra generel button styling */
}

/* TOPBAR - Fastlåst til toppen */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  position: sticky; 
  top: 0;
  z-index: 1000;
}

.topbar h1 {
  font-size: 1.2rem;
  margin: 0;
  color: #ffd166;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* CHAT - Scroll til bund knap */
.scroll-btn {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffd166;
  color: #000;
  border: none;
  border-radius: 20px;
  padding: 8px 15px;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 99;
  text-transform: uppercase;
}

/* DEN GYLDNE KNAP-STYLING */
.back-btn, .btn-gold, button:not(.icon-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffd166 !important;
  text-decoration: none;
  font-weight: bold;
  border: 2px solid #ffd166;
  padding: 10px 8px;
  border-radius: 8px;
  background: transparent;
  transition: all 0.2s ease-in-out;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  font-family: Arial, sans-serif;
}

.back-btn:hover, .btn-gold:hover, button:not(.icon-btn):hover {
  background: #ffd166;
  color: #000 !important;
  box-shadow: 0 0 15px rgba(255, 209, 102, 0.4);
}

/* CONTAINER TIL CAMP KOPKE MAIN (Dashboard) */
.campkopke-container {
  background-color: #1a1a1a;
  padding: 2em;
  border-radius: 15px;
  border: 1px solid #333;
  text-align: center;
  width: 90%;
  max-width: 400px;
  margin: 20px auto;
}

.campkopke-container button {
  width: 100%;
  display: block;
  margin-bottom: 12px; /* Tilføjer luft under hver knap */
}

/* Fjern margenen på den sidste knap, så bunden flugter pænt */
.campkopke-container button:last-child {
  margin-bottom: 0;
}

/* FOOTER - Fastlåst til bunden */
.user-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #1a1a1a;
  border-top: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  box-sizing: border-box;
  z-index: 1000;
}

body {
  padding-bottom: 60px; 
}

.username {
  color: #ffd166;
  font-weight: bold;
  text-decoration: none;
  font-size: 1rem;
}

.logout-link {
  color: #ff4d4d;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  text-transform: uppercase;
}

/* Slette-knap styling */
.delete-btn {
  background: rgba(255, 77, 77, 0.2);
  color: #ff4d4d;
  border: 1px solid #ff4d4d;
  border-radius: 4px;
  padding: 2px px;
  font-size: 0.7rem;
  cursor: pointer;
  float: right;
  margin-left: 10px;
  transition: 0.2s;
}

/* MASONRY GALLERI */
.gallery {
  column-count: 2; 
  column-gap: 15px;
  padding: 15px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .gallery {
    column-count: 3;
  }
}

.photo-card {
  display: inline-block;
  width: 100%;
  margin-bottom: 15px;
  background: #1a1a1a;
  border-radius: 12px;
  border: 1px solid #333;
  overflow: hidden;
  break-inside: avoid;
}

.photo-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* FOOTER - Fastlåst til bunden */
.user-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #1a1a1a;
  border-top: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  box-sizing: border-box;
  z-index: 1000;
}

body {
  padding-bottom: 60px; 
}

.username {
  color: #ffd166;
  font-weight: bold;
  text-decoration: none;
  font-size: 1rem;
}

.logout-link {
  color: #ff4d4d;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  text-transform: uppercase;
}

/* Slette-knap styling */
.delete-btn {
  background: rgba(255, 77, 77, 0.2);
  color: #ff4d4d;
  border: 1px solid #ff4d4d;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.7rem;
  cursor: pointer;
  float: right;
  margin-left: 10px;
  transition: 0.2s;
}

/* Konfiruration af slette funktion til admin bruger */
.delete-btn:hover {
  background: #ff4d4d;
  color: #fff;
}

/* Skjul slette-knapper som standard */
.admin-only {
  display: none;
}

/* Vis kun hvis body har klassen 'is-admin' */
.is-admin .admin-only {
  display: inline-block !important; /* !important sikrer at den overstyrer display: none */
}

/* Gør knappen rød og synlig for admins */
.is-admin .admin-only {
  display: block !important;
  position: absolute;
  top: 5px;
  left: 5px;
  background: rgba(255, 0, 0, 0.7);
  border: none;
  color: white;
  padding: 5px 8px;
  border-radius: 5px;
  cursor: pointer;
  z-index: 10;
}

/* Sørg for at gallery-item er relativ for at placere knappen korrekt */
.gallery-item {
  position: relative !important;
}

/* Gør knappen synlig når body er 'is-admin' */
.is-admin .admin-only {
    display: block !important;
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4d4d; /* Rød */
    color: white;
    border: none;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 100; /* Sikrer den ligger øverst */
}

/* styling til profil sider */
.profile-pic-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

#profileDisplay {
    box-shadow: 0 0 15px rgba(255, 209, 102, 0.3); /* Guld skær som knapperne */
    background-color: #1a1a1a;
}