* {
  box-sizing: border-box;
}

:root {
  --purple: #833ab4;
  --pink: #e1306c;
  --red: #fd1d1d;
  --orange: #f77737;
  --yellow: #fcaf45;
  --text: #181818;
  --muted: #777;
  --border: #e5e5e5;
  --background: #f7f7f8;
}

body {
  margin: 0;

  background: var(--background);

  color: var(--text);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
}

.app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: auto;
  background: white;
}

.hero {
  padding: 35px 24px 30px;

  text-align: center;

  color: white;

  background:
    linear-gradient(
      135deg,
      var(--purple),
      var(--pink),
      var(--orange),
      var(--yellow)
    );
}

.instagram-logo {
  width: 64px;
  height: 64px;

  margin: 0 auto 15px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: white;

  color: var(--purple);

  border-radius: 18px;

  font-size: 40px;
  font-weight: bold;
}

.hero h1 {
  margin: 0 0 8px;

  font-size: 25px;
}

.hero p {
  margin: 0;

  font-size: 15px;
}

.content {
  padding: 24px 20px 35px;
}

.field {
  margin-bottom: 23px;
}

label {
  display: block;

  margin-bottom: 9px;

  font-weight: 650;

  font-size: 15px;
}

label span {
  color: #999;

  font-size: 12px;

  font-weight: 400;
}

input[type="text"],
textarea {
  width: 100%;

  padding: 14px;

  border: 1px solid var(--border);

  border-radius: 12px;

  outline: none;

  font: inherit;
}

textarea {
  min-height: 135px;

  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--purple);

  box-shadow:
    0 0 0 3px
    rgba(131, 58, 180, 0.08);
}

.counter {
  text-align: right;

  color: #999;

  font-size: 12px;

  margin-top: 5px;
}

.stars {
  display: flex;

  justify-content: center;

  gap: 5px;

  margin-top: 5px;
}

.stars button {
  padding: 2px;

  border: 0;

  background: none;

  color: #ddd;

  font-size: 45px;

  line-height: 1;

  cursor: pointer;
}

.stars button.active {
  color: #ffc107;
}

.rating-label {
  text-align: center;

  min-height: 20px;

  color: #777;

  font-size: 13px;
}

.photo-upload {
  min-height: 120px;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: 5px;

  border: 2px dashed #ddd;

  border-radius: 14px;

  cursor: pointer;

  color: #555;
}

.camera {
  font-size: 28px;
}

.photo-upload small {
  color: #999;
}

.photo-preview {
  width: 100%;

  max-height: 300px;

  margin-top: 12px;

  object-fit: cover;

  border-radius: 12px;
}

.consent {
  display: flex;

  align-items: flex-start;

  gap: 10px;

  color: #666;

  font-size: 13px;

  line-height: 1.4;

  cursor: pointer;
}

.consent input {
  width: 19px;
  height: 19px;

  flex-shrink: 0;

  margin-top: 1px;
}

.primary,
.instagram-button,
.secondary {
  width: 100%;

  border: 0;

  border-radius: 13px;

  padding: 16px;

  font-size: 16px;

  font-weight: 700;

  cursor: pointer;
}

.primary {
  margin-top: 20px;

  color: white;

  background:
    linear-gradient(
      90deg,
      var(--purple),
      var(--pink),
      var(--orange)
    );
}

.primary:disabled {
  opacity: .45;

  cursor: not-allowed;
}

.instagram-button {
  color: white;

  background:
    linear-gradient(
      90deg,
      var(--purple),
      var(--pink),
      var(--orange)
    );

  margin-top: 15px;
}

.instagram-button span {
  margin-right: 7px;

  font-size: 20px;
}

.secondary {
  margin-top: 10px;

  color: var(--purple);

  background: #f4eef8;
}

.text-button {
  width: 100%;

  margin-top: 16px;

  padding: 10px;

  border: 0;

  background: none;

  color: #666;

  cursor: pointer;
}

.privacy,
.note {
  margin: 16px 5px 0;

  color: #999;

  text-align: center;

  font-size: 12px;

  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.success-icon {
  width: 65px;
  height: 65px;

  margin: 5px auto 18px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #e9f9ef;

  color: #20a052;

  font-size: 30px;

  font-weight: bold;
}

#instagramScreen {
  text-align: center;
}

#instagramScreen h2 {
  margin: 0 0 8px;
}

.intro {
  color: #666;

  line-height: 1.5;
}

.instagram-preview {
  margin-top: 22px;

  overflow: hidden;

  text-align: left;

  border: 1px solid #ddd;

  border-radius: 14px;

  background: white;
}

.post-header {
  display: flex;

  align-items: center;

  gap: 10px;

  padding: 12px;
}

.avatar {
  width: 38px;
  height: 38px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 50%;

  color: white;

  background:
    linear-gradient(
      135deg,
      var(--purple),
      var(--pink),
      var(--orange)
    );

  font-size: 11px;
}

.post-photo {
  display: none;

  width: 100%;

  max-height: 350px;

  object-fit: cover;
}

.post-body {
  padding: 14px;
}

.preview-stars {
  margin-bottom: 7px;

  font-size: 17px;
}

.preview-feedback {
  line-height: 1.5;

  font-size: 15px;

  white-space: pre-wrap;

  overflow-wrap: anywhere;
}

.preview-tag {
  margin-top: 10px;

  color: #3578e5;

  font-weight: 600;
}

.share-instructions {
  margin-top: 20px;

  padding: 15px;

  text-align: left;

  border-radius: 12px;

  background: #f7f7f8;

  line-height: 1.5;

  font-size: 14px;
}

.done {
  padding: 45px 20px;

  text-align: center;
}

footer {
  padding: 20px;

  border-top: 1px solid #eee;

  text-align: center;

  color: #999;

  font-size: 12px;
}
