:root {
  --bg: #1f1f1f;
  --card-bg: #2a2a2a;
  --text: #f0f0f0;
  --subtext: #aaa;
  --accent: #b86bff;
  --btn-bg: #444;
  --btn-hover: var(--accent);
  --radius: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
  background-image: url('IMG_20250731_114527_665.webp');
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: cover;
  position: relative;
}

.blur-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('IMG_20250731_114527_665.webp');
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: cover;
  filter: blur(18px);
  z-index: -2;
}

/* затемнение поверх размытия, чтобы читаемость была хорошей */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: -1;
}

.container {
  background-color: rgba(42, 42, 42, 0.85);
  backdrop-filter: blur(6px);
  width: 100%;
  max-width: 360px;
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 4px solid var(--accent);
  transition: transform 0.3s;
}

.avatar:hover {
  transform: scale(1.05);
}

#imie {
  font-size: 1.5rem;
  font-weight: 600;
}

#opis {
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
  color: var(--subtext);
  font-size: 0.95rem;
  line-height: 1.4;
}

.social-groups {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.social-group {
  width: 100%;
  text-align: left;
}

.social-toggle {
  width: 100%;
  background-color: var(--btn-bg);
  color: var(--text);
  border: none;
  padding: 12px 16px;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
  font-size: 1.1rem;
  text-align: left;
}

.social-toggle:hover,
.social-toggle[aria-expanded="true"] {
  background-color: var(--btn-hover);
  box-shadow: 0 6px 15px rgba(184, 107, 255, 0.5);
  color: var(--text);
}

.group-desc {
  margin: 0.4rem 0 0.8rem 12px;
  font-size: 0.85rem;
  color: var(--subtext);
  font-style: italic;
}

.social-links {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  background-color: var(--card-bg);
  border-radius: var(--radius);
  margin-top: 0.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  z-index: 10;
}

.social-links.active {
  max-height: 500px;
  padding: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: var(--radius);
  background-color: var(--btn-bg);
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.social-links a:hover {
  background-color: var(--btn-hover);
  transform: translateY(-2px);
}

.icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* ✅ Медиа-запросы для адаптации */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 1.5rem 1rem;
  }

  #imie {
    font-size: 1.3rem;
  }

  .avatar {
    width: 100px;
    height: 100px;
  }

  .social-toggle {
    font-size: 1rem;
    padding: 10px 14px;
  }

  .group-desc {
    font-size: 0.8rem;
  }

  .social-links a {
    padding: 8px 12px;
    font-size: 0.95rem;
  }

  .icon {
    width: 18px;
    height: 18px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 400px;
  }
}

.email-contact {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--subtext);
  text-align: center;
  line-height: 1.4;
}

.email-contact a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.email-contact a:hover {
  text-decoration: underline;
}