:root {
  /* Cute Pop Colors */
  --bg-color: #fff0f5;
  /* ほんのりピンク */
  --panel-bg: #ffffff;
  --text-primary: #4a4a4a;
  --text-secondary: #ff7bac;
  --accent-color: #ff5e94;
  --accent-hover: #ff3377;
  --accent-light: #ffd6e4;

  /* Shapes & Shadows */
  --panel-radius: 32px;
  --btn-radius: 50px;
  --shadow-soft: 0 10px 30px rgba(255, 94, 148, 0.15);
  --shadow-solid: 0 6px 0 rgba(255, 94, 148, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  background-color: var(--bg-color);
  background-image: radial-gradient(var(--accent-light) 2px, transparent 2px);
  background-size: 30px 30px;
  /* ドット柄の背景 */
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Animations */
.background-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
  animation: floatPop 15s infinite ease-in-out alternate;
}

.orb-1 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #ffb6c1, #ffd6e4);
  top: -50px;
  left: -50px;
}

.orb-2 {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, #fffacd, #ffe7a0);
  bottom: 10%;
  right: -50px;
  animation-delay: -3s;
}

.orb-3 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #e0ffff, #b0e0e6);
  top: 40%;
  left: 30%;
  animation-delay: -7s;
}

@keyframes floatPop {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }

  50% {
    transform: translate(30px, 40px) scale(1.05) rotate(10deg);
  }

  100% {
    transform: translate(-20px, -30px) scale(0.95) rotate(-10deg);
  }
}

/* Typography & Layout */
.container {
  width: 100%;
  max-width: 800px;
  padding: 2rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

header {
  text-align: center;
  margin-bottom: 0.5rem;
}

.glass-text {
  font-family: 'Fredoka', 'M PLUS Rounded 1c', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  text-shadow: 3px 3px 0 var(--accent-light);
  letter-spacing: -0.01em;
}

.subtitle {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #ff5e94, #ff9966);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.description {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  background: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 20px;
  display: inline-block;
  box-shadow: var(--shadow-soft);
  border: 2px dashed var(--accent-light);
}

/* Main Panel */
.glass-panel {
  background: var(--panel-bg);
  border-radius: var(--panel-radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-soft);
  border: 4px solid #fff;
}

/* Input Area */
.input-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  position: relative;
}

input[type="text"] {
  flex: 1;
  background: #fdfdfd;
  border: 3px solid var(--accent-light);
  border-radius: var(--btn-radius);
  padding: 1.2rem 1.5rem;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  outline: none;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.02);
}

input[type="text"]:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(255, 94, 148, 0.2);
  transform: translateY(-2px);
}

input[type="text"]::placeholder {
  color: #c4c4c4;
  font-weight: 500;
}

.primary-btn {
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: var(--btn-radius);
  padding: 0 2.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 0 #cc3a6b;
  position: relative;
  overflow: hidden;
}

.primary-btn:hover {
  background: var(--accent-hover);
  transform: translateY(2px);
  box-shadow: 0 4px 0 #cc3a6b;
}

.primary-btn:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 #cc3a6b;
}

/* Loader */
.loader {
  width: 24px;
  height: 24px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  display: inline-block;
  margin-left: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Preview Section */
.section-title {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: "✨";
}

.preview-container {
  background: #fffafa;
  border-radius: 24px;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  border: 3px dashed var(--accent-light);
  margin-bottom: 2rem;
  position: relative;
}

.dummy-btn {
  /* Default Styles */
  background: #f0f0f0;
  color: #888;
  border: none;
  padding: 1.2rem 3rem;
  font-size: 1.2rem;
  font-weight: 800;
  font-family: 'M PLUS Rounded 1c', inherit;
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
  position: absolute;
  bottom: 1.5rem;
}

.keyword-tag {
  background: var(--accent-light);
  color: var(--accent-hover);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 0 rgba(255, 94, 148, 0.2);
}

/* Actions */
.actions-section {
  display: flex;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.share-btn {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 1rem 3rem;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.2s ease;
  box-shadow: 0 6px 0 #333, 0 10px 20px rgba(0, 0, 0, 0.1);
}

.share-btn:hover:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 4px 0 #333, 0 8px 15px rgba(0, 0, 0, 0.2);
}

.share-btn:active:not(:disabled) {
  transform: translateY(6px);
  box-shadow: 0 0 0 #333;
}

.share-btn:disabled {
  background: #ccc;
  box-shadow: 0 6px 0 #a0a0a0;
  color: #fff;
  cursor: not-allowed;
}

/* Code Section */
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.copy-btn {
  background: #fff;
  color: var(--accent-color);
  border: 2px solid var(--accent-light);
  border-radius: 20px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 3px 0 var(--accent-light);
}

.copy-btn:hover:not(:disabled) {
  background: var(--accent-light);
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--accent-light);
}

.copy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: translateY(3px);
}

.glass-inset {
  background: #2a2a2a;
  border-radius: 16px;
  padding: 1.5rem;
  overflow-x: auto;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.2);
}

pre {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.95rem;
  color: #ffb6c1;
  line-height: 1.6;
  margin: 0;
}

/* Error Message */
.error-message {
  margin-top: 1rem;
  padding: 1rem;
  background: #ffe3e3;
  border: 2px solid #ff9999;
  border-radius: 16px;
  color: #d63031;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

/* Ad Section */
.ad-panel {
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.ad-placeholder-text {
  color: #ccc;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.ad-space {
  width: 100%;
  max-width: 728px;
  height: 90px;
  background: #f9f9f9;
  border-radius: 12px;
  border: 2px dashed #eaeaea;
}

/* Responsive */
@media (max-width: 600px) {
  .input-group {
    flex-direction: column;
  }

  .primary-btn {
    padding: 1.2rem;
  }

  .glass-panel {
    padding: 1.5rem;
  }

  .glass-text {
    font-size: 2.5rem;
  }

  .dummy-btn {
    width: 100%;
  }
}