/* ── Fonts ────────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Gotham';
  src: url('/fonts/Gotham-Light.otf') format('opentype');
  font-weight: 300; font-style: normal;
}
@font-face {
  font-family: 'Gotham';
  src: url('/fonts/Gotham-LightItalic.otf') format('opentype');
  font-weight: 300; font-style: italic;
}
@font-face {
  font-family: 'Gotham';
  src: url('/fonts/Gotham-Book.otf') format('opentype');
  font-weight: 400; font-style: normal;
}
@font-face {
  font-family: 'Gotham';
  src: url('/fonts/Gotham-BookItalic.otf') format('opentype');
  font-weight: 400; font-style: italic;
}
@font-face {
  font-family: 'Gotham';
  src: url('/fonts/Gotham-Medium.otf') format('opentype');
  font-weight: 500; font-style: normal;
}
@font-face {
  font-family: 'Gotham';
  src: url('/fonts/Gotham-Bold.otf') format('opentype');
  font-weight: 700; font-style: normal;
}
@font-face {
  font-family: 'Gotham';
  src: url('/fonts/Gotham-BoldItalic.otf') format('opentype');
  font-weight: 700; font-style: italic;
}
@font-face {
  font-family: 'TradeGothic';
  src: url('/fonts/TradeGothicLTPro-BdCn20.otf') format('opentype');
  font-weight: 700; font-style: normal;
}

/* ── Design Variables ─────────────────────────────────────────────────────── */
:root {
  --cb-red:          #B51634;
  --cb-red-hover:    #d8011e;
  --cb-red-dark:     #8a1128;
  --cb-dark:         #141414;
  --cb-black:        #0a0a0a;
  --bg:              #0e0e0e;
  --surface:         #171717;
  --card:            #1a1a1a;
  --border:          #252525;
  --border-hover:    #333;
  --text:            #f0ede8;
  --text-secondary:  #b0ada6;
  --muted:           #6b6862;
  --danger:          #B51634;

  --font-body:       'Gotham', 'Arial Narrow', sans-serif;
  --font-display:    'TradeGothic', 'Gotham', sans-serif;

  --ease-out:        cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:     cubic-bezier(0.42, 0, 0.58, 1);
  --ease-spring:     cubic-bezier(0.34, 1.56, 0.64, 1);

  --shadow-sm:       0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md:       0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg:       0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl:       0 20px 25px -5px rgba(0,0,0,0.15), 0 8px 10px -6px rgba(0,0,0,0.1);
}

/* ── Selection ──────────────────────────────────────────────────────────── */
::selection {
  background: rgba(181, 22, 52, 0.4);
  color: #fff;
}

::-moz-selection {
  background: rgba(181, 22, 52, 0.4);
  color: #fff;
}

/* ── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--cb-black);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cb-red);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--cb-black);
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* ── Page Load Animation ──────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Focus Visible ────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--cb-red);
  outline-offset: 2px;
}

/* ── Alert Accessibility ──────────────────────────────────────────────────── */
.alert-error, .alert-success {
  animation: fadeIn 0.3s var(--ease-out);
}

body {
  background: var(--bg);
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 70px,
      rgba(181, 22, 52, 0.03) 70px,
      rgba(181, 22, 52, 0.03) 74px
    );
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Form Elements ─────────────────────────────────────────────────────── */
label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  padding: 0.7rem 1rem;
  outline: none;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  appearance: none;
  -webkit-appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cb-red);
  box-shadow: 0 0 0 3px rgba(181, 22, 52, 0.15), 0 0 16px rgba(181, 22, 52, 0.08);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  font-weight: 300;
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6862' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

button.btn,
a.btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(180deg, var(--cb-red) 0%, var(--cb-red-dark) 100%);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

button.btn:hover,
a.btn:hover,
.btn:hover {
  background: linear-gradient(180deg, var(--cb-red-hover) 0%, var(--cb-red) 100%);
  box-shadow: 0 4px 20px rgba(181, 22, 52, 0.35), 0 0 40px rgba(181, 22, 52, 0.1);
}

button.btn:active,
a.btn:active,
.btn:active {
  transform: translateY(1px);
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
nav {
  background: var(--cb-black);
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--cb-red);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.nav-brand img {
  height: 54px;
  width: auto;
  display: block;
  transition: opacity 0.3s var(--ease-out);
}

.nav-brand:hover img {
  opacity: 0.85;
}

.nav-brand-text {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.1;
  border-left: 1px solid var(--border-hover);
  padding-left: 1rem;
}

.nav-brand-text span {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.10em;
  color: var(--muted);
  margin-top: 0.15rem;
}

.nav-links {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  transition: color 0.3s var(--ease-out);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  right: 50%;
  height: 2px;
  background: var(--cb-red);
  transition: left 0.3s var(--ease-out), right 0.3s var(--ease-out);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  left: 0.5rem;
  right: 0.5rem;
}

.nav-links a.btn-accent {
  background: linear-gradient(180deg, var(--cb-red) 0%, var(--cb-red-dark) 100%);
  color: #fff;
  font-weight: 700;
  padding: 0.5rem 1.2rem;
}

.nav-links a.btn-accent::after {
  display: none;
}

.nav-links a.btn-accent:hover {
  background: linear-gradient(180deg, var(--cb-red-hover) 0%, var(--cb-red) 100%);
  color: #fff;
  box-shadow: 0 2px 16px rgba(181, 22, 52, 0.35);
}

.nav-links a.btn-settings {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
  padding: 0.5rem 1.2rem;
  transition: all 0.3s var(--ease-out);
}

.nav-links a.btn-settings::after {
  display: none;
}

.nav-links a.btn-settings:hover {
  border-color: var(--cb-red);
  color: var(--text);
  background: rgba(181, 22, 52, 0.08);
}

.nav-search {
  display: flex;
  gap: 0;
  align-items: center;
  margin-right: 0.7rem;
}

.nav-search input,
.nav-search button {
  height: 34px;
  box-sizing: border-box;
}

.nav-search input {
  width: 260px;
  margin: 0;
  padding: 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 400;
  background: var(--surface);
  border: 1px solid var(--border-hover);
  color: var(--text);
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.nav-search input:focus {
  border-color: var(--cb-red);
  background: var(--card);
  box-shadow: 0 0 0 2px rgba(181, 22, 52, 0.12);
}

.nav-search button {
  background: var(--cb-red);
  border: 1px solid var(--cb-red);
  margin-left: -1px;
  color: #fff;
  padding: 0 1rem;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s var(--ease-out);
}

.nav-search input:focus + button {
  border-color: var(--cb-red);
}

.nav-search button:hover {
  background: var(--cb-red-hover);
  border-color: var(--cb-red-hover);
}

.nav-user {
  font-size: 0.62rem;
  font-weight: 400;
  color: var(--muted);
  margin-right: 0.7rem;
  letter-spacing: 0.08em;
  border-right: 1px solid var(--border);
  padding-right: 0.9rem;
  transition: color 0.3s var(--ease-out);
}

/* ── Main Content ─────────────────────────────────────────────────────────── */
.main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 3rem 2.5rem;
  animation: fadeIn 0.4s var(--ease-out);
}

/* ── Page Header ──────────────────────────────────────────────────────────── */
.page-header {
  margin-bottom: 3rem;
}

.page-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.2rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 0.95;
  color: var(--text);
}

.page-header h1 .accent {
  color: var(--cb-red);
}

.page-header .subtitle {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.75rem;
}

/* ── Back Button ──────────────────────────────────────────────────────────── */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  padding: 0.45rem 1.2rem;
  transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.btn-back:hover {
  color: var(--cb-red);
  border-color: var(--cb-red);
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.8rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}

.breadcrumb a:hover {
  color: var(--cb-red);
}

/* ── Albums Grid ──────────────────────────────────────────────────────────── */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.8rem;
}

.album-wrapper {
  position: relative;
}

.album-card {
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  height: 100%;
  transition: border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.album-card:hover {
  border-color: var(--cb-red);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(181, 22, 52, 0.15);
}

.album-cover {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface);
  flex-shrink: 0;
}

.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
  display: block;
}

.album-card:hover .album-cover img {
  transform: scale(1.06);
}

.album-cover-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--border);
}

.album-info {
  padding: 1.1rem 1.4rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex: 1;
  transition: border-color 0.35s var(--ease-out);
}

.album-card:hover .album-info {
  border-top-color: rgba(181, 22, 52, 0.2);
}

.album-name {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.album-count {
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.album-arrow {
  color: var(--muted);
  font-size: 1.1rem;
  transition: color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.album-card:hover .album-arrow {
  color: var(--cb-red);
  transform: translateX(3px);
}

/* Delete Album */
.album-actions {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
  z-index: 2;
}

.album-wrapper:hover .album-actions {
  opacity: 1;
}

.album-delete,
.btn-delete {
  background: rgba(181, 22, 52, 0.9);
  color: white;
  border: none;
  padding: 0.35rem 0.8rem;
  font-size: 0.65rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  backdrop-filter: blur(8px);
}

.album-delete:hover,
.btn-delete:hover {
  background: var(--cb-red-hover);
  box-shadow: 0 4px 16px rgba(181, 22, 52, 0.4);
}

/* ── Empty State ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 6rem 2rem;
  color: var(--muted);
}

.empty-state .icon {
  font-size: 4.5rem;
  margin-bottom: 1.2rem;
  opacity: 0.2;
}

.empty-state p {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.empty-state a {
  display: inline-block;
  background: linear-gradient(180deg, var(--cb-red) 0%, var(--cb-red-dark) 100%);
  color: #fff;
  text-decoration: none;
  padding: 0.85rem 2.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all 0.3s var(--ease-out);
}

.empty-state a:hover {
  background: linear-gradient(180deg, var(--cb-red-hover) 0%, var(--cb-red) 100%);
  box-shadow: 0 4px 20px rgba(181, 22, 52, 0.35);
}

/* ── Photo Grid ───────────────────────────────────────────────────────────── */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.5rem;
}

.photo-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
}

.photo-item.hidden {
  display: none;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
  display: block;
}

.photo-item:hover img {
  transform: scale(1.06);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.photo-item:hover .photo-overlay {
  opacity: 1;
}

.overlay-icon {
  font-size: 1.6rem;
  color: white;
  opacity: 0.9;
  transition: transform 0.35s var(--ease-out);
}

.photo-item:hover .overlay-icon {
  transform: scale(1.1);
}

.overlay-keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  padding: 0 0.6rem;
}

.overlay-kw {
  background: rgba(181, 22, 52, 0.85);
  color: #fff;
  padding: 0.15rem 0.55rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.btn-delete-photo {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(181, 22, 52, 0.9);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out), background 0.25s var(--ease-out);
  z-index: 2;
  backdrop-filter: blur(8px);
}

.photo-item:hover .btn-delete-photo {
  opacity: 1;
}

.btn-delete-photo:hover {
  background: var(--cb-red-hover);
}

/* ── Keyword Filter ──────────────────────────────────────────────────────── */
.filter-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cb-red);
  padding: 1.4rem 1.8rem;
  margin-bottom: 2.5rem;
}

.filter-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.keyword-search {
  max-width: 320px;
  margin-bottom: 1.1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.55rem 1rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  width: 100%;
}

.keyword-search:focus {
  border-color: var(--cb-red);
  box-shadow: 0 0 0 3px rgba(181, 22, 52, 0.12);
}

.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.38rem 0.9rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  user-select: none;
  border-radius: 2px;
}

.keyword-tag:hover {
  border-color: var(--cb-red);
  color: var(--text);
  background: rgba(181, 22, 52, 0.06);
}

.keyword-tag.active {
  background: var(--cb-red);
  border-color: var(--cb-red);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(181, 22, 52, 0.45), 0 0 28px rgba(181, 22, 52, 0.15);
  transform: translateY(-1px);
}

.keyword-tag .count {
  opacity: 0.55;
  font-size: 0.6rem;
}

.filter-info {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 0.9rem;
}

.filter-info span {
  color: var(--cb-red);
  font-weight: 700;
}

.btn-clear-filter {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.22rem 0.7rem;
  font-size: 0.62rem;
  font-family: var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  margin-left: 0.7rem;
  transition: all 0.3s var(--ease-out);
}

.btn-clear-filter:hover {
  border-color: var(--cb-red);
  color: var(--cb-red);
  background: rgba(181, 22, 52, 0.05);
}

/* ── Lightbox ────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(20px);
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  animation: lightbox-in 0.3s var(--ease-out);
}

@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-img {
  max-width: 88vw;
  max-height: 82vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 1px rgba(255, 255, 255, 0.05);
}

.lightbox-keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.lightbox-kw {
  background: rgba(181, 22, 52, 0.15);
  border: 1px solid rgba(181, 22, 52, 0.4);
  color: #e8586e;
  padding: 0.22rem 0.8rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
}

.lightbox-kw:hover {
  background: rgba(181, 22, 52, 0.5);
  border-color: var(--cb-red);
  color: #fff;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-out);
}

.lightbox-close:hover {
  background: var(--cb-red);
  border-color: var(--cb-red);
  color: #fff;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 48px;
  height: 72px;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-out);
}

.lightbox-nav:hover {
  background: var(--cb-red);
  border-color: var(--cb-red);
  color: #fff;
  box-shadow: 0 0 30px rgba(181, 22, 52, 0.3);
}

.lightbox-prev { left: 1.2rem; }
.lightbox-next { right: 1.2rem; }

.lightbox-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lightbox-filename {
  color: rgba(255, 255, 255, 0.18);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 300;
}

/* ── Upload / Formular ───────────────────────────────────────────────────── */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cb-red);
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.8rem;
}

.album-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}

.toggle-btn {
  padding: 0.45rem 1.1rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  transition: all 0.3s var(--ease-out);
}

.toggle-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-secondary);
}

.toggle-btn.active {
  background: var(--cb-red);
  color: #fff;
  border-color: var(--cb-red);
  box-shadow: 0 0 12px rgba(181, 22, 52, 0.2);
}

.dropzone {
  border: 2px dashed var(--border);
  padding: 3.5rem 2rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out);
  margin-bottom: 1.8rem;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--cb-red);
  background: rgba(181, 22, 52, 0.03);
}

.dropzone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.dropzone-icon {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  opacity: 0.4;
  transition: opacity 0.3s var(--ease-out);
}

.dropzone:hover .dropzone-icon {
  opacity: 0.6;
}

.dropzone-text {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.06em;
}

.dropzone-text strong {
  color: var(--cb-red);
  font-weight: 700;
}

.file-count {
  margin-top: 0.6rem;
  color: var(--cb-red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}

.preview-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--border);
  transition: border-color 0.25s var(--ease-out);
}

.preview-grid img:hover {
  border-color: var(--border-hover);
}

.progress-bar {
  width: 100%;
  height: 3px;
  background: var(--border);
  margin-bottom: 1.8rem;
  display: none;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cb-red) 0%, var(--cb-red-hover) 100%);
  animation: progress-anim 1.5s var(--ease-in-out) infinite;
}

@keyframes progress-anim {
  0%   { width: 20%; margin-left: 0; }
  50%  { width: 60%; margin-left: 20%; }
  100% { width: 20%; margin-left: 80%; }
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert-success {
  background: rgba(34, 160, 60, 0.08);
  border: 1px solid rgba(34, 160, 60, 0.2);
  border-left: 3px solid #22a03c;
  color: #5cc96e;
  padding: 0.85rem 1.2rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-bottom: 1.8rem;
}

.alert-error {
  background: rgba(181, 22, 52, 0.08);
  border: 1px solid rgba(181, 22, 52, 0.2);
  border-left: 3px solid var(--cb-red);
  color: #e8586e;
  padding: 0.85rem 1.2rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-bottom: 1.8rem;
}

/* ── Login ───────────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-top: 3px solid var(--cb-red);
  padding: 3.5rem 3rem;
  width: 100%;
  max-width: 420px;
  animation: fadeIn 0.5s var(--ease-out);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 2.8rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--border);
}

.login-logo img {
  height: 54px;
  width: auto;
}

.login-logo-text {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.3;
}

.login-logo-text span {
  display: block;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-top: 0.25rem;
}

.login-box label {
  margin-bottom: 0.5rem;
}

.login-box input {
  margin-bottom: 1.4rem;
}

.login-box .btn {
  width: 100%;
  text-align: center;
  padding: 0.9rem;
  font-size: 0.75rem;
}

/* ── Film Grain Overlay ─────────────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.018;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Blur-Up Image Loading ─────────────────────────────────────────────── */
@keyframes blurUp {
  from { filter: blur(6px) brightness(1.04); transform: scale(1.02); }
  to   { filter: blur(0) brightness(1); transform: scale(1); }
}

.album-cover img,
.photo-item img {
  animation: blurUp 0.6s var(--ease-out) both;
}

/* ── Scroll Reveal ─────────────────────────────────────────────────────── */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.album-wrapper {
  animation: revealUp 0.7s var(--ease-out) both;
}

.album-wrapper:nth-child(1)  { animation-delay: 0s; }
.album-wrapper:nth-child(2)  { animation-delay: 0.06s; }
.album-wrapper:nth-child(3)  { animation-delay: 0.12s; }
.album-wrapper:nth-child(4)  { animation-delay: 0.18s; }
.album-wrapper:nth-child(5)  { animation-delay: 0.24s; }
.album-wrapper:nth-child(6)  { animation-delay: 0.3s; }
.album-wrapper:nth-child(7)  { animation-delay: 0.36s; }
.album-wrapper:nth-child(8)  { animation-delay: 0.42s; }
.album-wrapper:nth-child(n+9) { animation-delay: 0.48s; }

/* ── Image Hover Enhancements ──────────────────────────────────────────── */
.album-cover img {
  filter: brightness(0.95) saturate(0.95);
}

.album-card:hover .album-cover img {
  filter: brightness(1.05) saturate(1.12);
}

.photo-item img {
  filter: brightness(0.95);
}

.photo-item:hover img {
  filter: brightness(1.05) saturate(1.1);
}

/* ── Page Header Accent Line ───────────────────────────────────────────── */
.page-header h1 {
  display: inline-block;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--cb-red);
}

/* ── Reduced Motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  body::after { display: none; }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  nav {
    padding: 0 1.2rem;
    height: 60px;
  }

  .nav-search { display: none; }
  .nav-user { display: none; }

  .main {
    padding: 2rem 1.2rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .albums-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
  }

  .photos-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.35rem;
  }

  .login-box {
    margin: 1rem;
    padding: 2.5rem 2rem;
  }

  .form-card {
    padding: 1.5rem;
  }

  .lightbox-nav {
    width: 38px;
    height: 56px;
  }

  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 1.6rem;
  }

  .albums-grid {
    grid-template-columns: 1fr;
  }

  .photos-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .nav-brand-text {
    display: none;
  }
}
