{
box-sizing: border-box;
margin: 0;
padding: 0;
}

body {
font-family: system-ui, -apple-system, sans-serif;
background-color: #121212;
color: #ffffff;
padding: 20px;
}

header {
text-align: center;
margin-top: 10px;
margin-bottom: 35px;
}

header h1 {
font-size: 2.2rem;
font-weight: 600;
letter-spacing: 1px;
}

main {
max-width: 1400px;
margin: 0 auto;
}

/* Dynamisk Mappe-Grid (Forside) */
.folder-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
gap: 25px;
}

.folder-card {
background: #1e1e1e;
border-radius: 12px;
overflow: hidden;
cursor: pointer;
border: 1px solid #2a2a2a;
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.folder-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
border-color: #444444;
}

.folder-thumbnail {
position: relative;
height: 190px;
overflow: hidden;
background: #151515;
}

.folder-thumbnail img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s ease;
}

.folder-card:hover .folder-thumbnail img {
transform: scale(1.05);
}

.folder-count {
position: absolute;
bottom: 10px;
right: 10px;
background: rgba(0, 0, 0, 0.75);
color: #ffffff;
padding: 4px 10px;
border-radius: 20px;
font-size: 0.75rem;
backdrop-filter: blur(4px);
}

.folder-details {
padding: 15px;
}

.folder-header {
display: flex;
align-items: center;
gap: 10px;
}

.folder-icon {
font-size: 1.2rem;
}

.folder-name {
font-size: 1.05rem;
font-weight: 600;
color: #f0f0f0;
}

/* Mappe navigation inde i en datomappe */
.folder-nav {
display: flex;
align-items: center;
gap: 20px;
margin-bottom: 25px;
padding-bottom: 15px;
border-bottom: 1px solid #2a2a2a;
flex-wrap: wrap;
}

.back-btn {
background-color: #2a2a2a;
color: #ffffff;
border: 1px solid #3a3a3a;
padding: 8px 16px;
border-radius: 6px;
font-size: 0.9rem;
cursor: pointer;
transition: background-color 0.2s ease, transform 0.1s ease;
}

.back-btn:hover {
background-color: #3a3a3a;
transform: translateX(-2px);
}

.current-folder-title {
font-size: 1.2rem;
font-weight: 500;
color: #e0e0e0;
}

/* Responsivt grid til billederne i en mappe */
.photo-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 20px;
}

.photo-card {
background: #1e1e1e;
border-radius: 8px;
overflow: hidden;
cursor: pointer;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.photo-card img {
width: 100%;
height: 250px;
object-fit: cover;
display: block;
}

.photo-info {
padding: 12px;
display: flex;
justify-content: space-between;
font-size: 0.85rem;
color: #aaaaaa;
}

/* Lightbox (Fuldskærms-visning) */
.lightbox {
display: none;
position: fixed;
z-index: 1000;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.93);
justify-content: center;
align-items: center;
padding: 20px;
user-select: none;
}

.lightbox-content {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
max-width: 90vw;
max-height: 85vh;
}

.lightbox img {
max-width: 85vw;
max-height: 80vh;
object-fit: contain;
border-radius: 6px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.caption {
margin-top: 15px;
color: #ffffff;
font-size: 0.95rem;
text-align: center;
}

/* Knapper i Lightbox */
.close-btn {
  position: fixed;
  top: 15px;
  right: 20px;
  color: #ffffff;
  font-size: 38px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1020;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
  line-height: 1;
}

.close-btn:hover {
opacity: 1;
transform: scale(1.1);
}

.nav-btn {
position: absolute;
top: 45%;
transform: translateY(-50%);
background: rgba(0, 0, 0, 0.65);
color: #ffffff;
border: 1px solid rgba(255, 255, 255, 0.2);
font-size: 1.6rem;
width: 46px;
height: 46px;
border-radius: 50%;
cursor: pointer;
z-index: 1010;
transition: background-color 0.2s ease, transform 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
backdrop-filter: blur(4px);
}

.prev-btn {
left: -70px;
}

.next-btn {
right: -70px;
}

.nav-btn:hover {
background: rgba(0, 0, 0, 0.85);
transform: translateY(-50%) scale(1.1);
}

/* Mobil-tilpasning til Lightbox */
@media (max-width: 600px) {
.close-btn {
top: 15px;
right: 20px;
}

.nav-btn {
font-size: 1.2rem;
width: 36px;
height: 36px;
}

.prev-btn {
left: 8px;
}

.next-btn {
right: 8px;
}
}