/* FAB (Floating Action Buttons) 系統樣式 */

/* 關閉按鈕樣式 */
.fab-close-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: #ff4444;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
}

.fab-close-btn:hover {
  background: #ff6666;
  transform: scale(1.1);
}

.fab-close-btn i {
  font-size: 10px;
  color: #fff;
  line-height: 1;
}

/* 隱藏狀態 */
.fab-float-group-ultra.hidden {
  display: none !important;
}

/* 重新開啟按鈕樣式 - 避免與go top按鈕重疊 */
.fab-reopen-btn {
  position: fixed;
  right: 3rem; /* 與go top按鈕對齊 */
  bottom: calc(3rem + 4rem + 0.5rem); /* go top的bottom + height + 間距 = 7.5rem */
  width: 48px;
  height: 48px;
  background: #2196F3;
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99998;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.fab-reopen-btn:hover {
  background: #1976D2;
  transform: scale(1.1);
}

.fab-reopen-btn i {
  font-size: 20px;
}

.fab-reopen-btn.show {
  display: flex !important;
}

@media (max-width: 700px) {
  .fab-reopen-btn {
    width: 42px;
    height: 42px;
    right: 0.75rem; /* 手機版稍微往內一點 */
    bottom: calc(3rem + 4rem + 0.5rem); /* 保持在go top上方 */
  }

  .fab-reopen-btn i {
    font-size: 16px;
  }
}

.fab-float-group-ultra {
  position: fixed;
  right: 16px;
  bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
  align-items: flex-end;
  transform-origin: bottom right;
}
.fab-card-btn-ultra.id-btn {
  background: #fff9e0;
  color: #222;
  font-family: "Noto Sans TC", "微軟正黑體", sans-serif;
  font-weight: 900;
  border-radius: 18px;
  box-shadow: 0 6px 16px 0 rgba(0,0,0,0.13);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  border: none;
  outline: none;
  text-align: right;
  padding: 12px 20px 12px 16px;
  width: auto;
  height: auto;
  min-width: unset;
  min-height: unset;
  margin: 0;
  cursor: pointer;
  text-decoration: none !important;
}
.fab-card-btn-ultra.id-btn .id-label {
  font-size: 19px;
  font-weight: 900;
  color: #222;
  margin-bottom: 7px;
  line-height: 1.1;
  letter-spacing: 0.5px;
  text-align: right;
}
.fab-card-btn-ultra.id-btn .big-number {
  color: #d12a26;
  font-size: 2.9em;
  font-family: "Josefin Sans", "Noto Sans TC", Arial, sans-serif;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
  margin: 0;
  text-align: right;
}
.fab-card-btn-ultra.circle-btn {
  background: #bc1846;
  color: #fff;
  font-weight: 900;
  border-radius: 50%;
  box-shadow: 0 8px 24px 0 rgba(0,0,0,0.17);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  width: 84px;
  height: 84px;
  min-width: 84px;
  min-height: 84px;
  gap: 5px;
  overflow: hidden;
  position: relative;
  transition: background 0.18s, transform 0.18s;
}
.fab-card-btn-ultra.circle-btn .fab-btn-label {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.5px;
  margin: 0;
  padding: 0;
  color: #fff;
  line-height: 1.1;
  text-align: center;
  display: block;
  pointer-events: none;
}

/* 賽事分析專業按鈕設計 */
.fab-card-btn-ultra.analysis-btn {
  background: #FFE066 !important;   /* 鮮亮黃 */
  color: #222 !important;           /* 按鈕內文字顏色黑 */
}
.fab-card-btn-ultra.analysis-btn .fa-solid {
  font-size: 2.7em;
  color: #111 !important;           /* ICON黑色 */
  margin-bottom: 1px;
  margin-top: 4px;
  text-shadow: 0 2px 10px rgba(180,140,10,0.07);
  display: block;
  pointer-events: none;
  transition: color 0.18s;
}
.fab-card-btn-ultra.analysis-btn .fab-btn-label {
  color: #111 !important;
  font-weight: 800;
  letter-spacing: 0.3px;
  margin-top: 2px;
  margin-bottom: 1px;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}
/* Hover效果 */
.fab-card-btn-ultra.circle-btn:hover,
.fab-card-btn-ultra.analysis-btn:hover {
  background: #ffe991 !important;
  transform: scale(1.07);
}

.fab-card-btn-ultra.id-btn:hover {
  background: #fff5b2;
  transform: scale(1.03);
}

.fab-card-btn-ultra.line-btn:hover img,
.fab-card-btn-ultra.analysis-btn:hover .fa-solid {
  filter: brightness(1.14) saturate(1.3);
  color: #000 !important;
  transform: scale(1.06);
}
.fab-card-btn-ultra.line-btn {
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  min-width: 84px;
  min-height: 84px;
  cursor: pointer;
}
.fab-card-btn-ultra.line-btn img {
  width: 84px;
  height: 84px;
  display: block;
  margin: 0 auto;
  pointer-events: none;
  object-fit: contain;
}
@media (max-width: 700px) {
  .fab-float-group-ultra { right: 10px; bottom: 10px; transform: scale(1.08);}
  .fab-card-btn-ultra.circle-btn,
  .fab-card-btn-ultra.line-btn { width: 62px; height: 62px; min-width: 62px; min-height: 62px;}
  .fab-card-btn-ultra.line-btn img { width: 62px; height: 62px;}
  .fab-card-btn-ultra.circle-btn .fab-btn-label { font-size: 13px;}
  .fab-card-btn-ultra.id-btn { font-size: 11px; padding: 8px 10px 8px 10px;}
  .fab-card-btn-ultra.id-btn .big-number { font-size: 1.4em;}
  .fab-card-btn-ultra.id-btn .id-label { font-size: 11px; margin-bottom: 4px;}
  .fab-float-group-ultra { gap: 5px; }
  .fab-card-btn-ultra.analysis-btn .fa-solid { font-size: 1.4em;}
}