﻿:root {
  color-scheme: light;
  --ink: #101828;
  --muted: #667085;
  --line: #d8e0ec;
  --paper: #ffffff;
  --soft: #f5f8fc;
  --wash: #eef6ff;
  --blue: #246bfd;
  --blue-dark: #164fc7;
  --green: #0e9f6e;
  --red: #e05243;
  --gold: #f5a524;
  --teal: #0891b2;
  --shadow: 0 22px 60px rgba(16, 24, 40, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f8fbff 0, #f3f7fb 420px, #ffffff 900px),
    var(--soft);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 74px;
  padding: 14px clamp(18px, 4vw, 58px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(216, 224, 236, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 20px;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 10px 24px rgba(36, 107, 253, 0.24);
}

.nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

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

.auth-actions,
.hero-actions,
.review-actions,
.admin-actions {
  display: flex;
  gap: 10px;
}

.primary-action,
.secondary-action,
.ghost-button,
.filter,
.google-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 850;
  background: white;
}

.primary-action {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-color: var(--blue);
  box-shadow: 0 14px 28px rgba(36, 107, 253, 0.18);
}

.primary-action:hover {
  transform: translateY(-1px);
}

.secondary-action:hover,
.ghost-button:hover,
.filter:hover {
  border-color: #b9c5d6;
  background: #f8fbff;
}

.ghost-button {
  color: var(--ink);
  background: transparent;
}

.small {
  min-height: 40px;
  padding-inline: 14px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(48px, 7vw, 94px) clamp(18px, 4vw, 58px) 44px;
  background:
    radial-gradient(circle at 82% 18%, rgba(14, 159, 110, 0.14), transparent 28%),
    radial-gradient(circle at 12% 25%, rgba(36, 107, 253, 0.14), transparent 34%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(40px, 5.8vw, 74px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.16;
  letter-spacing: 0;
}

.hero-text {
  max-width: 720px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.72;
}

.hero-actions {
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-stats span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

.hero-stats b {
  color: var(--ink);
}

.auth-preview,
.submit-form,
.tester-panel,
.app-card,
.admin-card,
.detail-shell,
.auth-box {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(216, 224, 236, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-preview {
  padding: 24px;
}

.auth-card-head,
.card-topline,
.panel-head,
.detail-title-row,
.comment div,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-card-head {
  margin-bottom: 18px;
}

.auth-card-head span,
.auth-card-head b {
  font-weight: 900;
}

.google-choice {
  width: 100%;
  color: var(--ink);
  background: #fff;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.mini-fields {
  display: grid;
  gap: 9px;
}

.mini-fields span {
  padding: 12px;
  border: 1px dashed #c8d3e2;
  border-radius: 8px;
  color: var(--muted);
  background: #f8fbff;
}

.auth-preview p,
.tester-panel p {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.filters {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 20px clamp(18px, 4vw, 58px);
  background: white;
  border-block: 1px solid var(--line);
}

.filter {
  min-height: 40px;
  color: var(--muted);
  white-space: nowrap;
}

.filter.active {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

.app-section,
.detail-section,
.workspace,
.admin {
  padding: 48px clamp(18px, 4vw, 58px);
}

.section-heading {
  align-items: end;
  margin-bottom: 24px;
}

.live-badge,
.status-pill,
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.live-badge {
  padding: 9px 13px;
  color: var(--green);
  background: #e8f7f1;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.app-card {
  display: flex;
  flex-direction: column;
  min-height: 384px;
  padding: 18px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.app-card:hover,
.app-card.selected {
  transform: translateY(-3px);
  border-color: rgba(36, 107, 253, 0.36);
  box-shadow: 0 24px 64px rgba(36, 107, 253, 0.13);
}

.app-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  color: white;
  font-weight: 900;
  font-size: 22px;
}

.app-icon.big {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  font-size: 26px;
}

.status-pill {
  padding: 7px 10px;
  color: var(--blue-dark);
  background: #eaf1ff;
}

.app-card h3,
.admin-card h3,
.reaction-list h3 {
  margin: 16px 0 8px;
  font-size: 22px;
}

.app-card p,
.admin-card p,
.detail-main p {
  color: var(--muted);
  line-height: 1.58;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}

.chip {
  padding: 6px 9px;
  color: var(--muted);
  background: #f1f5f9;
}

.rating {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  color: var(--gold);
  font-weight: 900;
}

.rating small,
.detail-score small {
  color: var(--muted);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.detail-section {
  padding-top: 10px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 20px;
  padding: 22px;
}

.detail-title-row {
  justify-content: start;
  align-items: center;
  margin-bottom: 18px;
}

.detail-score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: #fff7e8;
  color: var(--gold);
  font-weight: 900;
}

.detail-score strong {
  color: var(--ink);
  font-size: 30px;
}

.review-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.review-form label:has(textarea),
.review-actions {
  grid-column: 1 / -1;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: 20px;
  background: var(--wash);
}

.submit-form,
.tester-panel,
.admin-card {
  padding: 22px;
}

label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  color: var(--ink);
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: white;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(36, 107, 253, 0.12);
}

textarea {
  min-height: 112px;
  resize: vertical;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
}

.checkbox input {
  width: 18px;
  height: 18px;
}

.full {
  width: 100%;
}

.form-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.tester-steps {
  display: grid;
  gap: 11px;
  margin-top: 18px;
}

.tester-steps span {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-weight: 850;
}

.reaction-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.comment {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.comment strong {
  display: block;
  margin-bottom: 4px;
}

.comment span {
  color: var(--gold);
  font-weight: 900;
}

.comment p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin {
  background: white;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.admin-actions button {
  flex: 1;
}

.auth-modal {
  width: min(92vw, 430px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.auth-modal::backdrop {
  background: rgba(16, 24, 40, 0.38);
  backdrop-filter: blur(5px);
}

.auth-box {
  position: relative;
  padding: 24px;
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 22px;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  padding: 24px clamp(18px, 4vw, 58px);
  color: #a8b3c4;
  border-top: 1px solid #253244;
  background: #101828;
}

.footer strong {
  color: white;
}

@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  .hero,
  .workspace,
  .detail-shell {
    grid-template-columns: 1fr;
  }

  .app-grid,
  .admin-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: stretch;
    gap: 12px;
  }

  .auth-actions,
  .hero-actions,
  .review-actions {
    width: 100%;
  }

  .auth-actions button,
  .hero-actions a,
  .review-actions button {
    flex: 1;
  }

  h1 {
    font-size: 38px;
  }

  .section-heading,
  .detail-title-row {
    align-items: start;
    flex-direction: column;
  }

  .app-grid,
  .admin-grid,
  .review-form {
    grid-template-columns: 1fr;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }
}

/* Vertical app showcase cards */
.app-card {
  min-height: auto;
  padding: 14px;
}

.app-media,
.detail-media {
  position: relative;
  overflow: hidden;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #edf3ff;
}

.app-media {
  aspect-ratio: 9 / 14;
  margin-bottom: 14px;
}

.detail-media {
  aspect-ratio: 9 / 16;
  margin: 12px 0 16px;
  max-height: 620px;
}

.app-media img,
.detail-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.app-media.empty,
.detail-media.empty {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(36, 107, 253, 0.12), transparent 44%),
    linear-gradient(145deg, #ffffff, #eef4ff);
}

.phone-mock {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 62%;
  max-width: 190px;
  aspect-ratio: 9 / 16;
  padding: 18px 12px;
  border-radius: 28px;
  color: white;
  text-align: center;
  background: linear-gradient(160deg, var(--accent), #101828);
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.2);
}

.phone-mock span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 26px;
  font-weight: 900;
}

.phone-mock b {
  font-size: 16px;
}

.phone-mock small {
  color: rgba(255, 255, 255, 0.76);
}

.asset-tools {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.asset-tools label {
  margin: 0;
}

.asset-tools input[type="file"] {
  padding: 10px;
}

@media (max-width: 980px) {
  .asset-tools {
    grid-template-columns: 1fr;
  }
}

/* Compact marketplace layout */
.hero {
  padding-block: 36px 28px;
  gap: 28px;
}

h1 {
  font-size: clamp(34px, 4.4vw, 56px);
}

h2 {
  font-size: clamp(22px, 2.3vw, 31px);
}

.hero-text {
  font-size: 16px;
  line-height: 1.62;
}

.hero-stats {
  margin-top: 18px;
}

.hero-stats span {
  min-height: 36px;
  font-size: 13px;
}

.app-section,
.detail-section,
.workspace,
.admin {
  padding-block: 32px;
}

.app-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.app-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  min-height: 132px;
  padding: 10px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.07);
}

.app-card:hover,
.app-card.selected {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(36, 107, 253, 0.1);
}

.app-media {
  aspect-ratio: auto;
  height: 112px;
  margin: 0;
}

.phone-mock {
  width: 74%;
  border-radius: 16px;
  padding: 10px 6px;
}

.phone-mock span {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 16px;
}

.phone-mock b {
  font-size: 11px;
  line-height: 1.2;
}

.phone-mock small {
  display: none;
}

.app-summary {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card-topline {
  align-items: start;
  gap: 8px;
}

.app-card h3 {
  margin: 0 0 5px;
  font-size: 17px;
  line-height: 1.25;
}

.app-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.status-pill {
  padding: 5px 7px;
  font-size: 10px;
}

.compact-meta {
  margin: 9px 0 8px;
}

.chip {
  padding: 5px 7px;
  font-size: 11px;
}

.list-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.rating {
  gap: 5px;
  font-size: 12px;
}

.compact-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.detail-shell {
  gap: 16px;
  padding: 18px;
}

.detail-media {
  max-height: 520px;
}

@media (max-width: 640px) {
  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .app-media {
    height: 108px;
  }
}

.user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-dark);
  background: #eaf1ff;
  font-size: 13px;
  font-weight: 900;
}

.image-mark {
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.12);
}

.image-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.preview-icon {
  width: 100%;
  max-width: 220px;
  display: block;
  margin: 0 auto 14px;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.14);
}

/* Stronger brand mark */
.brand {
  gap: 12px;
  font-size: 24px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.image-mark {
  border-radius: 12px;
}

@media (max-width: 640px) {
  .brand {
    font-size: 21px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }
}

.danger-button {
  min-height: 30px;
  margin-top: 10px;
  padding: 0 10px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b42318;
  background: #fff1f2;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.admin-grant {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.admin-grant input {
  min-width: 0;
}

@media (max-width: 640px) {
  .admin-grant {
    grid-template-columns: 1fr;
  }
}

.screenshot-preview {
  overflow: hidden;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.screenshot-preview img {
  width: 100%;
  max-height: 520px;
  display: block;
  object-fit: contain;
}

/* Keep app thumbnails uncropped */
.app-media img {
  object-fit: contain;
  padding: 6px;
  background: #f8fbff;
}

.detail-media img {
  object-fit: contain;
  background: #f8fbff;
}

/* Separate square app icons from vertical previews */
.app-card {
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 104px;
}

.app-thumb {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbff;
}

.app-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.app-thumb span,
.app-icon.big span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: white;
  font-weight: 900;
}

.app-icon.big {
  overflow: hidden;
  background: #f8fbff;
  border: 1px solid var(--line);
}

.app-icon.big img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.app-media {
  display: none;
}

.detail-media {
  aspect-ratio: 9 / 16;
}

.detail-media img {
  object-fit: contain;
}

@media (max-width: 640px) {
  .app-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .app-thumb {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }
}

/* Detail page navigation */
.app-card {
  cursor: pointer;
}

.app-card:focus-visible {
  outline: 4px solid rgba(36, 107, 253, 0.22);
  outline-offset: 3px;
}

.compact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-dark);
  background: #eaf1ff;
  font-size: 12px;
  font-weight: 900;
}

.detail-back {
  width: fit-content;
  margin-bottom: 8px;
}

[hidden] {
  display: none !important;
}

.rating-field {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  font-weight: 850;
}

.star-picker {
  display: inline-flex;
  gap: 4px;
}

.star-choice {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: #cbd5e1;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.star-choice.active,
.star-choice:hover,
.star-choice:focus-visible {
  color: var(--gold);
  background: #fff7e8;
}
