@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700;900&family=Noto+Serif+JP:wght@700;900&display=swap');

:root {
  --bg-color: #1a1a1a;
  --accent-gold: #c5a059;
  --accent-red: #8b0000;
  --text-color: #e0e0e0;
  --font-main: 'Noto Sans JP', sans-serif;
  --font-serif: 'Noto Serif JP', serif;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background-image: radial-gradient(circle at center, #2c2c2c 0%, #1a1a1a 100%);
}

#game-container {
  display: flex;
  flex-direction: column;
  padding: 15px;
  max-width: 900px;
  margin: 0 auto;
}

header {
  text-align: center;
  padding: 10px 0;
}

header h1 {
  color: var(--accent-gold);
  margin: 0;
  font-size: 2em;
  font-family: var(--font-serif);
  letter-spacing: 5px;
}

header p {
  color: var(--accent-gold);
  opacity: 0.7;
  margin: 5px 0 0;
  font-size: 0.9em;
}

.table-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 15px 5px;
  margin: 10px 0;
  border: 3px solid var(--accent-gold);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.cpu-row {
  display: flex;
  justify-content: center;
  gap: clamp(5px, 2vw, 20px);
  flex-wrap: wrap;
  width: 100%;
}

.player-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar {
  width: 50px;
  height: 50px;
  background: var(--accent-gold);
  border-radius: 50%;
  margin-bottom: 5px;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--bg-color);
  font-size: 16px;
}

.player-info {
  font-size: 12px;
  color: #ccc;
  margin-bottom: 5px;
  text-align: center;
}

#blind-info {
  text-shadow: 0 0 5px rgba(197, 160, 89, 0.5);
  letter-spacing: 1px;
}

#pot-display {
  text-align: center;
  color: var(--accent-gold);
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 10px;
  padding: 5px 20px;
  border: 1px solid var(--accent-gold);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.5);
  display: inline-block;
}

.player-hand {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
}

.community-area {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.community-label {
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: #888;
  margin-bottom: 5px;
}

.user-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.current-hand-display {
  color: var(--accent-gold);
  font-weight: bold;
  margin-top: 5px;
  font-size: 14px;
}

.card {
  width: clamp(35px, 12vw, 60px);
  height: clamp(55px, 19vw, 95px);
  background: white;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  padding: clamp(3px, 1vw, 6px);
  font-size: clamp(7px, 2.2vw, 10px);
  font-weight: 800;
  border: 2px solid #000;
  text-align: center;
  writing-mode: vertical-rl;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.card.era {
  background-color: #4d1a1a;
  color: #f1f1f1;
}

.card.philosopher {
  background-color: #d4ad31;
  color: #1a1a1a;
}

.card.concept {
  background-color: #1a3b5a;
  color: #f1f1f1;
}

.card.special {
  background-color: #4b2c5e;
  color: #f1f1f1;
}

.card::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.card.hidden {
  background: #000;
  background-image: repeating-linear-gradient(45deg, #1a1a1a, #1a1a1a 8px, #000 8px, #000 16px);
  border: 3px solid #333;
  color: transparent;
}

.card:hover {
  transform: translateY(-8px) scale(1.08);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7);
  z-index: 10;
}

#game-log {
  height: 60px;
  overflow-y: auto;
  font-size: 12px;
  color: #888;
  text-align: center;
  padding: 8px;
  margin: 5px 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.action-panel {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 25px;
  border: none;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.btn-primary {
  background: var(--accent-gold);
  color: white;
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent-gold);
  color: var(--accent-gold);
}

.btn:hover {
  filter: brightness(1.2);
  transform: scale(1.05);
}

.info-box {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  backdrop-filter: blur(5px);
}

.info-box.active {
  opacity: 1;
  pointer-events: all;
  cursor: pointer;
}

#info-title {
  color: var(--accent-gold);
  font-size: 3rem;
  text-shadow: 0 0 20px var(--accent-gold), 0 0 40px #fff;
  margin: 0;
  animation: scale-up 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: var(--font-serif);
  letter-spacing: 5px;
  text-align: center;
  padding: 0 10px;
}

#info-content {
  color: #fff;
  font-size: 1.2rem;
  margin-top: 20px;
  text-align: center;
  max-width: 80%;
  animation: fade-up 1s ease 0.5s both;
  line-height: 1.6;
}

.click-to-close {
  color: #888;
  font-size: 0.9rem;
  margin-top: 30px;
  animation: blink 2s infinite;
}

@keyframes scale-up {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fade-up {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 1;
  }
}

/* モバイル向け最適化 (480px以下) */
@media screen and (max-width: 480px) {
  #game-container {
    padding: 10px 5px;
  }

  header h1 {
    font-size: 1.6rem;
    letter-spacing: 2px;
  }

  .table-area {
    padding: 10px 2px;
    gap: 10px;
    border-width: 2px;
  }

  .cpu-row {
    gap: 8px;
  }

  .player-slot {
    scale: 0.9;
  }

  .card {
    width: clamp(30px, 14vw, 45px);
    height: clamp(45px, 22vw, 72px);
    padding: 2px;
    font-size: 8px;
    letter-spacing: 0;
  }

  .avatar {
    width: 38px;
    height: 38px;
    font-size: 14px;
    margin-bottom: 2px;
  }

  .player-info {
    font-size: 10px;
  }

  .action-panel {
    padding: 10px;
    gap: 5px;
  }

  .btn {
    padding: 10px 15px;
    font-size: 12px;
    border-radius: 20px;
  }

  #info-title {
    font-size: 1.8rem;
  }

  #info-content {
    font-size: 0.9rem;
    padding: 0 15px;
  }
}