:root {
  --font-heading: 'Fredoka One', cursive;
}

body[data-lang="RU"],
body[data-lang="GR"] {
  --font-heading: 'Nunito', sans-serif;
  font-style: normal;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #111;
  overflow: hidden;
  font-family: var(--font-heading);
}

body {
  height: 100vh;
}

.game-area {
  position: fixed;
  inset: 0;
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

#overlay .main-menu-screen,
#overlay .lang-selector,
#overlay .main-menu-content,
#overlay .main-menu-start-btn,
#overlay .hero-select-screen,
#overlay .hero-select-modal,
#overlay .hero-select-lang,
#overlay .hero-card,
#overlay .level-complete-overlay,
#overlay .level-complete-modal,
#overlay .level-complete-next,
#overlay .biome-unlock-screen,
#overlay .flash-btn,
#overlay .certificate-screen,
#overlay .certificate-save-btn,
#overlay .certificate-name-overlay,
#overlay .certificate-name-modal,
#overlay .certificate-name-input,
#overlay .certificate-name-next,
#overlay .map-screen,
#overlay .map-header,
#overlay .close-btn,
#overlay .stage-cell,
#overlay .map-icon-btn {
  pointer-events: auto;
}

.main-menu-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, #E0F7FA 0%, #B2EBF2 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lang-selector {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.lang-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.25);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.15s ease, background 0.15s ease;
}

.lang-btn:hover {
  background: rgba(255,255,255,0.45);
  transform: scale(1.08);
}

.lang-btn-active {
  background: rgba(255,255,255,0.85);
  border-color: #4FC3F7;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.main-menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.main-menu-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.main-menu-map-btn {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  padding: 14px 24px;
  border-radius: 16px;
  border: 4px solid rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.35);
  color: #2d2510;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, background 0.2s ease;
}

.main-menu-map-btn:hover {
  background: rgba(255,255,255,0.55);
  transform: scale(1.05);
}

.main-menu-title {
  font-family: var(--font-heading);
  font-style: normal;
  font-size: 4rem;
  font-weight: 400;
  color: #FFFFFF;
  -webkit-text-stroke: 2px #4FC3F7;
  text-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin: 0;
  animation: main-menu-float 3s ease-in-out infinite;
}

@keyframes main-menu-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.main-menu-start-btn {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  padding: 16px 32px;
  border-radius: 16px;
  border: 4px solid rgba(255,255,255,0.9);
  background: #FF6B6B;
  color: white;
  cursor: pointer;
  box-shadow: 0 6px 16px #E65555, 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: main-menu-pulse 2s ease-in-out infinite;
}

.main-menu-start-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px #E65555, 0 6px 14px rgba(0,0,0,0.25);
}

@keyframes main-menu-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.panel {
  pointer-events: auto;
  background: rgba(255,255,255,0.92);
  border-radius: 16px;
  padding: 18px 18px 16px;
  min-width: 260px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  text-align: center;
}

.title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 14px;
}

.primary {
  font-size: 18px;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  background: #3b82f6;
  color: white;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 10px;
  justify-content: center;
}

.hero-btn {
  font-size: 34px;
  border: 0;
  border-radius: 14px;
  padding: 10px 0;
  cursor: pointer;
  background: rgba(0,0,0,0.06);
}

/* Hero Selection screen — Небесный Коралл, как главное меню */
.hero-select-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, #E0F7FA 0%, #B2EBF2 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.hero-select-lang {
  position: absolute;
  top: 16px;
  right: 16px;
}

.hero-select-modal {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  padding: 32px 40px 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.hero-select-title {
  font-family: var(--font-heading);
  font-style: normal;
  font-size: 3rem;
  font-weight: 400;
  color: #FF6B6B;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  margin: 0 0 28px 0;
}

.hero-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  justify-items: center;
  align-items: center;
}

.hero-card {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid white;
  background: linear-gradient(135deg, #e0f7fa 0%, #ffffff 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.hero-card:hover {
  transform: scale(1.15);
  box-shadow: 0 0 25px #ffeb3b;
}

@media (max-width: 768px) {
  .main-menu-title {
    font-size: 2rem;
    -webkit-text-stroke: 1.5px #4FC3F7;
  }
  .main-menu-start-btn {
    font-size: 1.2rem;
    padding: 12px 24px;
  }
  .hero-select-modal {
    padding: 20px 24px 24px;
    max-width: 90vw;
    border-radius: 20px;
  }
  .hero-select-title {
    font-size: 1.75rem;
    margin-bottom: 20px;
  }
  .hero-select-grid {
    gap: 14px;
  }
  .hero-card {
    width: 72px;
    height: 72px;
    font-size: 2.5rem;
    border-width: 3px;
  }
}

.topbar {
  pointer-events: none;
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255,255,255,0.95);
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero-pill {
  pointer-events: none;
  background: rgba(0,0,0,0.25);
  border-radius: 999px;
  padding: 6px 10px;
}

.topbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pill {
  background: rgba(0,0,0,0.25);
  border-radius: 999px;
  padding: 6px 10px;
  color: rgba(255,255,255,0.95);
  font-weight: 800;
}

.sub {
  margin-top: 8px;
  font-size: 16px;
  opacity: 0.9;
}

.badge {
  margin-top: 12px;
  display: inline-block;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: #166534;
  font-weight: 800;
}

.flash-btn {
  pointer-events: auto;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900;
  cursor: pointer;
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.95);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.flash-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Лампочка в топбаре, не поверх лабиринта */
.flash-btn-topbar {
  font-size: 1rem;
  padding: 6px 10px;
  border-radius: 12px;
}

/* Map icon button in topbar */
.map-icon-btn {
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(0,0,0,0.06);
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 12px;
  pointer-events: auto;
  transition: transform 0.15s;
}
.map-icon-btn:active { transform: scale(0.9); }

/* Level Map — Magic Atlas (glassmorphism) */
.map-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, #E0F7FA 0%, #B2EBF2 100%);
  overflow-y: auto;
  padding: 20px;
  pointer-events: auto;
  color: #2c3e50;
}

.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  background: rgba(255,255,255,0.92);
  padding: 10px 18px;
  border-radius: 20px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.06);
}

.map-title {
  font-size: 22px;
  font-weight: 900;
  color: #ff6b6b;
}

.close-btn {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.06);
  color: #ff6b6b;
  font-size: 18px;
  font-weight: 900;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  transition: transform 0.2s;
}
.close-btn:active { transform: scale(0.9); }

.map-level {
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.06);
  border: 2px solid rgba(255,255,255,0.6);
}

/* Level 1 — Forest */
.map-level.biome-1 {
  background: #e8f5e9;
}
.map-level.biome-1 .stage-cell.unlocked {
  background: #fff;
  color: #4caf50;
  border-bottom: 4px solid #4caf50;
  box-shadow: 0 6px 10px rgba(0,0,0,0.08);
}
.map-level.biome-1 .stage-cell.unlocked.completed {
  background: #4caf50;
  color: #fff;
  border-bottom-color: #2e7d32;
}

/* Level 2 — Desert */
.map-level.biome-2 {
  background: #fff8e1;
}
.map-level.biome-2 .stage-cell.unlocked {
  background: #fff;
  color: #ffb300;
  border-bottom: 4px solid #ffb300;
  box-shadow: 0 6px 10px rgba(0,0,0,0.08);
}
.map-level.biome-2 .stage-cell.unlocked.completed {
  background: #ffb300;
  color: #fff;
  border-bottom-color: #ff8f00;
}

/* Level 3 — Ice */
.map-level.biome-3 {
  background: #e1f5fe;
}
.map-level.biome-3 .stage-cell.unlocked {
  background: #fff;
  color: #03a9f4;
  border-bottom: 4px solid #03a9f4;
  box-shadow: 0 6px 10px rgba(0,0,0,0.08);
}
.map-level.biome-3 .stage-cell.unlocked.completed {
  background: #03a9f4;
  color: #fff;
  border-bottom-color: #0288d1;
}

/* Level 4 — Lava */
.map-level.biome-4 {
  background: #ffebee;
}
.map-level.biome-4 .stage-cell.unlocked {
  background: #fff;
  color: #ff5722;
  border-bottom: 4px solid #ff5722;
  box-shadow: 0 6px 10px rgba(0,0,0,0.08);
}
.map-level.biome-4 .stage-cell.unlocked.completed {
  background: #ff5722;
  color: #fff;
  border-bottom-color: #e64a19;
}

/* Level 5 — Space */
.map-level.biome-5 {
  background: #f3e5f5;
}
.map-level.biome-5 .stage-cell.unlocked {
  background: #fff;
  color: #9c27b0;
  border-bottom: 4px solid #9c27b0;
  box-shadow: 0 6px 10px rgba(0,0,0,0.08);
}
.map-level.biome-5 .stage-cell.unlocked.completed {
  background: #9c27b0;
  color: #fff;
  border-bottom-color: #7b1fa2;
}

/* Общие стили кнопок уровней */
.map-level .stage-cell.unlocked {
  cursor: pointer;
  transition: transform 0.15s ease-out, border-bottom-width 0.15s ease-out, background 0.2s, color 0.2s;
}
.map-level .stage-cell.unlocked:hover {
  transform: translateY(-3px);
}
.map-level .stage-cell.unlocked:active {
  transform: translateY(2px);
}

/* Текущий лабиринт — акцент */
.map-level.biome-1 .stage-cell.current { box-shadow: 0 0 0 3px #2e7d32, 0 8px 16px rgba(0,0,0,0.12); }
.map-level.biome-2 .stage-cell.current { box-shadow: 0 0 0 3px #ff8f00, 0 8px 16px rgba(0,0,0,0.12); }
.map-level.biome-3 .stage-cell.current { box-shadow: 0 0 0 3px #0288d1, 0 8px 16px rgba(0,0,0,0.12); }
.map-level.biome-4 .stage-cell.current { box-shadow: 0 0 0 3px #e64a19, 0 8px 16px rgba(0,0,0,0.12); }
.map-level.biome-5 .stage-cell.current { box-shadow: 0 0 0 3px #7b1fa2, 0 8px 16px rgba(0,0,0,0.12); }

.level-label {
  font-size: 16px;
  font-weight: 900;
  margin-bottom: 12px;
  opacity: 0.9;
}

.stage-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stage-cell {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  font-family: inherit;
}

/* Замочки — полупрозрачные */
.stage-cell.locked {
  background: rgba(200, 214, 229, 0.35);
  font-size: 20px;
  color: rgba(0,0,0,0.2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
  opacity: 0.75;
  cursor: default;
}

.stage-num { font-size: 18px; font-weight: 900; line-height: 1; }
.stage-stars { font-size: 12px; margin-top: 4px; letter-spacing: 1px; }

.biome-unlock-screen {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, #E0F7FA 0%, #B2EBF2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.biome-unlock-panel {
  text-align: center;
}

.biome-unlock-btn {
  margin-top: 36px;
}

.panel.big {
  max-width: 520px;
}

.biome-title {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 900;
}

.dots {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.18);
}

.dot-on {
  background: rgba(255,255,255,0.9);
}

/* Level Complete — celebration modal */
.level-complete-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 32, 39, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.level-complete-modal {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 8px solid #FF6B6B;
  border-radius: 40px;
  padding: 28px 36px 32px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: level-complete-border-pulse 1.5s ease-in-out infinite;
}

@keyframes level-complete-border-pulse {
  0%, 100% { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); border-color: #FF6B6B; }
  50% { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 107, 107, 0.5); border-color: #ff8585; }
}

.level-complete-hero {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 8px;
  animation: level-complete-hero-bounce 0.6s ease-in-out infinite;
}

@keyframes level-complete-hero-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.05); }
}

.level-complete-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 400;
  color: #1a1a2e;
  margin: 0 0 12px 0;
}

.level-complete-stars {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.level-complete-star {
  font-size: 2.5rem;
  opacity: 0.3;
  transform: scale(0.6);
}

.level-complete-star.on {
  animation: level-complete-star-ding 0.35s ease-out forwards;
}

.level-complete-star[data-n="1"].on { animation-delay: 0s; }
.level-complete-star[data-n="2"].on { animation-delay: 0.15s; }
.level-complete-star[data-n="3"].on { animation-delay: 0.3s; }

@keyframes level-complete-star-ding {
  0% { transform: scale(0.4); opacity: 0.5; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.level-complete-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.level-complete-stat {
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(255, 239, 200, 0.8), rgba(255, 250, 240, 0.9));
  border-radius: 16px;
  padding: 12px 16px;
  border: 2px solid rgba(255, 193, 7, 0.4);
}

.level-complete-stat-icon {
  font-size: 1.5rem;
}

.level-complete-stat-label {
  font-size: 1rem;
  color: #5d4e37;
}

.level-complete-stat-value {
  font-size: 2rem;
  color: #1a1a2e;
}

.level-complete-hint {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 12px;
}

.level-complete-dots {
  margin-bottom: 20px;
}

.level-complete-next {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  padding: 18px 40px;
  border-radius: 24px;
  border: 4px solid rgba(255, 255, 255, 0.9);
  background: #0091ff;
  color: white;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 145, 255, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: level-complete-next-pulse 2s ease-in-out infinite;
}

.level-complete-next:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 28px rgba(0, 145, 255, 0.5);
}

@keyframes level-complete-next-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Поп-ап ввода имени — в цветах окна «Дальше» (как Level Complete) */
.certificate-name-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 32, 39, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.certificate-name-modal {
  background: rgba(255, 255, 255, 0.95);
  border: 8px solid #FF6B6B;
  border-radius: 40px;
  padding: 32px 40px 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  text-align: center;
  animation: certificate-name-pulse 1.5s ease-in-out infinite;
}

@keyframes certificate-name-pulse {
  0%, 100% { border-color: #FF6B6B; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); }
  50% { border-color: #ff8585; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 107, 107, 0.4); }
}

.certificate-name-prompt {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #2d2510;
  margin: 0 0 20px 0;
  line-height: 1.4;
}

.certificate-name-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif;
  font-size: 1.1rem;
  padding: 12px 16px;
  margin: 0 0 20px 0;
  border: 3px solid #FF6B6B;
  border-radius: 16px;
  outline: none;
}

.certificate-name-input:focus {
  box-shadow: 0 0 0 2px #ff8585;
}

.certificate-name-next {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  padding: 14px 32px;
  border-radius: 16px;
  border: 4px solid rgba(255, 255, 255, 0.9);
  background: #FF6B6B;
  color: white;
  cursor: pointer;
  box-shadow: 0 6px 16px #E65555, 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.certificate-name-next:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px #E65555, 0 6px 14px rgba(0, 0, 0, 0.25);
}

/* Экран сертификата — золотой (пергамент) */
.certificate-screen {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.certificate-paper {
  background: linear-gradient(135deg, #f4e4bc 0%, #e8d5a3 50%, #dfc98a 100%);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E"), linear-gradient(135deg, #f4e4bc 0%, #e8d5a3 50%, #dfc98a 100%);
  border: 12px solid #c9a227;
  border-radius: 8px;
  box-shadow: 0 0 0 4px #e8c547, 0 20px 60px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.3);
  max-width: 560px;
  width: 100%;
  padding: 48px 40px 56px;
  text-align: center;
  position: relative;
}

.certificate-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 700;
  color: #5c4a1a;
  margin: 0 0 28px 0;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.certificate-body {
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  color: #4a3f1a;
  margin: 0 0 8px 0;
}

.certificate-name {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d2510;
  margin: 0 0 12px 0;
}

.certificate-best {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #5c4a1a;
  margin: 0 0 24px 0;
}

.certificate-meta {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  color: #6b5a2e;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.certificate-save-btn {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-top: 24px;
  padding: 14px 32px;
  border-radius: 16px;
  border: 4px solid #c9a227;
  background: linear-gradient(180deg, #e8c547 0%, #c9a227 100%);
  color: #2d2510;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.certificate-save-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.5);
}
