/* ==========================================================
   GLOBAL THEME — clean, Apple-style
   ========================================================== */

:root {
  --bg: #020617;
  --bg-soft: radial-gradient(circle at top, #111827 0, #020617 55%, #020617 100%);
  --panel: rgba(15, 23, 42, 0.88);
  --card: rgba(15, 23, 42, 0.92);
  --border: rgba(148, 163, 184, 0.35);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #3b82f6;
  --primary-soft: rgba(59, 130, 246, 0.18);
  --accent: #f97316;
  --link: #93c5fd;

  --btn-bg: #111827;
  --btn-text: #e5e7eb;

  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.65);
  --shadow-hover: 0 26px 60px rgba(0, 0, 0, 0.85);

  --radius-lg: 18px;
  --radius-pill: 999px;

  --transition-fast: 0.16s ease;
}

/* Basic reset / typography */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg-soft);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  opacity: 0.9;
}

/* ==========================================================
   LAYOUT HELPERS
   ========================================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 24px;
}

/* Generic cards */

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px 18px 20px;
  box-shadow: var(--shadow-soft);
}

/* Glass / blur style you can reuse:
   add class "glass-card" ON TOP of .card or any block */
.glass-card {
  background: linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.88),
      rgba(15, 23, 42, 0.72)
    );
  border: 1px solid rgba(148, 163, 184, 0.5);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

/* Muted text */

.muted {
  color: var(--muted);
}

/* ==========================================================
   iOS-STYLE BUTTONS
   ========================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-pill);          /* pill shape */
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.92);
  color: var(--btn-text);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    opacity 0.12s ease-in-out;
  white-space: nowrap;
}

.btn.primary {
  background: radial-gradient(
      circle at 20% 0,
      rgba(244, 244, 245, 0.24) 0,
      transparent 55%
    ),
    linear-gradient(135deg, #3b82f6, #2563eb);
  color: #f9fafb;
  border-color: rgba(59, 130, 246, 0.85);
}

.btn.secondary {
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.95);
  border-color: rgba(148, 163, 184, 0.75);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.9);
}

/* Small pill badge (used for message counts, etc.) */

.pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  margin-left: 6px;
}

/* Icon-only pill button (e.g. notification bell) */

.iconbtn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.9);
  color: var(--btn-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.iconbtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.95);
  border-color: rgba(148, 163, 184, 0.8);
}

.iconbtn .dot {
  position: absolute;
  right: -3px;
  top: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(15, 23, 42, 0.98);
}

/* ==========================================================
   FORMS – vertical, clean
   ========================================================== */

form label {
  display: block;
  margin: 10px 0 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(31, 41, 55, 0.9);
  background: rgba(15, 23, 42, 0.96);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease,
    background-color 0.16s ease;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.65);
}

/* ==========================================================
   APPLE-PHOTOS STYLE ALBUM GRID
   ========================================================== */

/* Wrapper for albums (your PHP already uses .grid) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 22px;
  align-items: flex-start;
}

/* Album tile */
.album-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 8px 10px;
  border-radius: 20px;
  background: radial-gradient(
      circle at top left,
      rgba(148, 163, 184, 0.16),
      transparent 55%
    ),
    rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.95);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.95);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    transform 0.22s cubic-bezier(0.19, 1, 0.22, 1),
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background-color 0.22s ease;
}

/* Hover – very similar to Photos.app */
.album-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-hover);
  border-color: rgba(59, 130, 246, 0.65);
  background: radial-gradient(
      circle at top left,
      rgba(59, 130, 246, 0.18),
      transparent 55%
    ),
    rgba(15, 23, 42, 0.96);
}

/* Cover image block */
.album-cover {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #020617;
  isolation: isolate;
}

.album-cover img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5; /* tall vertical tile, very "Photos" */
  object-fit: cover;
  display: block;
  transform-origin: center center;
  transition: transform 0.24s ease;
}

/* Slight zoom on hover, like Photos */
.album-card:hover .album-cover img {
  transform: scale(1.05);
}

/* Soft gradient overlay to make text readable if you ever
   add badges over the thumb */
.album-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.32),
    rgba(0, 0, 0, 0) 55%
  );
  pointer-events: none;
}

/* Album text underneath the image */
.album-meta {
  padding: 6px 2px 0;
}

.album-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.album-description {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* When there is no cover image */
.album-card .no-cover {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  background: #020617;
  color: var(--muted);
  font-size: 13px;
}

/* ==========================================================
   FOOTER
   ========================================================== */

.site-footer {
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  margin-top: 28px;
  padding: 14px 20px 22px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  opacity: 0.82;
}

/* ==========================================================
   WATERMARK LOGO (bottom-left)
   ========================================================== */

body::after {
  content: "";
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 220px;
  height: 220px;
  background: url("/assets/logo.png") no-repeat center / contain;
  opacity: 0.28; /* bump up / down to taste */
  pointer-events: none;
  z-index: 0;
}

/* Make sure the actual UI sits above watermark */
body > * {
  position: relative;
  z-index: 2;
}

/* ==========================================================
   RESPONSIVE TWEAKS
   ========================================================== */

@media (max-width: 900px) {
  .container {
    padding-inline: 14px;
  }
}

@media (max-width: 740px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
  }

  .album-card {
    border-radius: 18px;
    padding: 8px;
  }

  .album-cover {
    border-radius: 16px;
  }

  .album-title {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  body::after {
    width: 160px;
    height: 160px;
    bottom: 12px;
    left: 12px;
    opacity: 0.24;
  }
}
