/* パチンコシミュレーター v7 カスタムスタイル */

/* フローティングシミュレーションボタン */
.floating-simulation-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #ff6b6b, #ffa500);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  user-select: none;
  white-space: nowrap;
}

.floating-simulation-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 35px rgba(255, 107, 107, 0.6);
  background: linear-gradient(135deg, #ff5252, #ff8a00);
}

.floating-simulation-btn:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.floating-simulation-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.3);
}

/* スマートフォン対応 */
@media (max-width: 640px) {
  .floating-simulation-btn {
    bottom: 15px;
    right: 15px;
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* アニメーション */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

.floating-simulation-btn.pulse {
  animation: pulse 2s infinite;
}

/* 結果テーブルのスタイル改善 */
.results-table {
  font-size: 0.875rem;
  width: 100%;
  table-layout: fixed;
}

.results-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: bold;
  text-align: center;
  padding: 8px 4px;
  border: none;
  font-size: 0.75rem;
}

.results-table td {
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
  padding: 6px 4px !important;
  word-break: break-all;
}

.results-table tr:hover {
  background-color: #f0f9ff;
  transition: all 0.2s ease;
}

/* 列幅の最適化（スマホ用） */
@media (max-width: 768px) {
  .results-table th:nth-child(1) { width: 8%; }   /* 回数 */
  .results-table th:nth-child(2) { width: 12%; }  /* 回転数 */
  .results-table th:nth-child(3) { width: 18%; }  /* 総出玉 */
  .results-table th:nth-child(4) { width: 10%; }  /* 当たり種別 */
  .results-table th:nth-child(5) { width: 12%; }  /* 連荘回数 */
  .results-table th:nth-child(6) { width: 12%; }  /* RUSH種別 */
  .results-table th:nth-child(7) { width: 28%; }  /* 出玉内訳 */
}

/* 出玉詳細ボタンのスタイル */
.payout-detail-btn {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payout-detail-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  transform: scale(1.05);
}

/* 統計カードのアニメーション */
.stats-card {
  transition: all 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

/* スマートフォン対応のテーブル改善 */
@media (max-width: 768px) {
  .results-table {
    font-size: 0.625rem;
  }
  
  .results-table th {
    padding: 4px 1px;
    font-size: 0.5rem;
    line-height: 1.2;
  }
  
  .results-table td {
    padding: 3px 1px !important;
    font-size: 0.625rem;
    line-height: 1.3;
  }
  
  .results-table .font-bold {
    font-size: 0.75rem;
  }
  
  /* スマホ用のコンパクトボタン */
  .results-table button {
    font-size: 0.5rem !important;
    padding: 2px 4px !important;
    min-width: 30px;
  }
  
  /* アイコンサイズ調整 */
  .results-table span {
    font-size: 0.5rem !important;
    padding: 1px 2px !important;
  }
}

/* PC用テーブル最適化 */
@media (min-width: 769px) {
  .results-table th {
    padding: 8px 6px;
    font-size: 0.875rem;
  }
  
  .results-table td {
    padding: 6px 4px !important;
    font-size: 0.875rem;
  }
}

/* 詳細ボタンの改善 */
.results-table button {
  min-width: 35px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

/* 継続率表示の改善 */
.continuation-rate {
  font-size: 1.5rem;
  font-weight: bold;
  color: #059669;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* プリセットドロップダウンの改善 */
.preset-dropdown {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.preset-dropdown:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* スクロール可能な詳細モーダル */
.payout-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  box-sizing: border-box;
}

.payout-modal-content {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.payout-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}

.payout-modal-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: #1f2937;
  margin: 0;
}

.payout-modal-close {
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
  line-height: 1;
}

.payout-modal-close:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.payout-modal-body {
  line-height: 1.6;
  color: #374151;
  white-space: pre-line;
  max-height: 400px;
  overflow-y: auto;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

/* スマートフォン対応 */
@media (max-width: 640px) {
  .payout-modal {
    padding: 10px;
  }
  
  .payout-modal-content {
    padding: 16px;
    max-height: 85vh;
    border-radius: 8px;
  }
  
  .payout-modal-title {
    font-size: 1.1rem;
  }
  
  .payout-modal-body {
    font-size: 0.9rem;
    max-height: 300px;
  }
}