@font-face {
  font-family: 'MyCustomFont';
  src: url('fonts/Segoe UI/seguisb.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=DM+Mono:wght@400;500&display=swap');

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

:root {
  --bg-primary: #0e0e11;
  --bg-secondary: #161619;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text-primary: #f0ede8;
  --text-secondary: rgba(255, 255, 255, 0.5);
  --text-tertiary: rgba(255, 255, 255, 0.3);
  --accent: #c9a84c;
  --accent-dim: rgba(201, 168, 76, 0.15);
  --accent-glow: rgba(201, 168, 76, 0.08);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-circle: 0 2px 12px rgba(0, 0, 0, 0.2);
  --shadow-circle-lg: 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-btn: 0 4px 20px rgba(201, 168, 76, 0.25);
  --glow-top: rgba(201, 168, 76, 0.04);
  --glow-bottom: rgba(201, 168, 76, 0.02);
}

[data-theme="light"] {
  --bg-primary: #f5f2ed;
  --bg-secondary: #eae6df;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-card-hover: rgba(255, 255, 255, 0.9);
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(0, 0, 0, 0.12);
  --text-primary: #1a1a1a;
  --text-secondary: rgba(0, 0, 0, 0.55);
  --text-tertiary: rgba(0, 0, 0, 0.35);
  --accent: #8B6914;
  --accent-dim: rgba(139, 105, 20, 0.1);
  --accent-glow: rgba(139, 105, 20, 0.06);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
  --shadow-circle: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-circle-lg: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-btn: 0 4px 16px rgba(139, 105, 20, 0.2);
  --glow-top: rgba(139, 105, 20, 0.03);
  --glow-bottom: rgba(139, 105, 20, 0.015);
}

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--glow-top) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, var(--glow-bottom) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 28px 100px;
}


.header {
  text-align: center;
  margin-bottom: 48px;
  animation: fadeUp 0.6s ease-out;
}

.title {
  font-family: "DM Sans", sans-serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  line-height: 1.4;
}

.title-accent {
  display: block;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-top: 2px;
}

.subtitle {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-tertiary);
  font-weight: 400;
  letter-spacing: 0.01em;
}


.input-section {
  display: flex;
  justify-content: center;
  margin-bottom: 56px;
  animation: fadeUp 0.6s ease-out 0.1s both;
}

.initials-form {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 60px;
  padding: 6px 6px 6px 8px;
  backdrop-filter: blur(20px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.initials-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim), 0 8px 32px rgba(0, 0, 0, 0.15);
}

.initials-form input {
  width: 160px;
  padding: 12px 20px;
  font-size: 16px;
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  outline: none;
}

.initials-form input::placeholder {
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 400;
}

.btn {
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  padding: 12px 28px;
  border-radius: 60px;
}

.btn-primary:hover {
  background: #d4b45a;
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-small {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
}

.btn-download {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-download:hover {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn);
}


.section {
  margin-bottom: 56px;
}

.section-title {
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
  color: var(--accent);
}

.section-desc {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
  font-weight: 400;
}


.presets-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  animation: fadeUp 0.6s ease-out 0.2s both;
}

@media (max-width: 640px) {
  .presets-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 400px) {
  .presets-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.preset-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 10px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  backdrop-filter: blur(10px);
}

.preset-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.preset-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.preset-logo {
  position: relative;
  width: 72px;
  height: 72px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.preset-card:hover .preset-logo {
  transform: scale(1.05);
}

.preset-circle {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: var(--shadow-circle);
}

.preset-pair {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "MyCustomFont", "Segoe UI", sans-serif;
  font-size: 29px;
  font-weight: 600;
  line-height: 1;
  padding-bottom: 3px;
}

.preset-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


.custom-area {
  display: flex;
  align-items: center;
  gap: 48px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  animation: fadeUp 0.6s ease-out 0.3s both;
}

@media (max-width: 540px) {
  .custom-area {
    flex-direction: column;
    gap: 28px;
    padding: 28px 24px;
  }
}

.custom-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo {
  position: relative;
  width: 111px;
  height: 111px;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.04);
}

.circle {
  position: absolute;
  inset: 0;
  background: #F8EACD;
  border-radius: 50%;
  box-shadow: var(--shadow-circle-lg);
}

.letter-pair {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "MyCustomFont", "Segoe UI", sans-serif;
  font-size: 45px;
  font-weight: 600;
  color: #775717;
  line-height: 1;
  padding-bottom: 5px;
}

.custom-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.color-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.color-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-input {
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 40px;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 3px;
  background: var(--bg-secondary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.color-input:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-input::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.color-input::-moz-color-swatch {
  border: none;
  border-radius: 6px;
}

.color-hex {
  font-size: 13px;
  font-family: "DM Mono", "Consolas", "SF Mono", monospace;
  color: var(--text-tertiary);
  min-width: 68px;
  letter-spacing: 0.02em;
}

.btn-download-custom {
  margin-top: 4px;
  width: 100%;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  font-size: 14px;
}


.faq-section {
  animation: fadeUp 0.6s ease-out 0.4s both;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item[open] {
  border-color: var(--border-hover);
}

.faq-question {
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color 0.2s;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 18px;
  font-weight: 400;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item[open] .faq-question::after {
  content: '−';
  color: var(--accent);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-answer {
  padding: 0 20px 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}


.footer {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.footer p {
  font-size: 13px;
  color: var(--text-tertiary);
}


.theme-toggle {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 100;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  transform: scale(1.05);
}

.theme-icon {
  width: 18px;
  height: 18px;
  transition: opacity 0.3s, transform 0.3s;
  position: absolute;
}

.theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}

.theme-icon-moon {
  opacity: 0;
  transform: rotate(-90deg);
}

[data-theme="light"] .theme-icon-sun {
  opacity: 0;
  transform: rotate(90deg);
}

[data-theme="light"] .theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}

body,
body::before,
.page,
.initials-form,
.initials-form input,
.preset-card,
.custom-area,
.color-input,
.theme-toggle,
.btn-primary,
.btn-download,
.section-title,
.section-desc,
.preset-label,
.color-label,
.color-hex,
.subtitle,
.title,
.title-accent {
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

[data-theme="light"] .btn-primary:hover {
  background: #a07b1a;
}


@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}