.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 4vh, 48px) 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(96, 165, 250, 0.26), transparent 28%),
    radial-gradient(circle at 86% 14%, rgba(14, 165, 233, 0.18), transparent 30%),
    linear-gradient(135deg, #0f172a 0%, #172554 46%, #eff6ff 46%, #f8fafc 100%);
  isolation: isolate;
}

.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
}

.login-page::before {
  width: 520px;
  height: 520px;
  right: -170px;
  top: -170px;
  background: rgba(37, 99, 235, 0.12);
  filter: blur(2px);
}

.login-page::after {
  width: 360px;
  height: 360px;
  left: 8%;
  bottom: -180px;
  background: rgba(125, 211, 252, 0.14);
}

.login-shell {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 440px;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.login-hero {
  position: relative;
  min-height: 520px;
  padding: 56px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 72%, rgba(59, 130, 246, 0.5), transparent 26%),
    radial-gradient(circle at 14% 18%, rgba(147, 197, 253, 0.22), transparent 30%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.82));
  overflow: hidden;
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: 28px 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(155deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  background-size: 44px 44px, 44px 44px, auto;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -60px 120px rgba(15, 23, 42, 0.18);
}

.login-hero::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -104px;
  bottom: -104px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(191, 219, 254, 0.62), rgba(96, 165, 250, 0.3) 36%, rgba(37, 99, 235, 0) 72%);
  filter: saturate(1.1);
}

.login-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #172554;
  background: linear-gradient(145deg, #fff, #dbeafe);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  letter-spacing: -0.06em;
}

.login-hero-content {
  position: relative;
  z-index: 1;
  max-width: 500px;
  margin-top: 116px;
}

.login-hero h1 {
  font-size: clamp(2.75rem, 4.6vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
  text-wrap: pretty;
  text-shadow: 0 18px 44px rgba(2, 6, 23, 0.28);
}

.login-hero h1 span {
  display: block;
}

.login-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
  padding: 56px 48px;
}

.login-card h2 {
  margin-bottom: 8px;
  font-size: 1.875rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.login-subtitle {
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.login-card .field {
  margin-bottom: 18px;
}

.login-card .field label {
  margin-bottom: 8px;
  color: #334155;
  font-weight: 700;
}

.login-card .field input[type="email"],
.login-card .field input[type="password"] {
  height: 48px;
  padding: 12px 14px;
  border-color: #dbe3ef;
  border-radius: 12px;
  font-size: 0.9375rem;
  background: #f8fafc;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.login-card .field input[type="email"]:focus,
.login-card .field input[type="password"]:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.login-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 18px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.login-meta span:last-child {
  color: #2563eb;
  font-weight: 600;
}

.share-edit-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
}

.share-edit-container {
  width: 100%;
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

.share-edit-container h2 {
  margin-bottom: 24px;
  font-size: 1.25rem;
}

.share-edit-error {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fee2e2;
  color: var(--danger);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.share-thumbnail {
  max-width: 200px;
  max-height: 150px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  transition: opacity 0.2s;
}

.share-thumbnail:hover {
  opacity: 0.85;
}

.image-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 90vw;
  max-height: 90vh;
}

.image-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.image-dialog-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-dialog-content img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
}

.image-dialog-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.login-btn {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 700;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s;
}

.login-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.34);
  transform: translateY(-1px);
}

.login-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.26);
}

.login-error {
  padding: 10px 12px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 10px;
  background: #fef2f2;
  color: var(--danger);
  font-size: 0.875rem;
  margin-bottom: 14px;
}

.login-footnote {
  margin-top: 24px;
  color: #94a3b8;
  font-size: 0.8125rem;
  text-align: center;
}

@media (max-width: 880px) {
  .login-page {
    align-items: flex-start;
    padding: 24px;
    background:
      radial-gradient(circle at 16% 10%, rgba(96, 165, 250, 0.22), transparent 32%),
      linear-gradient(160deg, #0f172a 0%, #172554 38%, #f8fafc 38%, #f8fafc 100%);
  }

  .login-shell {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .login-hero {
    min-height: auto;
    padding: 36px 28px;
  }

  .login-hero::before {
    inset: 20px;
    border-radius: 20px;
  }

  .login-hero-content {
    margin-top: 72px;
  }

  .login-hero h1 {
    font-size: clamp(2.25rem, 12vw, 3.75rem);
  }

  .login-card {
    padding: 36px 28px;
  }
}

@media (min-width: 881px) and (max-height: 700px) {
  .login-hero {
    min-height: auto;
    padding: 36px 48px;
  }

  .login-hero::before {
    inset: 24px;
  }

  .login-hero-content {
    margin-top: 76px;
  }

  .login-hero h1 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
  }

  .login-card {
    padding: 40px 44px;
  }

}
