/* Navigation */
.screen {
  animation: pageFadeIn 260ms ease both;
}

.screen[hidden] {
  display: none !important;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  background: linear-gradient(180deg, rgba(20, 16, 12, 0.6), rgba(15, 12, 9, 0.3));
  backdrop-filter: blur(8px);
}

.app-nav__logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-strong);
  cursor: pointer;
  border: none;
  background: none;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.08em;
  transition: color 240ms ease;
}

.app-nav__logo:hover {
  color: var(--accent);
}

.app-nav__menu {
  display: flex;
  list-style: none;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.app-nav__link {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition: color 240ms ease;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.app-nav__link:hover,
.app-nav__link.is-active {
  color: var(--accent-strong);
  border-bottom-color: var(--accent);
}

/* Gallery Screen */
.gallery-screen {
  min-height: calc(100vh - 48px);
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-container {
  width: 100%;
  max-width: 1400px;
}

.gallery-header {
  text-align: center;
  margin-bottom: 48px;
}

.gallery-header h2 {
  font-size: 2.5rem;
  color: var(--accent-strong);
  margin-bottom: 12px;
}

.gallery-header p {
  color: var(--muted);
  font-size: 1.05rem;
}

.gallery-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.gallery-search {
  flex: 1;
  min-width: 250px;
  max-width: 400px;
  padding: 12px 16px;
  background: rgba(33, 27, 20, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}

.gallery-search::placeholder {
  color: var(--muted);
}

.gallery-filter {
  padding: 12px 16px;
  background: rgba(33, 27, 20, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  min-width: 200px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

.gallery-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(26, 20, 15, 0.95), rgba(12, 10, 8, 0.92));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  transition: transform 240ms ease, filter 240ms ease, border-color 240ms ease;
  text-align: left;
}

.gallery-card:hover {
  transform: translateY(-8px);
  filter: brightness(1.08);
  border-color: rgba(212, 175, 55, 0.34);
}

.gallery-card__image {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.18);
}

.gallery-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-card__title {
  font-size: 1.05rem;
  color: var(--accent-strong);
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.04em;
}

.gallery-card__code {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.gallery-card__category {
  font-size: 0.85rem;
  color: var(--text);
  margin: 0;
  opacity: 0.82;
}

/* Card Detail Screen */
.card-detail-screen {
  min-height: calc(100vh - 48px);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-detail-container {
  width: 100%;
  max-width: 1200px;
}

.card-detail__back {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 8px 0;
  transition: color 240ms ease;
  margin-bottom: 32px;
}

.card-detail__back:hover {
  color: var(--accent-strong);
}

.card-detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.card-detail__image-area {
  display: flex;
  justify-content: center;
  position: sticky;
  top: 100px;
}

.card-detail__card {
  width: 100%;
  max-width: 350px;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.3);
}

.card-detail__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-detail__code {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0;
}

.card-detail__name {
  font-size: 2.2rem;
  color: var(--accent-strong);
  margin: 12px 0 8px;
  font-family: 'Cormorant Garamond', serif;
}

.card-detail__category {
  color: var(--accent);
  font-size: 0.9rem;
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-detail__keyword {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 32px;
}

.card-detail__section {
  margin-bottom: 28px;
}

.card-detail__section h3 {
  color: var(--accent-strong);
  font-size: 1.05rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-detail__section p {
  color: var(--text);
  line-height: 1.7;
  margin: 0;
}

.card-detail__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.card-detail__actions button {
  flex: 1;
  min-width: 150px;
}

/* Guide Screen */
.guide-screen {
  min-height: calc(100vh - 48px);
  padding: 48px;
  display: flex;
  justify-content: center;
}

.guide-section ol,
.guide-section ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-container {
  width: 100%;
  max-width: 900px;
}

.guide-container h2 {
  font-size: 2.5rem;
  color: var(--accent-strong);
  margin-bottom: 48px;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
}

.guide-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.guide-section {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.guide-section:last-child {
  border-bottom: none;
}

.guide-section h3 {
  font-size: 1.4rem;
  color: var(--accent-strong);
  margin-bottom: 16px;
  font-family: 'Cormorant Garamond', serif;
}

.guide-section p,
.guide-section li {
  color: var(--text);
  line-height: 1.8;
  font-size: 1rem;
}

.guide-section ul {
  margin: 0;
  padding-left: 24px;
}

.guide-section li {
  margin-bottom: 12px;
}

/* About Screen */
.about-screen {
  min-height: calc(100vh - 48px);
  padding: 48px;
  display: flex;
  justify-content: center;
}

.about-container {
  width: 100%;
  max-width: 900px;
}

.about-container h2 {
  font-size: 2.5rem;
  color: var(--accent-strong);
  margin-bottom: 48px;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.about-section {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.about-section:last-child {
  border-bottom: none;
}

.about-section h3 {
  font-size: 1.4rem;
  color: var(--accent-strong);
  margin-bottom: 16px;
  font-family: 'Cormorant Garamond', serif;
}

.about-section p {
  color: var(--text);
  line-height: 1.8;
  font-size: 1rem;
  margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .card-detail-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .card-detail__image-area {
    position: static;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  .app-nav {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .app-nav__menu {
    flex-direction: column;
    gap: 12px;
  }

  .gallery-controls {
    flex-direction: column;
  }

  .gallery-search,
  .gallery-filter {
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
  }

  .gallery-screen,
  .guide-screen,
  .about-screen,
  .card-detail-screen {
    padding: 24px 16px;
  }

  .guide-container h2,
  .about-container h2,
  .gallery-header h2 {
    font-size: 1.8rem;
  }

  .card-detail__name {
    font-size: 1.6rem;
  }

  .card-detail__actions {
    flex-direction: column;
  }

  .card-detail__actions button {
    width: 100%;
  }
}
