:root {
  --zotac-orange: #ffaa00;
  --wacom-blue: #0097d6;
  --bg-dark: #1a1a2e;
  --text-light: #f5f5f5;
  --danger-red: #ff4444;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  user-select: none;
}
body.display-sky {
  overflow: hidden;
  margin: 0;
  background: linear-gradient(to bottom, #1a2a6c, #b21f1f, #fdbb2d);
}
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  text-align: center;
}
h1,
h2 {
  color: var(--zotac-orange);
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}
.radio-group input[type="radio"] {
  display: none;
}
.radio-group label {
  display: inline-block;
  padding: 20px 30px;
  background-color: #2a2a40;
  border: 3px solid #3a3a50;
  border-radius: 15px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.2s;
}
.radio-group input[type="radio"]:checked + label {
  background-color: #3a2a20;
  border-color: var(--zotac-orange);
  transform: translateY(-5px);
}

.btn-submit {
  background-color: var(--zotac-orange);
  color: #000;
  font-size: 1.5rem;
  font-weight: bold;
  padding: 20px 50px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
}

#draw-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.toolbar {
  height: 90px;
  background-color: #222;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 10px;
}
.toolbar button {
  padding: 12px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background-color: #444;
  color: #fff;
}
.toolbar button.active {
  background-color: var(--wacom-blue);
}
.submit-group {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.btn-share {
  background-color: var(--wacom-blue);
  color: #fff;
}
.btn-analyze {
  background-color: var(--zotac-orange);
  color: #000;
}
.btn-secret {
  background-color: transparent;
  border: 1px solid #666;
  color: #aaa;
}

#canvas-wrapper {
  flex-grow: 1;
  position: relative;
  background-color: #fff;
  color: #333;
}

.guide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 2fr;
  pointer-events: none;
}
.guide-icon {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  background-color: #fafafa;
  border-right: 2px dashed #ccc;
  border-bottom: 2px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
}
.guide-icon-circle {
  width: 80%;
  aspect-ratio: 1/1;
  border: 4px dashed var(--zotac-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--zotac-orange);
  font-weight: bold;
  opacity: 0.6;
}
.guide-top {
  grid-column: 2 / 5;
  grid-row: 1 / 2;
  background-color: #f0f0f0;
  border-bottom: 2px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #888;
}
.guide-left {
  grid-column: 1 / 3;
  grid-row: 2 / 3;
  background-color: #e6f7ff;
  border-right: 2px dashed #b3e0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #55aaff;
  text-align: center;
}
.guide-right {
  grid-column: 3 / 5;
  grid-row: 2 / 3;
  background-color: #fff0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ff6666;
  text-align: center;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  cursor: crosshair;
  touch-action: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-content {
  background: var(--bg-dark);
  border: 2px solid var(--zotac-orange);
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  max-width: 600px;
  width: 90%;
}
.spinner {
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid var(--zotac-orange);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.modal-btn {
  background-color: var(--zotac-orange);
  color: #000;
  font-weight: bold;
  padding: 15px 40px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  margin-top: 20px;
}
.worry-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.worry-tag {
  background: #2a1a1a;
  border: 1px solid #553333;
  color: #cc9999;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  font-size: 0.9rem;
}
.worry-tag.active {
  background: var(--danger-red);
  color: #fff;
  border-color: #ff6666;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}
.hidden {
  display: none !important;
}

#viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
}
#viewport canvas {
  position: absolute;
  top: 0;
  left: 0;
}

/* 吹き出しのスタイル */
.speech-bubble {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 100;
  transform: translate(-50%, calc(-100% - 15px));
  animation: bubble-fade 2.5s forwards;
}
.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
  display: block;
  width: 0;
}
@keyframes bubble-fade {
  0% {
    opacity: 0;
    transform: translate(-50%, calc(-80% - 15px));
  }
  10% {
    opacity: 1;
    transform: translate(-50%, calc(-100% - 15px));
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, calc(-120% - 15px));
  }
}

.brand-logo {
  position: absolute;
  top: 20px;
  left: 20px;
  color: #fff;
  font-weight: bold;
  font-size: 1.5rem;
}

#gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  justify-content: center;
}
.card {
  background: #fff;
  color: #000;
  border-radius: 10px;
  padding: 15px;
  width: 45%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}
.card img {
  width: 100%;
  border: 1px solid #ddd;
}
.ai-comment {
  margin-top: 10px;
  background: #fff5ee;
  padding: 10px;
  border-left: 5px solid var(--zotac-orange);
  font-size: 0.9rem;
  color: #333;
  text-align: left;
}

.admin-card {
  background: #222;
  border: 1px solid var(--zotac-orange);
  padding: 30px;
  border-radius: 15px;
  max-width: 600px;
  margin: 40px auto;
  text-align: left;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--zotac-orange);
  font-weight: bold;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  background: #333;
  border: 1px solid #555;
  color: #fff;
  border-radius: 5px;
  box-sizing: border-box;
}
.msg {
  background: #1a4a1a;
  color: #8f8;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 20px;
  text-align: center;
}
