/* 新台リスト（グリッド表示） */
/* =========================================
   New Slot List - Minimal Tile Grid (Instagram Style)
   ========================================= */

.new-slot-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  /* Minimal gap */
  margin-top: 20px;
  overflow: visible;
}

.new-slot-item {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  /* Aspect Ratio 1:1 */
  overflow: hidden;
  border-radius: 0;
  /* No radius for tiled look */
  background: #f0f0f0;
  box-shadow: none;
  /* No shadow */
  margin: 0;
}

/* Hover effect */
.new-slot-item:hover {
  transform: none;
  box-shadow: none;
}

/* Ensure content fills the square container */
.new-slot-item .thumbnail-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  aspect-ratio: auto !important;
  /* Reset specific ratio logic */
}

.new-slot-item .thumbnail-container .machine-thumbnail,
.new-slot-item .thumbnail-container img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  transition: transform 0.3s ease;
  max-width: none !important;
  max-height: none !important;
}

.new-slot-item:hover .thumbnail-container img {
  transform: scale(1.1);
}

/* Title Overlay with Gradient */
.new-slot-item p {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  margin: 0;
  /* 左側のパディングを 4px から 10px〜15px 程度に広げると綺麗に見えます */
  padding: 30px 4px 4px 12px;

  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
  color: #fff;
  font-size: 2.125rem;
  font-weight: 1000;

  /* center から left に変更 */
  text-align: left;

  line-height: 1.2;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  z-index: 10;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Favorite Button Positioning */
.favorite-btn-overlay {
  position: absolute !important;
  top: 4px;
  right: 4px;
  /* Right align looks better on tiles */
  left: auto !important;
  width: auto !important;
  height: auto !important;
  z-index: 20;
  background: none !important;
  padding: 0 !important;
  border: none !important;
}

/* Fitted Switch Button Adjustments for Overlay */
.fitted-switch-btn {
  width: 28px !important;
  height: 48px !important;
  transform: scale(0.8);
  /* Scale down slightly for tiles */
  transform-origin: top right;
}


/* スマホ表示用の調整（600px以下）- グリッド3列維持 */
/* --- Mobile Adjustments Minimal Tile Grid (<600px) --- */
@media screen and (max-width: 600px) {
  .new-slot-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5px;
    /* Tighter gap on mobile */
    margin-top: 15px;
    padding: 0;
    /* Full bleed */
    overflow-x: hidden;
  }

  .new-slot-item {
    padding-bottom: 100%;
    /* Keep square */
    width: 100% !important;
    display: block;
    min-width: 0 !important;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
    background: #f4f4f4;
  }

  .new-slot-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  }

  /* Reset thumbnail container to fill the square */
  .thumbnail-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
  }

  .thumbnail-container .machine-thumbnail,
  .thumbnail-container img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    object-fit: cover !important;
    max-width: none !important;
    max-height: none !important;
  }

  /* Text Overlay adjustments */
  .new-slot-item p {
    font-size: 13px;
    /* 左側に少し余白（例: 10px）を作るように調整 */
    padding: 20px 2px 2px 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);

    /* ここを center から left に変更 */
    text-align: left;

    bottom: 0;
    display: block;
    align-items: unset;
    justify-content: unset;
    white-space: normal;
    text-overflow: clip;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    position: absolute;
    left: 0;
    right: 0;
    margin: 0;
    max-height: none;
  }

  .favorite-btn-overlay {
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    position: absolute !important;
    /* Force absolute positioning */
    top: 5px;
    /* Adjust top spacing */
    left: 5px;
    /* Adjust left spacing */
    z-index: 5;
  }

  /* 譁ｰ縺励＞縺頑ｰ励↓蜈･繧翫�繧ｿ繝ｳ��itted-switch-btn�峨�繧ｹ繝槭�迚郁ｪｿ謨ｴ */
  .fitted-switch-btn {
    width: 32px !important;
    height: 51px !important;
    padding: 3px 2px !important;
    gap: 1px !important;
  }

  .fitted-switch-btn .bookmark-icon {
    width: 16px !important;
    height: 16px !important;
  }

  .fitted-switch-btn .label-text {
    font-size: 7px !important;
    margin: 1px 0 !important;
  }

  .fitted-switch-btn .toggle-switch {
    width: 20px !important;
    height: 11px !important;
  }

  .fitted-switch-btn .toggle-switch::after {
    width: 8px !important;
    height: 8px !important;
    top: 1.5px !important;
    left: 1.5px !important;
  }

  .fitted-switch-btn.is-active .toggle-switch::after {
    transform: translateX(8px) !important;
  }



  /* Discord繝懊ち繝ｳ縺ｮ隱ｿ謨ｴ医せ繝槭迚茨ｼ */
  .discord-overlay {
    width: 50%;
    /* 100% 竊� 50% */
    left: auto;
    /* 蟾ｦ繧定ｧ｣髯､ */
    right: 0;
    /* 蜿ｳ蟇�○ */
    transform: none;
    /* transform隗｣髯､ */
    height: auto;
    /* 繧ｳ繝ｳ繝�Φ繝�↓蜷医ｏ縺帙※閾ｪ蜍戊ｪｿ謨ｴ */
  }

  .discord-overlay .discord-link {
    font-size: 9px;
    padding: 0;
    /* padding隱ｿ謨ｴ */
    gap: 3px;
    height: 100%;
    /* 隕ｪ隕∫ｴ�縺ｮ鬮倥＆縺ｫ蜷医ｏ縺帙ｋ */
  }

  .discord-overlay .discord-icon {
    width: 14px !important;
    /* 12px 竊� 14px */
    height: 14px !important;
  }
}


/* 讖溽ｨｮ蛻･荳隕ｧ繝ｻ繝��繝ｫ荳隕ｧ */
.machine-list,
.tool-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.machine-list li a,
.tool-list li a {
  display: block;
  padding: 10px 20px;
  background: #eee;
  border-radius: 4px;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.3s ease;
}

.machine-list li a:hover,
.tool-list li a:hover {
  background: #ff6600;
  color: #000;
  transform: translateY(-2px);
}

.machine-list li a {
  color: #000;
}

/* フッター */
.footer {
  background: var(--header-bg);
  color: var(--text-light);
  text-align: center;
  padding: var(--spacing-lg);
  margin-top: 0;
  border-top: 1px solid var(--line-gold);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

/* 繝倥ャ繝繝ｼ蜀讖溽ｨｮ蛻･荳隕ｧ繧呈ｨｪ荳ｦ縺ｳ縺ｫ縺吶ｋ */
.machine-list {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 10px;
  padding: 10px 0;
  scrollbar-width: none;
}

.machine-list::-webkit-scrollbar {
  display: none;
}

.machine-list li {
  flex: 0 0 auto;
}

/* 繝九Η繝ｼ繧ｹ縺ｮ繧ｹ繧ｯ繝ｭ繝ｼ繝ｫ繧｢繝九Γ繝ｼ繧ｷ繝ｧ繝ｳ */
@keyframes scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

/* 繧ｹ繝槭�蟇ｾ蠢懶ｼ域怙螟ｧ蟷�600px�� */
@media (max-width: 600px) {
  .site-title a {
    font-size: 1.8rem;
  }

  .menu-buttons button {
    font-size: 0.9rem;
    padding: 6px 10px;
  }

  .section h2 {
    font-size: 1rem;
    padding: 10px;
  }

  .container {
    padding: 20px;
  }

  /* Removed conflicting .new-slot-list styles to enforce 3-column layout defined earlier */

  .machine-list li a {
    font-size: 0.9rem;
    padding: 6px 8px;
  }

  .tool-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    justify-items: center;
  }

  .tool-list li a {
    display: block;
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .entry-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .machine-discord-button.prominent-design {
    margin: 20px 0;
    text-align: center;
  }

  .machine-discord-button.prominent-design button {
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #ff5722, #e64a19);
    border: 2px solid #ffab91;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  .machine-discord-button.prominent-design button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    opacity: 0.95;
  }

  .machine-discord-button.prominent-design button::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10%);
    background-size: 50px 50px;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .machine-discord-button.prominent-design button:hover::after {
    opacity: 1;
  }

  /* ========================================
     Discord 繝懊ち繝ｳ - 邨ｱ荳繝�じ繧､繝ｳ�医Ξ繧ｹ繝昴Φ繧ｷ繝門ｯｾ蠢懶ｼ�
     ======================================== */

  /* 蝓ｺ譛ｬ繧ｹ繧ｿ繧､繝ｫ */
  .machine-discord-button {
    margin: 30px 0;
    text-align: center;
    clear: both;
  }

  .machine-discord-button .discord-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #5865F2, #7289DA);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
  }

  .machine-discord-button .discord-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(88, 101, 242, 0.4);
  }

  .machine-discord-button .discord-link:active {
    transform: translateY(0);
  }

  .machine-discord-button .discord-icon {
    display: inline-block;
    width: 20px !important;
    height: 20px !important;
    max-width: 20px;
    max-height: 20px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .machine-discord-button .discord-text {
    white-space: nowrap;
  }

  /* PC逕ｨ繝ｬ繧ｹ繝昴Φ繧ｷ繝厄ｼ�768px莉･荳奇ｼ� */
  @media (min-width: 768px) {
    .machine-discord-button .discord-link {
      gap: 12px;
      padding: 12px 24px;
      font-size: 16px;
    }

    .machine-discord-button .discord-icon {
      width: 24px !important;
      height: 24px !important;
      max-width: 24px;
      max-height: 24px;
    }
  }

  .rich-searchform {
    text-align: center;
    margin: 20px 0;
  }

  .rich-search-wrapper {
    display: inline-flex;
    border: 2px solid #ffab91;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #ff5722, #e64a19);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  .rich-search-wrapper input[type="text"] {
    padding: 15px;
    font-size: 1.2rem;
    border: none;
    outline: none;
    width: 250px;
    background: transparent;
    color: #fff;
  }

  .rich-search-wrapper input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.8);
  }

  .rich-search-wrapper button {
    padding: 15px 25px;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
  }

  .rich-search-wrapper button:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
  }

  .search-results {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .search-heading {
    font-size: 0.8rem;
  }
}

