* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #f9fafb;
  padding: 24px;
}

.app {
  max-width: 1050px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 28px;
}

header h1 {
  font-size: 2.3rem;
  margin-bottom: 8px;
}

header p {
  color: #d1d5db;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.card h2 {
  font-size: 0.9rem;
  color: #9ca3af;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.big-number {
  font-size: 1.8rem;
  font-weight: bold;
}

.subtext {
  color: #d1d5db;
  font-size: 0.9rem;
  margin-top: 8px;
  line-height: 1.4;
}

.progress-container {
  background: #374151;
  border-radius: 999px;
  height: 20px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #84cc16);
  transition: width 0.4s ease;
}

.life-bar {
  background: linear-gradient(90deg, #3b82f6, #22c55e);
}

.danger-bar {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

form {
  display: grid;
  gap: 12px;
}

label {
  font-size: 0.9rem;
  color: #d1d5db;
}

input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  outline: none;
  margin-top: 4px;
  background: #f9fafb;
  color: #111827;
  font-size: 1rem;
}

button {
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: #22c55e;
  color: #052e16;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

button:hover {
  transform: translateY(-2px);
  background: #86efac;
}

.secondary-btn {
  background: #60a5fa;
  color: #082f49;
}

.secondary-btn:hover {
  background: #93c5fd;
}

.danger-btn {
  background: #ef4444;
  color: white;
}

.danger-btn:hover {
  background: #f87171;
}

.log-list {
  list-style: none;
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.log-item {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 4px;
}

.log-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.positive {
  color: #86efac;
  font-weight: bold;
}

.negative {
  color: #fca5a5;
  font-weight: bold;
}

.message {
  margin-top: 12px;
  color: #fde68a;
  min-height: 22px;
  line-height: 1.4;
}

.rank {
  font-size: 1rem;
  color: #facc15;
  margin-top: 6px;
}

.setup-warning {
  border: 1px solid #facc15;
  background: rgba(250, 204, 21, 0.08);
  margin-bottom: 18px;
}

@media (max-width: 750px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}

#characterImg {
  width: 180px;
  height: auto;
  display: block;
  margin: 0 auto;
}

#characterImg {
  width: 180px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.character-card {
  background: white;
}

.character-card {
  background: white;
  position: relative;
  color: #111827;
}

.menu-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  color: #111827;
  font-size: 24px;
  padding: 4px 10px;
}

.menu-btn:hover {
  background: #e5e7eb;
  transform: none;
}

.setup-menu {
  margin-top: 16px;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 14px;
}

.hidden {
  display: none;
}

.setup-menu {
  margin-top: 16px;
  background: #202626;
  border: 1px solid #facc15;
  border-radius: 12px;
  padding: 14px;
  color: white;
}

.setup-menu h2 {
  color: #d1d5db;
  letter-spacing: 2px;
}

.setup-menu label {
  color: white;
  font-weight: bold;
}

.setup-menu input {
  background: #f9fafb;
  color: #111827;
}

.setup-menu .subtext {
  color: white;
}

.profile-frame {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 6px solid #9ca3af;
  margin: 20px auto 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

#profilePlaceholder {
  color: #374151;
  font-weight: bold;
}

#profileUpload {
  display: none;
}

.profile-frame {
  cursor: pointer;
}

.profile-info {
  text-align: center;
  color: #f9fafb;
}

.profile-info h2 {
  color: #111827;
  font-size: 1.2rem;
}

#profileLevel {
  font-weight: bold;
  margin-top: 4px;
}

#profileStars {
  margin-top: 8px;
  font-size: 1.3rem;
}
#profileTitle {
  color: #facc15;
  text-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

#profileLevel {
  color: #d1d5db;
  font-weight: bold;
}

#profileStars {
  color: #facc15;
}

.profile-section {
  position: relative;
  width: 220px;
  margin: 0 auto;
}

.menu-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: transparent;
  color: #f9fafb;
  font-size: 28px;
  padding: 4px 10px;
  z-index: 10;
}

.menu-btn:hover {
  background: rgba(255,255,255,0.15);
  transform: none;
}

.hidden {
  display: none;
}

#removePhotoBtn {
  display: none;
}
