:root {
  --primary-color: #e8c4c4;
  --secondary-color: #b76e79;
  --bg-color: #1a1a1a;
  --card-color: rgba(40, 35, 40, 0.45);
  --text-color: #e8c4c4;
  --animation-speed: 0.4s;
  --blur-intensity: 6px;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: 'Montserrat', sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at 20% 20%, rgba(100, 70, 75, 0.4) 0%, transparent 40%),
  radial-gradient(circle at 80% 70%, rgba(80, 50, 55, 0.3) 0%, transparent 40%);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 800px;
  padding: 15px;
  position: relative;
  z-index: 2;
  animation: fadeIn 0.8s ease-out forwards;
}

.profile-card {
  background: rgba(35, 30, 35, 0.35);
  /* Улучшенная поддержка backdrop-filter для всех браузеров */
  backdrop-filter: blur(var(--blur-intensity)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--blur-intensity)) saturate(200%);
  -moz-backdrop-filter: blur(var(--blur-intensity)) saturate(200%);
  border: 1px solid rgba(183, 110, 121, 0.25);
  border-top: 1px solid rgba(232, 196, 196, 0.4);
  border-bottom: 1px solid rgba(120, 90, 100, 0.4);
  padding: 1.5rem;
  border-radius: 20px;
  box-shadow:
  0 10px 30px rgba(0, 0, 0, 0.25),
  inset 0 1px 0 rgba(255, 255, 255, 0.15),
  inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  text-align: center;
  width: 100%;
  max-width: 500px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  /* Фолбэк для браузеров без поддержки backdrop-filter */
  background: rgba(35, 30, 35, 0.65);
}

/* Поддержка backdrop-filter для современных браузеров */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) or (-moz-backdrop-filter: blur(10px)) {
  .profile-card {
    background: rgba(35, 30, 35, 0.35);
    backdrop-filter: blur(var(--blur-intensity)) saturate(200%);
    -webkit-backdrop-filter: blur(var(--blur-intensity)) saturate(200%);
    -moz-backdrop-filter: blur(var(--blur-intensity)) saturate(200%);
  }
}

.profile-card::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg,
                              rgba(183, 110, 121, 0.1) 0%,
                              rgba(183, 110, 121, 0.05) 50%,
                              rgba(183, 110, 121, 0.1) 100%);
  z-index: -1;
  filter: blur(15px);
  opacity: 0.6;
  transition: opacity 0.4s ease;
}

.profile-card:hover::before {
  opacity: 0.8;
}

.avatar-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
  transition: transform 0.3s ease;
}

.avatar-border {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  animation: rotateBorder 6s linear infinite;
  z-index: 1;
}

@keyframes rotateBorder {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.avatar-container:hover .avatar {
  transform: scale(1.05);
}

h1 {
  margin: 0.5rem 0;
  font-size: 1.8rem;
  font-family: 'Playfair Display', serif;
  color: var(--primary-color);
  line-height: 1.2;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(183, 110, 121, 0.3);
}

p {
  margin: 0.5rem 0;
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 400;
}

.msc-block {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(45, 40, 45, 0.4);
  backdrop-filter: blur(2px) saturate(180%);
  -webkit-backdrop-filter: blur(2px) saturate(180%);
  -moz-backdrop-filter: blur(2px) saturate(180%);
  border: 1px solid rgba(183, 110, 121, 0.2);
  border-top: 1px solid rgba(232, 196, 196, 0.3);
  border-bottom: 1px solid rgba(120, 90, 100, 0.3);
  border-radius: 16px;
  box-shadow:
  0 5px 15px rgba(0, 0, 0, 0.2),
  inset 0 1px 0 rgba(255, 255, 255, 0.1),
  inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  color: var(--text-color);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.5;
  transition: all 0.3s ease;
  /* Фолбэк */
  background: rgba(45, 40, 45, 0.6);
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) or (-moz-backdrop-filter: blur(10px)) {
  .msc-block {
    background: rgba(45, 40, 45, 0.4);
    backdrop-filter: blur(2px) saturate(180%);
    -webkit-backdrop-filter: blur(2px) saturate(180%);
    -moz-backdrop-filter: blur(2px) saturate(180%);
  }
}

.msc-block:hover {
  transform: scale(1.02);
  box-shadow:
  0 8px 20px rgba(0, 0, 0, 0.25),
  inset 0 1px 0 rgba(255, 255, 255, 0.15),
  inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  background: rgba(50, 45, 50, 0.45);
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.btn {
  min-width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 40, 45, 0.5);
  backdrop-filter: blur(6px) saturate(180%);
  -webkit-backdrop-filter: blur(6px) saturate(180%);
  -moz-backdrop-filter: blur(6px) saturate(180%);
  border: 1px solid rgba(183, 110, 121, 0.25);
  border-top: 1px solid rgba(232, 196, 196, 0.3);
  border-bottom: 1px solid rgba(120, 90, 100, 0.3);
  color: var(--primary-color);
  box-shadow:
  0 6px 20px rgba(0, 0, 0, 0.2),
  inset 0 1px 0 rgba(255, 255, 255, 0.1),
  inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  transition: all var(--animation-speed) ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  /* Фолбэк */
  background: rgba(45, 40, 45, 0.7);
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) or (-moz-backdrop-filter: blur(10px)) {
  .btn {
    background: rgba(45, 40, 45, 0.5);
    backdrop-filter: blur(6px) saturate(180%);
    -webkit-backdrop-filter: blur(6px) saturate(180%);
    -moz-backdrop-filter: blur(6px) saturate(180%);
  }
}

.btn:hover {
  transform: translateY(-5px);
  box-shadow:
  0 10px 25px rgba(0, 0, 0, 0.3),
  inset 0 1px 0 rgba(255, 255, 255, 0.15),
  inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  background: rgba(50, 45, 50, 0.6);
  color: #d8a8b5;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(120, 90, 100, 0.2), transparent);
  transition: left 1s ease-in-out;
}

.btn:hover::before {
  left: 100%;
  transition-duration: 0.6s;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(183, 110, 121, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

.btn:active::after {
  animation: ripple var(--animation-speed) ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

.btn .material-icons {
  font-family: 'Material Icons', sans-serif;
  font-size: 2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

/* Стили для иконки GitHub */
.github-icon {
  width: 2rem;
  height: 2rem;
  transition: transform 0.3s ease;
  fill: currentColor;
  display: block;
}

.btn .material-icons,
.btn .github-icon {
  font-size: 2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.btn .material-icons {
  font-family: 'Material Icons', sans-serif;
}

.btn:hover .material-icons,
.btn:hover .github-icon {
  transform: scale(1.1);
}

.buttons a.btn {
  min-width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 40, 45, 0.5);
  backdrop-filter: blur(6px) saturate(180%);
  -webkit-backdrop-filter: blur(6px) saturate(180%);
  -moz-backdrop-filter: blur(6px) saturate(180%);
  border: 1px solid rgba(183, 110, 121, 0.25);
  border-top: 1px solid rgba(232, 196, 196, 0.3);
  border-bottom: 1px solid rgba(120, 90, 100, 0.3);
  color: var(--primary-color);
  box-shadow:
  0 6px 20px rgba(0, 0, 0, 0.2),
  inset 0 1px 0 rgba(255, 255, 255, 0.1),
  inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  transition: all var(--animation-speed) ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-decoration: none;
  /* Фолбэк */
  background: rgba(45, 40, 45, 0.7);
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) or (-moz-backdrop-filter: blur(10px)) {
  .buttons a.btn {
    background: rgba(45, 40, 45, 0.5);
    backdrop-filter: blur(6px) saturate(180%);
    -webkit-backdrop-filter: blur(6px) saturate(180%);
    -moz-backdrop-filter: blur(6px) saturate(180%);
  }
}

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

#hearts-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 1;
pointer-events: none;
}

.wave {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(183, 110, 121, 0.4);
  transform: scale(0);
  animation: wave var(--animation-speed) ease-out;
  pointer-events: none;
}

@keyframes wave {
  to {
    transform: scale(2);
    opacity: 0;
  }
}

.language-switcher {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
}

.language-current {
  background: rgba(45, 40, 45, 0.5);
  backdrop-filter: blur(6px) saturate(180%);
  -webkit-backdrop-filter: blur(6px) saturate(180%);
  -moz-backdrop-filter: blur(6px) saturate(180%);
  border: 1px solid rgba(183, 110, 121, 0.25);
  border-top: 1px solid rgba(232, 196, 196, 0.3);
  border-bottom: 1px solid rgba(120, 90, 100, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  color: var(--primary-color);
  font-size: 1rem;
  cursor: pointer;
  box-shadow:
  0 4px 12px rgba(0, 0, 0, 0.2),
  inset 0 1px 0 rgba(255, 255, 255, 0.1),
  inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  /* Фолбэк */
  background: rgba(45, 40, 45, 0.7);
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) or (-moz-backdrop-filter: blur(10px)) {
  .language-current {
    background: rgba(45, 40, 45, 0.5);
    backdrop-filter: blur(6px) saturate(180%);
    -webkit-backdrop-filter: blur(6px) saturate(180%);
    -moz-backdrop-filter: blur(6px) saturate(180%);
  }
}

.language-current:hover {
  transform: translateY(-2px);
  box-shadow:
  0 6px 15px rgba(0, 0, 0, 0.25),
  inset 0 1px 0 rgba(255, 255, 255, 0.15),
  inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  background: rgba(50, 45, 50, 0.6);
  color: #d8a8b5;
}

.language-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(50, 45, 50, 0.85);
  backdrop-filter: blur(6px) saturate(180%);
  -webkit-backdrop-filter: blur(6px) saturate(180%);
  -moz-backdrop-filter: blur(6px) saturate(180%);
  border: 1px solid rgba(183, 110, 121, 0.25);
  border-top: 1px solid rgba(232, 196, 196, 0.3);
  border-bottom: 1px solid rgba(120, 90, 100, 0.3);
  border-radius: 12px;
  box-shadow:
  0 8px 24px rgba(0, 0, 0, 0.25),
  inset 0 1px 0 rgba(255, 255, 255, 0.1),
  inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  min-width: 120px;
  overflow: hidden;
  animation: slideDown 0.3s ease-out forwards;
  /* Фолбэк */
  background: rgba(50, 45, 50, 0.95);
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) or (-moz-backdrop-filter: blur(10px)) {
  .language-menu {
    background: rgba(50, 45, 50, 0.85);
    backdrop-filter: blur(6px) saturate(180%);
    -webkit-backdrop-filter: blur(6px) saturate(180%);
    -moz-backdrop-filter: blur(6px) saturate(180%);
  }
}

.language-menu.show {
  display: block;
}

.language-option {
  padding: 0.5rem 1rem;
  color: var(--text-color);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.language-option:hover {
  background: rgba(120, 90, 100, 0.3);
  color: #e8c4c4;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 80px;
  }

  .profile-card {
    margin-top: 1rem;
    padding: 1.2rem;
  }

  .avatar-container {
    width: 90px;
    height: 90px;
  }

  .avatar {
    width: 80px;
    height: 80px;
  }

  h1 {
    font-size: 1.6rem;
  }

  p {
    font-size: 0.95rem;
  }

  .msc-block {
    font-size: 0.85rem;
    padding: 0.7rem;
  }

  .btn {
    min-width: 50px;
    height: 50px;
  }

  .btn .material-icons {
    font-size: 1.8rem;
  }

  .github-icon {
    width: 1.8rem;
    height: 1.8rem;
  }

  .buttons {
    gap: 1rem;
  }

  .language-switcher {
    top: 15px;
    right: 15px;
  }

  .language-current {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    height: 36px;
  }
}

#hearts-canvas {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

@keyframes heartFloat {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(10deg) scale(1);
    opacity: 0;
  }
}

.wave {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(183, 110, 121, 0.6) 0%, rgba(183, 110, 121, 0) 70%);
  transform: scale(0);
  animation: wave 0.6s ease-out;
  pointer-events: none;
}

@keyframes wave {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

.avatar-border {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
  background-size: 200% 200%;
  animation: rotateBorder 4s linear infinite, gradientShift 3s ease-in-out infinite;
  z-index: 1;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.profile-card,
.btn,
.msc-block,
.language-current,
.avatar {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.profile-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
  0 15px 35px rgba(0, 0, 0, 0.3),
  inset 0 1px 0 rgba(255, 255, 255, 0.2),
  inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.container {
  animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
