body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  background: #e8e8ec;
  margin: 0;
  padding: 20px;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
}

p {
  font-size: 18px;
  color: #333;
}

/* ============================
   Apple風ボタン（共通）
   ============================ */
.btn {
  background: linear-gradient(#fdfdfd, #e8e8e8);
  border: 1px solid #c8c8c8;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 17px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn:hover {
  background: linear-gradient(#ffffff, #f0f0f0);
  border-color: #b0b0b0;
}

.btn:active {
  background: #e2e2e2;
  transform: scale(0.98);
}

/* ============================
   ボタン位置調整ユーティリティ
   ============================ */

/* 共通ボタン（Apple風 + 大きさ） */
button.apple-btn {
  padding: 14px 22px;
  font-size: 18px;
  border-radius: 12px;
  background: #f5f5f7;
  border: 1px solid #c8c8c8;
  cursor: pointer;
  transition: 0.2s;
  
}

/* ボタンを中央に寄せる */
.btn-center {
  display: block;
  margin: 0 auto;
}

/* ログイン・ログアウトを中央横並びにする */
.btn-centertwo {
  display: flex;
  justify-content: center;
  gap: 12px; /* ボタンの間隔 */
}


button.apple-btn:hover {
  background: #ffffff;
  border-color: #b0b0b0;
}

button.apple-btn:active {
  background: #e5e5e5;
}

/* 右下固定 
.btn-bottom-right {
  position: fixed;
  bottom: 20px;
  right: 20px;
}

 左下固定 
.btn-bottom-left {
  position: fixed;
  bottom: 20px;
  left: 20px;
}

 中央配置 
.btn-center {
  display: block;
  margin: 0 auto;
}

 大きさ調整 
.btn-large {
  padding: 16px 26px;
  font-size: 20px;
}

.btn-small {
  padding: 8px 14px;
  font-size: 14px;
}

*/


/* ============================
   入力欄（新規登録・ログイン・銘柄追加）を大きく見やすく
   ============================ */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
#stock-symbol,
#stock-memo {
  width: 100%;
  font-size: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid #666;
  box-sizing: border-box;
  margin-bottom: 16px;
  background: #fff;
}

/* 銘柄カード */
.stock-item {
  background: #ffffff;
  padding: 18px;
  margin-bottom: 14px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  position: relative; /* ボタンを右下に置くため */
}

/* 銘柄名（大きく） */
.stock-item .symbol {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 6px;
  display: block;
}

/* メモ（少し小さめ） */
.stock-item .memo {
  font-size: 18px;
  color: #555;
  white-space: pre-wrap;
  margin-bottom: 30px; /* ボタンのスペース確保 */
}

/* 編集・削除ボタンをカード右下に固定 */
.stock-item .actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}

.stock-item .actions button {
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
}

/* ニュース関連 */
main {
  display: flex;
  gap: 20px;
}

#news-area {
  width: 35%;
}

#main-area {
  width: 65%;
}

/* ニュースエリア全体 */
#news-area {
  width: 35%;
  position: sticky;
  top: 20px;
  height: 80vh; /* 画面の80%の高さに固定 */
  overflow-y: auto; /* 中だけスクロール */
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ニュースリスト */
#news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ニュース1件ごとのカード */
#news-list li {
  background: #fafafa;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid #e5e5e5;
  transition: background 0.2s, transform 0.2s;
}

/* カテゴリボタンの基本 */
#news-categories > button {
  padding: 6px 10px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

/* ホバー */
#news-categories button:hover {
  opacity: 0.8;
}

/* active（選択中） */
#news-categories button.active {
  color: #fff;
}

/* カテゴリ別カラー */
#news-categories button[data-cat="5"].active { background: #3b82f6; border-color: #2563eb; } /* 経済：青 */
#news-categories button[data-cat="6"].active { background: #22c55e; border-color: #16a34a; } /* 国際：緑 */
#news-categories button[data-cat="1"].active { background: #ef4444; border-color: #dc2626; } /* 社会：赤 */
#news-categories button[data-cat="2"].active { background: #a855f7; border-color: #9333ea; } /* 科学文化：紫 */
#news-categories button[data-cat="7"].active { background: #f97316; border-color: #ea580c; } /* スポーツ：橙 */

/* ホバー時のアニメーション */
#news-list li:hover {
  background: #f0f8ff;
  transform: translateY(-2px);
}

/* タイトル */
#news-list li strong {
  font-size: 15px;
  line-height: 1.4;
  display: block;
  margin-bottom: 6px;
}

/* 日付 */
#news-list li small {
  color: #666;
  font-size: 12px;
}

#news-categories {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

#news-categories button {
  padding: 6px 10px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

#news-categories button:hover {
  background: #e8f2ff;
}

#news-categories button.active {
  background: #d0e7ff;
  border-color: #7bb3ff;
}

