body {
  font-family: "Helvetica Neue",
    Arial,
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    Meiryo,
    sans-serif;
  margin: 0;
  padding: 10px;
  background-color: #f8f9fa;
}

/* レスポンシブコンテナ */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

#search {
  float: right;
  margin-bottom: 15px;
}

#search input[type="text"] {
  font-size: 120%;
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  transition: border-color 0.3s ease;
}

#search input[type="text"]:focus {
  outline: none;
  border-color: #4a90e2;
}

#search input[type="submit"] {
  font-size: 120%;
  padding: 8px 20px;
  margin-left: 5px;
  background-color: #4a90e2;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#search input[type="submit"]:hover {
  background-color: #357abd;
}

#drawing {
  border-radius: 12px;
  background-color: #ffffff;
  border: 2px solid #e0e0e0;
  clear: both;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 10px;
  margin: 20px auto;
  transition: box-shadow 0.3s ease;
  max-width: 600px;
}

#drawing:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

#moji {
  width: 100%;
  height: auto;
  min-height: 300px;
  max-height: 500px;
}

h1 {
  font-size: 100%;
  margin: 15px 0;
  color: #333;
}

a {
  text-decoration: none;
  color: #4a90e2;
  transition: color 0.3s ease;
}

a:hover {
  color: #357abd;
  text-decoration: underline;
}

p a {
  line-height: 200%;	
}

p.gray {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  margin: 10px 0;
}

div.gray {
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  border-radius: 8px;
  margin: 15px 0;
}

#memo {
  font-size: 70%;
  margin: 5px 0;
  font-weight: bold;
  color: #666;
}

#kanji {
  font-size: 140%;
  font-weight: bold;
  color: #333;
}

#buttons {
  margin: 20px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#buttons button {
  font-size: 110%;
  padding: 12px 24px;
  background-color: #5cb85c;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  flex: 1 1 auto;
  min-width: 140px;
}

#buttons button:hover {
  background-color: #4cae4c;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#buttons button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#pdf-btn {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%) !important;
  border: 2px solid #e85d2d !important;
  font-weight: bold;
  position: relative;
  animation: pulse-glow 2s infinite;
}

#pdf-btn:hover {
  background: linear-gradient(135deg, #ff5722 0%, #ff8c00 100%) !important;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4) !important;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3); }
  50% { box-shadow: 0 4px 15px rgba(255, 107, 53, 0.5); }
}

#footer, #sp {
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
  border-top: 1px solid #e0e0e0;
}

#footer a {
  line-height: 200%;
  margin: 0 10px;
}

.fixed {
  height: 375px;
  overflow: auto;
}

form {
  margin: 15px 0;
}

.input_main {
  font-size: 150%;
  max-width: 200px;
  font-weight: bold;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

.input_main:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.submit_main {
  font-size: 150%;
  padding: 12px 30px;
  border-radius: 8px;
  background-color: #4a90e2;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 10px;
}

.submit_main:hover {
  background-color: #357abd;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.submit_main:active {
  transform: translateY(0);
}

.shotai {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

#imageBox {
  text-align: center;
  margin: 20px 0;
  padding: 15px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#imageBox img {
  border-radius: 10px;
  height: 300px;
  width: 300px;
  max-width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

#imageBox img:hover {
  transform: scale(1.02);
}

#imageBox span {
  display: block;
  font-size: smaller;
  margin-top: 10px;
  color: #666;
}

/* デスクトップ専用の調整 */
@media (min-width: 1024px) {
  #drawing {
    max-width: 500px;
  }

  #moji {
    max-height: 400px;
  }

  .practice-area,
  .writing-tips,
  .kanji-info {
    max-width: 800px;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  main,
  .related-content {
    max-width: 800px;
    margin: 0 auto;
  }
}

/* モバイル対応 */
@media (max-width: 768px) {
  body {
    padding: 5px;
  }
  
  #search {
    float: none;
    text-align: center;
    margin-bottom: 20px;
  }
  
  #search input[type="text"] {
    width: 60%;
    margin-bottom: 10px;
  }
  
  #drawing {
    max-width: 100%;
  }
  
  #buttons {
    flex-direction: column;
  }
  
  #buttons button {
    width: 100%;
    margin: 5px 0;
  }
  
  .input_main {
    max-width: 60%;
  }
  
  .submit_main {
    display: block;
    width: 100%;
    margin: 10px 0;
  }
  
  #imageBox img {
    max-width: 90%;
  }
}

/* アニメーション */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

#image-request {
  display: inline-block;
  padding: 5px 10px;
  background-color: #007bff;
  color: white;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  font-size: small;
}
#image-request:hover {
  background-color: #0056b3;
}


.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* パンくずリスト */
.breadcrumb {
  padding: 12px 15px;
  margin-bottom: 20px;
  background: linear-gradient(to right, #f8f9fa, #ffffff);
  border-radius: 8px;
  border-left: 4px solid #4a90e2;
}

.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.breadcrumb li a {
  color: #4a90e2;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb li a:hover {
  color: #357abd;
  text-decoration: underline;
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  margin: 0 10px;
  color: #999;
  font-size: 16px;
  font-weight: bold;
}

.breadcrumb li[aria-current="page"] {
  color: #333;
  font-weight: 600;
}

/* 練習エリア */
.practice-area {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 漢字情報セクション */
.kanji-info {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.kanji-info h2 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #4a90e2;
}

.kanji-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 15px;
}

.kanji-details dt {
  font-weight: 600;
  color: #555;
  min-width: 70px;
}

.kanji-details dd {
  margin: 0;
  color: #333;
}

/* 検索セクション */
.search-section {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  border-radius: 12px;
  padding: 25px;
  margin: 25px 0;
  text-align: center;
}

/* 関連ツール */
.related-tools {
  background: #e8f4fd;
  border-radius: 10px;
  padding: 15px 20px;
  margin: 20px 0;
  border-left: 4px solid #4a90e2;
}

.related-tools p {
  margin: 0;
}

.related-tools strong {
  color: #2c5282;
}

/* 関連コンテンツ */
.related-content {
  margin-top: 30px;
  margin-bottom: 0;
}

/* 画数別一覧 */
.stroke-list {
  padding: 15px;
}

.stroke-list h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 20px 0 10px;
  padding: 8px 15px;
  background: linear-gradient(to right, #4a90e2, #6fa8dc);
  color: white;
  border-radius: 6px;
  display: inline-block;
}

.stroke-list h2:first-of-type {
  margin-top: 0;
}

.stroke-list p {
  line-height: 2.2;
  margin: 0 0 15px;
}

.stroke-list a {
  display: inline-block;
  padding: 3px 8px;
  margin: 2px;
  background: #f8f9fa;
  border-radius: 4px;
  transition: all 0.2s;
}

.stroke-list a:hover {
  background: #4a90e2;
  color: white;
  text-decoration: none;
}

/* ヘッダー */
header {
  background: #fff;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* フッター */
footer {
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
  background: linear-gradient(to bottom, #f8f9fa, #fff);
  border-top: 2px solid #e9ecef;
  border-radius: 12px 12px 0 0;
}

footer nav {
  margin-bottom: 20px;
}

footer nav a {
  display: inline-block;
  margin: 5px 15px;
  color: #4a90e2;
  font-weight: 500;
}

footer small {
  color: #888;
}

/* 広告エリア */
aside[aria-label="広告"] {
  background: #fafafa;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
  text-align: center;
}

aside[aria-label="広告"] > span {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  color: #999;
}

/* モバイル対応追加 */
@media (max-width: 768px) {
  .breadcrumb {
    padding: 10px 12px;
    margin-bottom: 15px;
  }
  
  .breadcrumb li {
    font-size: 13px;
  }
  
  .breadcrumb li:not(:last-child)::after {
    margin: 0 6px;
  }
  
  .kanji-info {
    padding: 15px;
  }
  
  .kanji-details {
    flex-direction: column;
    gap: 8px;
  }
  
  .stroke-list h2 {
    font-size: 14px;
    padding: 6px 12px;
  }
  
  .search-section {
    padding: 20px 15px;
  }
  
  header {
    padding: 10px;
    margin-bottom: 15px;
  }
  
  footer {
    padding: 20px 15px;
  }
}

footer a {
  line-height: 200%;
  margin: 0 10px;
}


