:root {
  color-scheme: light;
  --bg: #f7f3ef;
  --surface: #ffffff;
  --text: #151515;
  --muted: #6c6c6c;
  --border: #e4e0dc;
  --accent: #ff6b6b;
  --approve: #2bb673;
  --decline: #e03a3a;
  --shadow: 0 20px 45px rgba(25, 16, 10, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #fffdf9 0%, var(--bg) 60%);
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}

.controls {
  margin-bottom: 28px;
}

.controls-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
  flex: 1 1 220px;
}

.field-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.field-input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: "Inter", "Segoe UI", sans-serif;
}

.mode-switch {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: #f0ece7;
  border: 1px solid var(--border);
}

.mode-btn {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.mode-btn.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 6px 16px rgba(25, 16, 10, 0.12);
}

.primary-btn {
  border-radius: 999px;
  border: none;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.status {
  margin: 0;
  min-width: 220px;
  color: var(--muted);
  font-size: 14px;
  flex: 1 1 220px;
}

.hidden {
  display: none;
}

.list-view {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 28px;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.list-title {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 24px;
  margin: 0;
}

.list-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.list-empty {
  padding: 18px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  color: var(--muted);
  text-transform: lowercase;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fdfaf7;
  gap: 16px;
}

.list-username {
  font-weight: 600;
  font-size: 16px;
}

.list-actions {
  display: flex;
  gap: 8px;
}

.list-btn {
  border: 1px solid transparent;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.list-btn.approve {
  background: var(--approve);
  color: #ffffff;
  border-color: transparent;
}

.list-btn.decline {
  background: var(--decline);
  color: #ffffff;
  border-color: transparent;
}

.list-btn.unknown {
  background: rgba(21, 21, 21, 0.08);
  color: var(--text);
  border-color: rgba(21, 21, 21, 0.18);
}

.profile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
}

.profile-header {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.profile-photo-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid transparent;
  display: grid;
  place-items: center;
  background: #f2f2f2;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
  transform: none;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(25, 16, 10, 0.12);
}

.action-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-btn.approve {
  background: rgba(43, 182, 115, 0.14);
  color: var(--approve);
  border-color: rgba(43, 182, 115, 0.35);
}

.action-btn.decline {
  background: rgba(224, 58, 58, 0.14);
  color: var(--decline);
  border-color: rgba(224, 58, 58, 0.35);
}

.action-btn.previous,
.action-btn.skip {
  background: rgba(21, 21, 21, 0.08);
  color: var(--text);
  border-color: rgba(21, 21, 21, 0.18);
}

.profile-main {
  flex: 1;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-handle {
  font-family: "Fraunces", "Times New Roman", serif;
  font-size: 32px;
  margin: 0;
  letter-spacing: 0.3px;
}

.profile-last-posted {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f5f1ec;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.profile-last-posted:empty {
  display: none;
}

.profile-emails {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
  min-height: 20px;
}

.follow-btn,
.message-btn {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 8px 18px;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
}

.follow-btn {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.profile-stats {
  list-style: none;
  display: flex;
  gap: 24px;
  padding: 18px 0 0;
  margin: 0;
}

.profile-stats strong {
  font-weight: 600;
  margin-right: 4px;
}

.profile-bio {
  margin-top: 18px;
  color: var(--muted);
}

.profile-bio p {
  margin: 6px 0;
}

.profile-name {
  color: var(--text);
  font-weight: 600;
}

.profile-link {
  color: #2b5d9a;
  text-decoration: none;
  font-weight: 500;
}

.profile-tabs {
  display: flex;
  gap: 18px;
  margin-top: 36px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.tab {
  background: transparent;
  border: none;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 999px;
}

.tab.active {
  color: var(--text);
  background: #f5f2ee;
}

.profile-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.post {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: linear-gradient(135deg, #f7e9e2, #f0f4f8);
  border: 1px solid #eee7e1;
  overflow: hidden;
  margin: 0;
  position: relative;
}

.post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.post-caption {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  color: #fffdf8;
  font-size: 13px;
  line-height: 1.45;
  background: linear-gradient(180deg, rgba(16, 16, 16, 0.72) 0%, rgba(16, 16, 16, 0.28) 45%, rgba(16, 16, 16, 0.8) 100%);
  overflow: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.post-caption::-webkit-scrollbar {
  width: 6px;
}

.post-caption::-webkit-scrollbar-track {
  background: transparent;
}

.post-caption::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

.post:hover img,
.post:focus-within img {
  filter: blur(3px);
  transform: scale(1.02);
}

.post:hover .post-caption,
.post:focus-within .post-caption {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 980px) {
  .profile-header {
    flex-direction: column;
  }

  .profile-photo-wrap {
    justify-content: space-between;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 32px 16px 60px;
  }

  .controls-form {
    padding: 16px;
  }

  .profile {
    padding: 28px;
  }

  .profile-stats {
    flex-direction: column;
    gap: 8px;
  }

  .profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
