/* Glitztype Styles */

:root {
  --primary: #6c5ce7;
  --primary-dark: #5649c9;
  --secondary: #00cec9;
  --dark: #2d3436;
  --light: #f7f9fa;
  --gray: #636e72;
  --border: #ddd;
  --shadow: rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: white;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

header .tagline {
  font-size: 0.9rem;
  color: var(--gray);
  margin-left: 1rem;
}

header .cta-button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
  font-size: 0.9rem;
}

header .cta-button:hover {
  background: var(--primary-dark);
}

header .note {
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 0.25rem;
  display: block;
}

/* Product Section */
#try {
  min-height: calc(100vh - 80px);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.input-area {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 640px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.input-area input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
}

.input-area button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.input-area button:hover {
  background: var(--primary-dark);
}

/* Secondary share link — not a second primary button */
.input-area a#shareLink {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: underline;
  padding: 0.75rem 0.25rem;
}

.input-area a#shareLink:hover {
  color: var(--primary-dark);
}

/* Style Grid */
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  width: 100%;
  max-width: 920px;
}

.style-option {
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem 0.5rem 0.65rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.8rem;
  font-family: inherit;
  color: var(--dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.style-option:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--shadow);
}

.style-option.selected {
  border-color: var(--primary);
  background: #f0f0ff;
  font-weight: 600;
}

.style-thumb {
  width: 100%;
  height: auto;
  background: transparent;
  display: block;
}

/* Preview — transparent canvas, checkerboard so the PNG reads as a sticker */
.preview-container {
  width: 100%;
  max-width: 640px;
  text-align: center;
}

#previewCanvas {
  width: 100%;
  max-width: 640px;
  height: auto;
  border-radius: 4px;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #ececec 25%, transparent 25%),
    linear-gradient(-45deg, #ececec 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ececec 75%),
    linear-gradient(-45deg, transparent 75%, #ececec 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

/* Controls */
.controls {
  display: flex;
  gap: 2rem;
  width: 100%;
  max-width: 640px;
  justify-content: center;
  flex-wrap: wrap;
}

.controls label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.controls select,
.controls input[type="range"],
.controls input[type="color"] {
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
}

.friday-note {
  text-align: center;
  color: var(--gray);
  font-size: 0.85rem;
}

/* Sections */
section {
  padding: 3rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
}

.steps,
.reasons,
.tiers,
.limits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.step,
.reason,
.tier,
.limit {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--shadow);
}

.step h3,
.reason h3,
.tier h3,
.limit h3 {
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.tier ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.tier ul li {
  padding: 0.25rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.tier ul li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary);
}

.tier .tier-button {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--primary);
  color: white;
  padding: 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 1rem;
  transition: background 0.2s;
}

.tier .tier-button:hover {
  background: var(--primary-dark);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background: var(--dark);
  color: white;
  font-size: 0.9rem;
}

footer a {
  color: var(--secondary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  header .tagline {
    margin-left: 0;
  }

  #try {
    padding: 1rem;
    min-height: calc(100vh - 120px);
  }

  .input-area,
  .controls {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .input-area input,
  .input-area button {
    width: 100%;
    max-width: 300px;
  }

  section {
    padding: 2rem 1rem;
  }
}
