:root {
  --bg: #0d0e13;
  --surface: #151821;
  --surface-hover: #1c202c;
  --border: #262b3d;
  --border-glow: rgba(167, 139, 250, 0.4);
  --text: #edeef4;
  --text-muted: #8c93a8;
  --accent: #9333ea;
  --accent-light: #c084fc;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  padding: 2.5rem 1rem;
  overflow-x: hidden;
  position: relative;
}

#sparkle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
}

.layout {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.6rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.25s ease, 
              box-shadow 0.25s ease;
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  box-shadow: 0 10px 28px rgba(147, 51, 234, 0.18), 0 0 1px var(--accent-light);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.profile-info {
  flex: 1;
}

.profile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.avatar-placeholder {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.card:hover .avatar-placeholder {
  transform: scale(1.08) rotate(6deg);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--accent-light);
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
}

h1 { font-size: 1.7rem; margin-bottom: 0.2rem; }
h2 { font-size: 1.25rem; margin-bottom: 0.8rem; color: var(--accent-light); }
.subtitle { color: var(--text-muted); font-size: 0.95rem; }

.grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin-top: 1.2rem;
}

.tag-list li {
  background: rgba(168, 85, 247, 0.12);
  color: var(--accent-light);
  border: 1px solid rgba(168, 85, 247, 0.25);
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.tag-list li:hover {
  background: rgba(168, 85, 247, 0.25);
  transform: scale(1.05);
}

.links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.links a {
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  transition: color 0.2s ease, transform 0.2s ease;
}

.links a:hover {
  color: var(--accent-light);
  transform: translateX(4px);
}

/* ================= ИНТЕРАКТИВНАЯ ДОСКА (MY WALL) ================= */
.wall-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wall-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ctrl-btn {
  background: #1e2230;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.ctrl-btn:hover {
  background: var(--accent);
  color: #fff;
}

#zoom-level {
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 45px;
  text-align: center;
}

.wall-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.wall-viewport {
  width: 100%;
  height: 380px;
  background: #090a0e;
  border: 1px dashed var(--border);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: grab;
  user-select: none;
  /* Фоновая ретро-сетка */
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 20px 20px;
}

.wall-viewport:active {
  cursor: grabbing;
}

.wall-canvas {
  position: absolute;
  width: 1400px;
  height: 1000px;
  transform-origin: 0 0;
}

.sticker {
  position: absolute;
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  font-size: 0.9rem;
  max-width: 220px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.sticker:hover {
  transform: scale(1.12) !important;
  z-index: 10;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.sticker-pin {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
}

.stick-1 { background: #fef08a; color: #713f12; }
.stick-2 { background: #fbcfe8; color: #831843; }
.stick-3 { background: #bae6fd; color: #0369a1; }
.stick-4 { background: #bbf7d0; color: #14532d; }
.stick-5 { background: #ddd6fe; color: #4c1d95; }

/* Бейджи 88x31 */
.badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  width: 88px;
  height: 31px;
  background: #1e2230;
  border: 1px solid #3c4257;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  image-rendering: pixelated;
  user-select: none;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.badge:hover {
  transform: scale(1.1);
  border-color: var(--accent-light);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

/* Форма гостевой книги */
#guestbook-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

input, textarea {
  background: #0d0e13;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.8rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-light);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

button[type="submit"] {
  background: linear-gradient(135deg, #9333ea, #7c3aed);
  color: #fff;
  border: none;
  padding: 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

button[type="submit"]:hover {
  background: linear-gradient(135deg, #a855f7, #8b5cf6);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-height: 280px;
  overflow-y: auto;
}

.msg-item {
  background: rgba(255, 255, 255, 0.02);
  padding: 0.9rem;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.msg-author {
  font-weight: bold;
  font-size: 0.9rem;
  color: var(--accent-light);
}

.msg-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.6rem;
}

.msg-content {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  word-break: break-word;
}

footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
}
