/* ==============================================
   Global Base Styles
   ============================================== */
:root {
  --bg-dark: #0d0d0f;
  --bg-light: #1c1c20;
  --accent: #3da9fc;
  --accent-hover: #68c3ff;
  --text-light: #e8e8e8;
  --text-dim: #9da3b4;
  --highlight: #ffd369;
  --radius: 12px;
  --transition: 0.3s ease;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  background: url("background.jpg") no-repeat center center fixed;
  background-size: cover;
  color: var(--text-light);
  font-family: inherit;
  min-height: 100vh;
}

/* ==============================================
   Layout & Typography
   ============================================== */
header {
  background: linear-gradient(90deg, #111 0%, #1b1b1f 100%);
  color: var(--highlight);
  text-align: center;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
}

nav {
  margin-top: 0.5rem;
}

nav a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 0.25rem;
  transition: color var(--transition);
}

nav a:hover {
  color: var(--accent-hover);
}

/* ==============================================
   Main Gallery (Years / Months)
   ============================================== */
main {
  padding: 2rem;
  text-align: center;
}

.year-block {
  margin-bottom: 2rem;
}

.year-block h2 {
  color: var(--highlight);
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
}

.months {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.months a {
  background: var(--bg-light);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  transition: background var(--transition), transform var(--transition);
}

.months a:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-2px);
}
/* ==============================================
   Year Page Month Grid
   ============================================== */

.month-block {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.month-link {
  background: rgba(28, 28, 32, 0.85); /* slightly transparent for background readability */
  color: var(--text-light);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
  transition: background var(--transition), transform var(--transition), color var(--transition);
}

.month-link:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-2px);
}

/* ==============================================
   Calendar (Month View)
   ============================================== */
.calendar-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-top: 1rem;
}

.weekday-header {
  font-weight: bold;
  color: var(--highlight);
  padding: 0.5rem 0;
  border-bottom: 1px solid #333;
}

.day-cell {
  background: var(--bg-light);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.day-cell:hover {
  transform: scale(1.03);
  box-shadow: 0 0 12px rgba(61, 169, 252, 0.3);
  cursor: pointer;
}

.day-label {
  font-size: 0.9rem;
  padding: 4px;
  color: var(--text-dim);
}

.day-cell img.thumbnail {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 0 0 var(--radius) var(--radius);
}

.day-cell.no-photos {
  opacity: 0.3;
}

/* ==============================================
   Daily Gallery View
   ============================================== */
#photos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.photo-item {
  text-align: center;
  max-width: 220px;
}

.photo-item img.thumb {
  width: 100%;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.photo-item img.thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(255, 211, 105, 0.4);
}

.filename {
  font-size: 0.8rem;
  /*color: var(--text-dim);
    background:Black;
  word-wrap: break-word;*/
  margin-top: 0.25rem;
  background: var(--bg-light);
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  transition: background var(--transition), transform var(--transition);
}

/* ==============================================
   Breadcrumbs
   ============================================== */
#breadcrumbs {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

#breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
}

#breadcrumbs a:hover {
  color: var(--accent-hover);
}

/* ==============================================
   Lightbox Fullscreen Viewer
   ============================================== */
#lightbox-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#lightbox-img {
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  border-radius: 10px;
  transition: transform 0.25s ease-out, opacity 0.4s ease;
  touch-action: none;
  user-select: none;
}

#lightbox-prev, #lightbox-next, #lightbox-close {
  position: absolute;
  color: white;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1001;
  opacity: 0.7;
  transition: opacity var(--transition);
}

#lightbox-prev:hover, #lightbox-next:hover, #lightbox-close:hover {
  opacity: 1;
}

#lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
#lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
#lightbox-close { top: 15px; right: 25px; }

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

.slide-left {
  animation: slideLeft 0.4s ease;
}

.slide-right {
  animation: slideRight 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideLeft {
  from { transform: translateX(-20%) scale(0.98); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes slideRight {
  from { transform: translateX(20%) scale(0.98); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}

/* ==============================================
   Responsive
   ============================================== */
@media (max-width: 700px) {
  header h1 {
    font-size: 1.4rem;
  }

  .calendar-grid {
    gap: 0.15rem;
  }

  .photo-item {
    max-width: 45%;
  }

  .months a {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}
