html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', '맑은고딕', Arial, sans-serif;
  background: rgba(0,0,0,0.3);
}
.bg-image {
  position: fixed;
  top: 0;
  left: 50%;
  height: 100vh;
  width: auto;
  min-width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  object-fit: cover;
}
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0;
}
.tab-title {
  font-size: 2rem;
  font-weight: bold;
  color: #f9c851;
  margin-bottom: 32px;
  letter-spacing: 2px;
  text-shadow: 1px 2px 6px #222;
}
.tab-content {
  width: 90vw;
  max-width: 700px;
  background: rgba(30,30,30,0.7);
  border-radius: 12px;
  padding: 32px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  color: #fff;
}
#character-input-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  align-items: center;
}
#character-input-form input {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
  margin-right: 4px;
  min-width: 200px;
}
#character-input-form button {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  background: #f9c851;
  color: #222;
  font-weight: bold;
  cursor: pointer;
  margin-right: 4px;
}
#character-input-form button:hover {
  background: #ffeaa7;
}
.character-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.character-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.character-img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: #444;
  border: 2px solid #f9c851;
}
.character-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.character-name {
  font-size: 1.25rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 12px;
}
.character-stats {
  font-size: 1rem;
  color: #f9c851;
  font-weight: bold;
}
.site-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.site-link-btn {
  padding: 7px 18px;
  border: none;
  border-radius: 6px;
  background: #f9c851;
  color: #222;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.site-link-btn:hover {
  background: #ffeaa7;
}
.delete-btn {
  padding: 7px 14px;
  border: none;
  border-radius: 6px;
  background: #e74c3c;
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  margin-left: 10px;
  transition: background 0.15s;
}
.delete-btn:hover {
  background: #c0392b;
}
#visitor-counter {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: rgba(40,40,40,0.92);
  color: #fff;
  padding: 14px 28px;
  border-radius: 16px;
  font-size: 1.1em;
  box-shadow: 0 4px 16px #0003;
  text-align: right;
  line-height: 1.5;
  letter-spacing: 0.5px;
}
#visitor-counter b {
  color: #ffd700;
}

/* 에러 메시지 */
.error-message {
  color: #e74c3c;
  margin-bottom: 12px;
  min-height: 20px;
}
.error-message:empty {
  display: none;
}

/* 로딩 상태 */
.loading {
  color: #aaa;
  text-align: center;
  padding: 20px;
}

/* 반응형 */
@media (max-width: 600px) {
  .tab-title {
    font-size: 1.5rem;
  }
  .tab-content {
    padding: 20px 16px;
  }
  .character-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .character-img {
    width: 60px;
    height: 60px;
  }
  #visitor-counter {
    right: 12px;
    bottom: 12px;
    padding: 10px 16px;
    font-size: 0.9em;
  }
}
