* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f1115;
  color: #e6e6e6;
  line-height: 1.6;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: #151821;
  padding: 35px 22px;
  border-right: 1px solid #222634;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.sidebar nav {
  margin-top: 35px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar a {
  color: #9fa8b8;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.sidebar a:hover {
  color: white;
  background: #1d2230;
  padding-left: 14px;
}

.sidebar a.active-link {
  color: white;
  background: #1d2230;
  font-weight: 600;
}

.logout-btn {
  background: #1b1f2a;
  color: #cfd6e4;
  border: 1px solid #2a3042;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.logout-btn:hover {
  background: #242938;
  color: white;
}

.main {
  flex: 1;
  padding: 45px 60px;
}

.main h1 {
  margin-top: 0;
  font-size: 28px;
  font-weight: 600;
}

.main p {
  max-width: 760px;
  color: #b8c0d0;
}

.hero-panel {
  background: #1b1f2a;
  border: 1px solid #242938;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 30px;
}

.hero-panel h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 18px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 10px;
}

.card {
  background: #1b1f2a;
  padding: 22px;
  border-radius: 12px;
  border: 1px solid #242938;
  transition: all 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #2d3345;
  background: #1f2432;
}

.card h3 {
  margin: 0 0 10px 0;
  font-size: 17px;
  font-weight: 600;
}

.card p {
  font-size: 14px;
  margin-bottom: 12px;
}

.card a {
  font-size: 13px;
  text-decoration: none;
  color: #7da2ff;
  font-weight: 500;
}

.card a:hover {
  text-decoration: underline;
}

ul {
  margin-top: 15px;
  padding-left: 18px;
  color: #b8c0d0;
}

li {
  margin-bottom: 6px;
}

.feedback-form {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  max-width: 460px;
  gap: 10px;
}

.feedback-form label {
  font-size: 13px;
  color: #9fa8b8;
}

.feedback-form input,
.feedback-form textarea {
  background: #1b1f2a;
  border: 1px solid #2a3042;
  border-radius: 8px;
  padding: 12px;
  color: white;
  font-size: 14px;
}

.feedback-form textarea {
  min-height: 120px;
  resize: vertical;
}

.feedback-form input:focus,
.feedback-form textarea:focus {
  outline: none;
  border-color: #3f6fff;
}

.feedback-form button,
.favorite-btn {
  margin-top: 10px;
  background: #3f6fff;
  border: none;
  border-radius: 8px;
  padding: 11px 14px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.feedback-form button:hover,
.favorite-btn:hover {
  background: #2f5cff;
  transform: translateY(-1px);
}

.favorite-btn {
  margin-top: 8px;
  width: 100%;
}

.favorite-btn.is-favorite {
  background: #6b8cff;
}

.gallery-header {
  margin: 24px 0 20px 0;
}

.gallery-meta {
  color: #b8c0d0;
  font-size: 14px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.gallery-card {
  background: #1b1f2a;
  border: 1px solid #242938;
  border-radius: 12px;
  padding: 18px;
  transition: all 0.15s ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  background: #1f2432;
  border-color: #2d3345;
}

.gallery-card h3 {
  margin: 14px 0 8px 0;
  font-size: 16px;
}

.gallery-card p {
  font-size: 14px;
  margin-bottom: 8px;
}

.gallery-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #2a3042;
}

.placeholder-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, #1e2432, #161b26);
  color: #7f8aa0;
  font-size: 14px;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-wrap {
  width: 100%;
  max-width: 480px;
}

.login-card {
  background: #151821;
  border: 1px solid #242938;
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.login-card h1 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 26px;
}

.login-card p {
  color: #b8c0d0;
}

.error-text {
  min-height: 20px;
  color: #ff8d8d;
  font-size: 13px;
  margin: 0;
}


.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.gallery-empty {
  background: #1b1f2a;
  border: 1px solid #242938;
  border-radius: 12px;
  padding: 24px;
  color: #b8c0d0;
}

.no-scroll {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 10, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  z-index: 9999;
}

.lightbox.hidden {
  display: none;
}

.lightbox-image {
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #d8deea;
  font-size: 14px;
  background: rgba(20, 24, 33, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: 10px;
  max-width: 80vw;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(27, 31, 42, 0.9);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.lightbox-close:hover {
  background: rgba(63, 111, 255, 0.95);
  transform: scale(1.04);
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .main {
    padding: 35px 25px;
  }

  .cards,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}