/* Eric Meyer's CSS Reset v2.0 | 20110126 | License: none (public domain) */
html, body {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	vertical-align: top;
}

div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: inherit;
	vertical-align: top;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}

body {
	line-height: 1;
}

ol, ul {
	list-style: none;
}

blockquote, q {
	quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* シンプル ニューモーフィズム デザインシステム */
:root {
  --bg-main: #ffffff;
  --bg-surface: #ffffff;
  --shadow-light: #ffffff;
  --shadow-dark: #d1d9e0;
  --text-primary: #2c3e50;
  --text-secondary: #718096;
  --accent-blue: #4299e1;
  --accent-orange: #ed8936;
  --radius: 12px;
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  
  /* ニューモーフィズム シャドウ */
  --shadow-raised: 
    8px 8px 16px var(--shadow-dark),
    -8px -8px 16px var(--shadow-light);
  --shadow-pressed: 
    inset 6px 6px 12px var(--shadow-dark),
    inset -6px -6px 12px var(--shadow-light);
}

* {
  box-sizing: border-box;
  font-size: 62.5%;
}

body {
  font-family: var(--font);
  margin: 0;
  padding: 30px;
  background-color: #f7f7f7;
  color: var(--text-primary);
  font-size: 1.8rem;
  line-height: 1.6;
  min-height: 100vh;
}

h1 {
  text-align: center;
  padding: 25px 20px;
  margin-bottom: 30px;
  /* background: var(--bg-surface); */
  /* border-radius: var(--radius); */
  /* box-shadow: var(--shadow-raised); */
}

h1 span {
  font-size: 1.5rem;
  font-weight: normal;
  color: var(--text-secondary);
  display: block;
  line-height: 1.8;
  margin-top: 10px;
}

textarea {
  width: 100%;
  height: 180px;
  padding: 20px;
  font-size: 1.6rem;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius);
  resize: vertical;
  margin-bottom: 20px;
  background: var(--bg-surface);
  color: var(--text-primary);
  /* box-shadow: var(--shadow-pressed); */
  outline: none;
}

textarea::placeholder {
  color: var(--text-secondary);
}

#view {
  border: none;
  padding: 25px;
  margin-top: 25px;
  background: var(--bg-surface);
  border-radius: var(--radius);
  /* box-shadow: var(--shadow-raised); */
  min-height: 120px;
  overflow-x: auto;
}

#view:empty::after {
  content: 'プレビューエリア';
  color: var(--text-secondary);
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  text-align: center;
}

.BtnBox {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 20px 0;
}

button {
  padding: 15px 25px;
  font-size: 1.8rem;
  font-weight: 500;
  border: none;
  background: #3498db;
  color: #ffffff;
  border-radius: var(--radius);
  cursor: pointer;
  flex: 1;
  /* box-shadow: var(--shadow-raised); */
}

.settings {
  border: none;
  background: var(--bg-surface);
  padding: 25px;
  /* border-radius: var(--radius); */
  /* box-shadow: var(--shadow-raised); */
  margin-bottom: 25px;
  border-radius: 15px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.settings h2 {
  grid-column: 1 / -1;
  margin: 0 0 20px 0;
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.settings label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  color: var(--text-secondary);
  text-align: center;
}

.settings input[type="color"],
.settings input[type="number"] {
  width: 100%;
  height: 40px;
  padding: 8px;
  border: none;
  /* border-radius: 8px; */
  background: var(--bg-surface);
  font-size: 1.4rem;
  font-family: var(--font);
  color: var(--text-primary);
  /* box-shadow: var(--shadow-pressed); */
  /* outline: none; */
}

.settings input[type="color"] {
  cursor: pointer;
  padding: 4px;
}

/* Markdown content styles */
#view h1, #view h2, #view h3 {
  color: var(--accent-blue);
  margin: 20px 0 15px 0;
  font-weight: 600;
}

#view h1 {
  font-size: 2.4rem;
}

#view h2 {
  font-size: 2rem;
}

#view h3 {
  font-size: 1.8rem;
}

#view strong {
  color: var(--accent-orange);
  font-weight: 600;
}

#view code {
  background: var(--bg-surface);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: 'Consolas', monospace;
  font-size: 1.4rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-pressed);
}

#view pre {
  background: var(--bg-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pressed);
  margin: 20px 0;
  overflow-x: auto;
}

#view pre code {
  display: block;
  padding: 20px;
  background: transparent;
  box-shadow: none;
  white-space: pre;
  font-size: 1.3rem;
  line-height: 1.5;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  body {
    padding: 20px;
  }

  h1 {
    padding: 20px;
  }

  .settings {
    padding: 20px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
  }

  .BtnBox {
    flex-direction: column;
    gap: 12px;
  }

  button {
    width: 100%;
  }

  textarea {
    height: 150px;
    padding: 15px;
  }

  #view {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 15px;
  }

  h1 {
    padding: 15px;
  }

  .settings {
    grid-template-columns: 1fr 1fr;
    padding: 15px;
  }

  textarea {
    height: 130px;
  }

  #view {
    padding: 15px;
  }
}