/* リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #f7f7f7;
  color: #333;
  line-height: 1.6;
  padding: 1rem;
}

/* ヘッダー */
h1 {
  text-align: center;
  font-size: 2rem;
  color: #4CAF50;
  margin-bottom: 1rem;
}

/* メインエリア */
main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.grid-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 800px;
  width: 100%;
}

/* エリアスタイル */
.code-area {
  background: #fff;
  padding: 1rem;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

textarea#code {
  width: 100%;
  height: 200px;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  resize: vertical;
  font-family: 'Courier New', Courier, monospace;
}

/* ボタンエリア */
.button-area {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  border-radius: 5px;
  font-size: 1rem;
  transition: background-color 0.3s;
}

button:disabled {
  background-color: #aaa;
  cursor: not-allowed;
}

button:hover:enabled {
  background-color: #45a049;
}

/* 入力・出力エリア */
.input-area, .output-area {
  background: #fff;
  padding: 1rem;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

textarea {
  width: 100%;
  height: 100px;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  resize: vertical;
  font-family: 'Courier New', Courier, monospace;
}

textarea[disabled] {
  background-color: #f7f7f7;
  color: #888;
  cursor: not-allowed;
}

/* 詳細エリア */
.details-container {
  text-align: start;
  background: #fff;
  padding: 1rem;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.details-container p {
  margin-bottom: 1rem;
}

.details-container a {
  text-decoration: none;
  color: #4CAF50;
  font-weight: bold;
}

.details-container a:hover {
  text-decoration: underline;
}
