/* ==========================================================================
   style.css - 1980年代風スタイル（ネオングリーン基調 + レトロ感）
   ========================================================================== */

/* ------------------------ ベーススタイル ------------------------ */
body {
  margin: 20px;
  background-color: #1a1a1a;
  color: #e5f5d0;
  font-family: monospace;
}

/* テキスト要素 */
p, pre {
  color: #e5f5d0;
}

h1, h2, h3, h4, h5, h6 {
  color: #39ff14;
  text-shadow: 0 0 5px #39ff14;
}

/* ------------------------ リンクスタイル ------------------------ */
a {
  color: limegreen;
  text-decoration: underline;
}

/* ------------------------ 区切り線（hr） ------------------------ */
hr {
  height: 2px;
  margin: 40px 0;
  border: none;
  background-color: #39ff14;
  box-shadow: 0 0 5px #39ff14;
  animation: glow 1.5s infinite alternate;
}

@keyframes glow {
  from { box-shadow: 0 0 5px #39ff14; }
  to   { box-shadow: 0 0 20px #39ff14; }
}

/* ------------------------ 検索フォーム ------------------------ */
.search-form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.search-input,
.search-button,
.search-engine {
  height: 48px;
  box-sizing: border-box;
}

.search-input,
.search-button,
.search-engine {
  border-radius: 12px;
  background-color: #000;
  border: 2px solid #39ff14;
  color: #39ff14;
  font-family: 'Courier New', Courier, monospace;
  text-shadow: 0 0 5px #39ff14;
}

/* 入力フィールド */
.search-input {
  width: 300px;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  outline: none;
}

.search-input::placeholder {
  color: #1e8010;
  text-shadow: none;
}

.search-input:focus {
  border-color: #39ff14;
  box-shadow: 0 0 10px #39ff14;
}

/* ボタン */
.search-button {
  padding: 0.7rem 1rem;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: box-shadow 0.3s, color 0.3s;
}

.search-button:hover {
  box-shadow: 0 0 15px #39ff14, 0 0 30px #39ff14;
  color: #baff9e;
}

.search-button i {
  pointer-events: none;
  line-height: 1;
}

/* セレクトボックス */
.search-engine {
  padding: 0.7rem 1rem;
  font-size: 1rem;
  appearance: none;
  cursor: pointer;
  box-shadow: inset 0 0 5px #39ff14;
}

/* ------------------------ ASCIIアート ------------------------ */
.ascii-scroll-wrapper {
  overflow-x: hidden;
  position: relative;
}

pre.ascii-art {
  display: block;
  white-space: pre;
  font-size: 18px;
  overflow-x: auto;
}

/* モバイルで自動スクロール */
@media screen and (max-width: 1065px) {
  pre.ascii-art {
    display: inline-block;
    font-size: 24px;
    animation: scroll-left 20s linear infinite;
  }

  @keyframes scroll-left {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
  }
}

/* ------------------------ SNSカード ------------------------ */
.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.sns-card {
  width: 220px;
  padding: 20px;
  background-color: #000;
  border: 2px solid #39ff14;
  text-align: center;
  color: #39ff14;
  font-family: 'Courier New', Courier, monospace;
  text-decoration: none;
  text-shadow: 0 0 5px #39ff14;
  box-shadow: 0 0 10px #39ff14;
  transition: transform 0.2s, box-shadow 0.3s;
  cursor: pointer;
}

.sns-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px #39ff14, 0 0 30px #39ff14;
  color: #baff9e;
}

.sns-card div {
  color: inherit;
}

.sns-card i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  color: #39ff14;
  text-shadow: 0 0 8px #39ff14;
  transition: transform 0.3s, text-shadow 0.3s;
}

.sns-card:hover i {
  transform: scale(1.2);
  text-shadow: 0 0 2px #39ff14;
}

/* ------------------------ ハンバーガーメニュー ------------------------ */
.menu-toggle {
  display: none;
}

.hamburger {
  position: fixed;
  top: 30px;
  right: 20px;
  width: 30px;
  height: 24px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: #39ff14;
  border-radius: 2px;
  transition: 0.3s ease;
  box-shadow: 0 0 5px #39ff14;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 10px; }
.hamburger span:nth-child(3) { top: 20px; }

.menu-toggle:checked + label span:nth-child(1) {
  transform: rotate(45deg);
  top: 10px;
}

.menu-toggle:checked + label span:nth-child(2) {
  opacity: 0;
}

.menu-toggle:checked + label span:nth-child(3) {
  transform: rotate(-45deg);
  top: 10px;
}

/* ------------------------ ナビゲーションメニュー ------------------------ */
nav {
  position: fixed;
  top: 0;
  right: -200px;
  width: 200px;
  height: 100%;
  background: #0a0a0a;
  padding-top: 60px;
  box-shadow: inset 0 0 10px #39ff14;
  transition: 0.3s;
  z-index: 999;
}

.menu-toggle:checked ~ nav {
  right: 0;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

nav ul li:hover {
  background-color: rgba(57, 255, 20, 0.1);
  box-shadow: inset 0 0 5px #39ff14;
}

nav ul li a {
  display: block;
  padding: 20px 0;
  font-size: 1.1rem;
  color: #39ff14;
  text-decoration: none;
  text-shadow: 0 0 5px #39ff14;
  transition: transform 0.3s, color 0.3s;
}

nav ul li a:hover {
  transform: translateX(-10px);
  color: #baff9e;
  padding: 25px 0;
}

/* ------------------------ ヘッダー ------------------------ */
header {
  position: fixed;
  top: 0;
  left: 0;
  height: 60px;
  width: 100%;
  padding: 15px 20px;
  background: #1a1a1a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 0 10px #39ff14;
  z-index: 998;
}

header h1 {
  font-family: 'DotGothic16', sans-serif;
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0.05em;
  color: #39ff14;
}

/* ------------------------ メインコンテンツ ------------------------ */
main {
  padding: 100px 20px 20px;
}

details {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border: 2px solid #39ff14;
  background-color: #000;
  color: #39ff14;
  font-family: 'Courier New', Courier, monospace;
  text-shadow: 0 0 5px #39ff14;
  box-shadow: 0 0 10px #39ff14 inset;
  transition: all 0.3s ease;
}

details[open] {
  background-color: #0a0a0a;
  box-shadow: 0 0 5px #39ff14 inset;
}

summary {
  padding-left: 1.5rem;
  font-weight: bold;
  font-size: 1.3rem;
  position: relative;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

summary::before {
  content: "▶";
  position: absolute;
  left: 0;
  top: 0;
  color: #39ff14;
  text-shadow: 0 0 5px #39ff14;
  transition: transform 0.2s ease;
}

details[open] > summary::before {
  transform: rotate(90deg);
}

/* ------------------------ タスクリスト ------------------------ */
.hidden-task {
  display: none;
}

.restore-mode .hidden-task {
  display: list-item;
  opacity: 0.5;
  text-decoration: line-through;
}

/* タスクリストの見出しとアイコンを同じ行に配置 */
.task-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-bottom: 1rem;
}

.task-buttons button {
  background: none;
  border: 2px solid #39ff14;
  border-radius: 5px;
  padding: 0.5rem;
  cursor: pointer;
  color: #39ff14;
  text-shadow: 0 0 5px #39ff14;
  transition: transform 0.2s, background-color 0.3s;
}

.task-buttons button:hover {
  transform: scale(1.1);
  background-color: #39ff1422;
}

.task-buttons button i {
  font-size: 1.2rem;
  pointer-events: none;
  /* ボタン内のアイコンはクリック対象にしない */
}

ul.task-list {
  list-style: none;
  padding: 0;
}

ul.task-list li {
  margin: 1rem 0;
  display: flex;
  align-items: center;
}

ul.task-list input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  margin-right: 1rem;
  border: 2px solid #39ff14;
  background-color: #000;
  cursor: pointer;
  position: relative;
}

ul.task-list input[type="checkbox"]::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  top: 4px;
  left: 4px;
  background-color: #39ff14;
  display: none;
  box-shadow: 0 0 5px #39ff14;
}

ul.task-list input[type="checkbox"]:checked::before {
  display: block;
}

ul.task-list input[type="checkbox"]:checked + label {
  text-decoration: line-through;
  color: gray;
}

ul.task-list label {
  color: #39ff14;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.1rem;
  text-shadow: 0 0 5px #39ff14;
  cursor: pointer;
}

/* ------------------------ リンクカード ------------------------ */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 2rem;
}

.link-card {
  background-color: #000;
  border: 2px solid #39ff14;
  border-radius: 12px;
  padding: 1em;
  color: #39ff14;
  font-family: 'Courier New', Courier, monospace;
  text-shadow: 0 0 5px #39ff14;
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
  transition: transform 0.2s, box-shadow 0.3s;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px #39ff14, 0 0 30px #39ff14;
  color: #baff9e;
}

.link-card a {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.link-card i {
  font-size: 2rem;
  margin-bottom: 0.5em;
  text-shadow: 0 0 6px #39ff14;
}

.link-card h3 {
  margin: 0.2em 0;
  font-size: 1.1rem;
  min-height: 3.5em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.link-card p {
  font-size: 0.85rem;
  color: #e5f5d0;
  margin: 0;
  padding: 0 0.5em;
  min-height: 3.5em;
}

.favicon {
  width: 32px;
  height: 32px;
  margin-bottom: 0.5em;
  border-radius: 6px;
  display: block;
}

.fallback-icon {
  font-size: 2rem;
  margin-bottom: 0.5em;
  display: none;
  text-shadow: 0 0 6px #39ff14;
}

/* ------------------------ 進捗バー ------------------------ */
#progress-wrapper {
  margin: 2rem 0;
  font-family: 'Courier New', Courier, monospace;
  color: #39ff14;
  text-shadow: 0 0 5px #39ff14;
}

#progress-text {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

#progress-bar-bg {
  width: 100%;
  height: 20px;
  background-color: #111;
  border: 2px solid #39ff14;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 8px #39ff14 inset;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #39ff14, #baff9e);
  border-radius: 10px 0 0 10px;
  transition: width 0.3s ease;
  box-shadow: 0 0 12px #39ff14, 0 0 20px #39ff14;
}

/* ------------------------ 横並びコンテナ ------------------------ */
.container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  /* モバイル対応 */
}

.column {
  flex: 1;
  min-width: 300px;
}

/* ------------------------ 時計表示ブロック ------------------------ */
.seven-seg-clock {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  color: #39ff14;
  background-color: #000;
  padding: 0.7em 1.4em;
  border: 2px solid #39ff14;
  border-radius: 6px;
  box-shadow: 0 0 10px #39ff14;
  display: inline-block;
  margin-top: 1em;
  letter-spacing: 0.1em;
  text-shadow: 0 0 6px #39ff14;
}