body {
  margin: 0;
  padding: 0;
  background: #000000;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  color: #4ade80;
  overflow-x: hidden;
}

/* ヘッダー：タイトルセクション */
#header {
  text-align: center;
  padding: 2rem 0.5rem 0.75rem;
}

#header .logo-image {
  max-width: 600px;
  width: 100%;
  height: auto;
  margin: 1rem auto;
  display: block;
}

#header h1 {
  font-size: 4rem;
  font-weight: bold;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.1em;
  color: #E0E0FF;
}

#header p {
  font-size: 1.125rem;
  margin: 0 ;
  color: #E0E0FF;
}

#header span {
  font-size: 0.875rem;
  color: #E0E0FF;
}

/* ゲームセクション：Reactマウントポイント */
#game-root {
  position: relative;
}

/* フッター：バージョンセクション */
#footer {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
}

#footer .note-container {
  display: flex;
  justify-content: center;
}

#footer > p {
  color: #E0E0FF;
  margin-bottom: 2rem;
}

#footer .share-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

#footer .share-button {
  padding: 10px 5px;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: opacity 0.2s;
  display: inline-block;
  width: 160px;
}

#footer .share-button:hover {
  opacity: 0.8;
}

#footer .share-button-twitter {
  background-color: #1DA1F2;
}

#footer .share-button-line {
  background-color: #00B900;
}


/* レスポンシブ対応 */
@media (max-width: 768px) {
  #header {
    padding: 0.75rem 0.5rem 0.5rem;
  }

  #header h1 {
    font-size: 2.25rem;
  }

  #header p {
    font-size: 0.875rem;
  }
}

@keyframes impact-ring {
  0%, 10% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(4.5);
    opacity: 0;
  }
}

@keyframes scan-pulse {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 0.08;
  }
}

@keyframes scan-icon-pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

@keyframes firework-particle-common {
  0%, 6.25% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

@keyframes range-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes range-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.popup-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1rem;
}

.popup-container {
  background-color: #111827;
  border-width: 2px;
  text-align: center;
  width: 100%;
  border-radius: 0.25rem;
}

.popup-container-small {
  max-width: 500px;
}

.popup-container-medium {
  max-width: 600px;
}

.popup-container-scrollable {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.popup-padding-desktop {
  padding: 3rem;
}

.popup-padding-mobile {
  padding: 2rem;
}

.btn-popup {
  border-width: 2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  border-radius: 0.25rem;
  color: white;
}

.btn-popup:hover:not(:disabled) {
  filter: brightness(1.2);
}

.btn-popup:disabled {
  opacity: 0.5;
}

.btn-popup-desktop {
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
  flex: 1;
}

.btn-popup-mobile {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  width: 100%;
}

/* Color themes for buttons */
.btn-green {
  background-color: #064e3b;
  border-color: #4ade80;
}

.btn-green:hover:not(:disabled) {
  background-color: #065f46;
}

.btn-cyan {
  background-color: #164e63;
  border-color: #22d3ee;
}

.btn-cyan:hover:not(:disabled) {
  background-color: #155e75;
}

.btn-orange {
  background-color: #7c2d12;
  border-color: #fb923c;
}

.btn-orange:hover:not(:disabled) {
  background-color: #9a3412;
}

.btn-purple {
  background-color: #581c87;
  border-color: #c084fc;
}

.btn-purple:hover:not(:disabled) {
  background-color: #6b21a8;
}

.btn-gray {
  background-color: #1f2937;
  border-color: #4b5563;
}

.btn-gray:hover:not(:disabled) {
  background-color: #374151;
}

.btn-red {
  background-color: #7f1d1d;
  border-color: #f87171;
}

.btn-red:hover:not(:disabled) {
  background-color: #991b1b;
}

/* Border colors for popup containers */
.border-green { border-color: #4ade80; }
.border-cyan { border-color: #22d3ee; }
.border-orange { border-color: #fb923c; }
.border-purple { border-color: #c084fc; }
.border-red { border-color: #f87171; }
.border-yellow { border-color: #facc15; }
.border-gray { border-color: rgba(255, 255, 255, 0.3); }

/* Text colors */
.text-green { color: #4ade80; }
.text-cyan { color: #22d3ee; }
.text-orange { color: #fb923c; }
.text-purple { color: #c084fc; }
.text-red { color: #f87171; }
.text-yellow { color: #facc15; }

/* Font sizes */
.text-xs-custom { font-size: 0.75rem; }
.text-sm-custom { font-size: 0.875rem; }
.text-base-custom { font-size: 1rem; }
.text-lg-custom { font-size: 1.125rem; }
.text-xl-custom { font-size: 1.25rem; }
.text-2xl-custom { font-size: 2rem; }

/* Layout utilities */
.fixed-background {
  position: fixed;
  inset: 0;
  background-image: url(./img/background.png);
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  z-index: -1;
  pointer-events: none;
}

/* デスクトップのみ background-attachment: fixed を適用 */
@media (min-width: 769px) {
  .fixed-background {
    background-attachment: fixed;
  }
}

.container-main {
  position: relative;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
}

.left-column-desktop {
  flex-shrink: 0;
  width: 290px;
}

.order-1 { order: 1; }
.order-2 { order: 2; }
.order-3 { order: 3; }

/* Grid styles */
.grid-container {
  display: inline-block;
  position: relative;
}

.grid-cell {
  width: 66px;
  height: 66px;
  border: 1px solid rgba(224, 224, 255, 0.1);
  position: relative;
  transition: background-color 0.2s;
  cursor: pointer;
}

.grid-cell:hover {
  background-color: rgba(224, 224, 255, 0.1);
}

/* Unit display */
.unit-icon-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 70%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.unit-hp-bar-container {
  position: absolute;
  bottom: 2px;
  left: 4px;
  right: 4px;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 2px;
  overflow: hidden;
}

.unit-hp-bar {
  height: 100%;
  background-color: #4ade80;
  transition: width 0.2s;
}

/* Projectile */
.projectile {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10;
}

/* Range indicators */
.range-indicator {
  position: absolute;
  border: 2px solid;
  pointer-events: none;
  box-sizing: border-box;
}

.range-indicator.fade-in {
  animation: range-fade-in 0.15s ease-out;
}

.range-indicator.fade-out {
  animation: range-fade-out 0.15s ease-out;
}

/* Impact effect */
.impact-ring {
  position: absolute;
  border: 3px solid;
  border-radius: 50%;
  pointer-events: none;
  animation: impact-ring 0.8s ease-out;
}

/* Scan effect */
.scan-overlay {
  position: absolute;
  inset: 0;
  background-color: #ef4444;
  animation: scan-pulse 2s ease-in-out infinite;
  pointer-events: none;
}

.scan-icon {
  animation: scan-icon-pulse 2s ease-in-out infinite;
}

/* Firework */
.firework-container {
  position: absolute;
  pointer-events: none;
  z-index: 100;
}

.firework-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: firework-particle-common 1.6s ease-out;
}

/* Placement flash */
.placement-flash {
  transition: background-color 0.7s ease-out;
}

/* Spacing utilities */
.mb-4px { margin-bottom: 4px; }
.gap-1 { gap: 0.25rem; }

/* Additional font sizes */
.text-xl2-custom { font-size: 1.2rem; }

/* Layout utilities */
.max-w-486 { max-width: 486px; }
.max-w-600 { max-width: 600px; }
.aspect-1-1 { aspect-ratio: 1 / 1; }

/* Flexbox utilities */
.flex-center-gap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
