:root {
  --accent: #0865FE;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f5f5f5;
  min-height: 100vh;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

input,
select {
  background: none;
  border: none;
  outline: none;
  font: inherit;
}

li {
  list-style-position: inside;
}

.container {
  max-width: 768px;
  margin: 0 auto;
  background-color: #f5f5f5;
  min-height: 100vh;
  position: relative;
}

.hidden {
  display: none !important;
}

/* Profile Header */
.profile-section {
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.profile-cover {
  position: relative;
}

.cover-image {
  width: 100%;
}

.profile-avatar {
  position: absolute;
  bottom: -48px;
  left: 16px;
  width: 96px;
  height: 96px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border: 3px solid var(--accent);
  border-radius: 50%;
  padding: 3px;
}

.profile-info {
  padding: 60px 16px 16px;
}

.profile-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.profile-name h1 {
  font-size: 24px;
  font-weight: bold;
}

.verified {
  display: flex;
  align-items: center;
  gap: 4px;
}

.verified::after {
  content: url(../images/verified.svg);
  width: 1em;
  height: 1em;
}

.profile-stats {
  color: #666;
  margin-bottom: 12px;
}

.profile-description {
  margin-bottom: 16px;
  line-height: 1.5;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-flow: wrap;
  margin-bottom: 16px;
}

.action-row {
  display: flex;
  gap: 8px;
  flex: 1 max-content;
}

.btn {
  width: 100%;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn:hover {
  opacity: 0.9;
}

.btn-primary {
  background-color: var(--accent);
  color: white;
}

.btn-secondary {
  background-color: #e5e7eb;
  color: #374151;
}

.btn-more {
  width: auto;
}

/* Tabs */
.tabs {
  display: flex;
  border-top: 1px solid #e5e7eb;
  overflow: auto;
  white-space: nowrap;
}

.tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  position: relative;
  transition: all 0.2s;
}

.tab.active {
  color: #3b82f6;
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #3b82f6;
}

/* Post */
.post {
  background-color: white;
  padding: 16px;
  margin: 16px 0;
}

.post-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  border: 2px solid var(--accent);
  padding: 2px;
}

.post-info {
  flex: 1;
}

.post-author {
  font-weight: 600;
  margin-bottom: 2px;
}

.post-time {
  color: #65676b;
  font-size: 0.9rem;
}

.post-time::after {
  content: " • " url(../images/world.svg);
}

.post-content {
  display: flex;
  flex-flow: column;
  gap: 8px;
  margin-bottom: 12px;
}

.post-images {
  display: flex;
  justify-content: center;
}

.post-stats {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
}

.post-likes {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-actions {
  display: flex;
  gap: 4px;
  border-top: 1px solid #e5e7eb;
  margin: 12px 0;
  overflow: auto;
}

.post-action {
  flex: 1;
  padding: 8px 0;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: min(12px, 3.5vw);
  font-weight: 600;
  color: #666;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.reactions {
  display: flex;
  flex-flow: row-reverse;
}

.reactions .icon {
  border-radius: 50%;
  outline: 2px solid white;
}

.post-action:hover {
  background-color: #f3f4f6;
}

/* Comments */
.comments-section {
  margin-top: 16px;
}

.comment-input {
  display: flex;
  gap: 12px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  padding: 6px 12px;
  max-width: 768px;
  margin: auto;
  z-index: 99;
}

.comment-field-wrapper {
  display: flex;
  gap: 12px;
  background-color: #f3f4f6;
  border-radius: 9em;
  font-size: 14px;
  padding: 6px 8px 6px 12px;
  flex: 1;
}

.comment-field {
  flex: 1;
}

.comment {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  background-color: #d1d5db;
  border-radius: 50%;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
  min-width: 0;
}

.comment-bubble {
  background-color: #f3f4f6;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 4px;
}

.comment-text {
  font-size: 14px;
  line-height: 1.4;
}

.comment-images {
  display: flex;
  padding: 5px 5px 5px 0;
}

.comment-image {
  height: 100%;
  min-width: 0;
  max-height: 600px;
}

.comment-actions {
  display: flex;
  gap: 6px 16px;
  flex-flow: wrap;
  align-items: center;
  font-size: 12px;
  color: #666;
}

.comment-actions button {
  color: #666;
}

.comment-actions button:hover {
  text-decoration: underline;
}

.comment-likes {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* Reply */
.reply {
  margin-left: 48px;
}

.reply .reply {
  margin: 0;
}

.reply .comment-avatar {
  width: 32px;
  height: 32px;
}

.author-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #666;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
}

.author-label::before {
  content: "";
  background: url(../images/author.png) center / cover;
  width: 12px;
  height: 12px;
}

/* Info Tab */
.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.info-icon {
  width: 24px;
  height: 24px;
  color: #666;
}

.info-text {
  flex: 1;
}

.info-text a {
  color: #3b82f6;
  text-decoration: none;
}

/* Icons */
.icon {
  display: block;
  width: 18px;
  height: 18px;
}

.icon-like-solid { content: url(../images/like-solid.svg); }
.icon-like-solid-black { content: url(../images/like-solid-black.svg); }
.icon-like-outline { content: url(../images/like-outline.svg); }
.icon-like { content: url(../images/like.svg); }
.icon-heart { content: url(../images/heart.svg); }
.icon-laugh { content: url(../images/laugh.svg); }
.icon-chat { content: url(../images/message.svg); }
.icon-comment { content: url(../images/comment.svg); }
.icon-send-post { content: url(../images/send-post.svg); }
.icon-share { content: url(../images/share.svg); }
.icon-more { content: url(../images/more.svg); }
.icon-info { content: url(../images/info.svg); }
.icon-star { content: url(../images/star.svg); }
.icon-gif { content: url(../images/gif.svg); }
.icon-smile { content: url(../images/smile.svg); }
.icon-send { content: url(../images/send.svg); }
.icon-close { content: url(../images/close.svg); }

/* Support Button */
.support-button {
  position: fixed;
  bottom: 60px;
  right: 40px;
  width: 80px;
  height: 80px;
  background: #fff;
  border-radius: 25%;
  box-shadow: 0 3px 20px -3px #d5dbed;
  padding: 16px;
  z-index: 99;
}

.notification {
  display: flex;
  align-items: center;
  position: absolute;
  bottom: 80%;
  right: -10%;
  width: 0;
  height: 0;
  background: #ff4001;
  border-radius: 9em;
  border: 3px solid #ff4001;
  box-shadow: 0 3px 20px -4px #ff0102;
  font-size: 14px;
  animation: 0.5s cubic-bezier(.63,.01,.26,1) forwards;
  animation-name: notifEx, notif;
  animation-delay: 5s, 6s;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
}

.notification-text {
  width: max-content;
  color: #fff;
  transform: translatex(120px);
  animation: notifMsg 15s linear infinite 7s;
}

@keyframes notifEx {
  0% {
    width: 0;
    height: 0;
    opacity: 0;
  }

  5% {
    opacity: 1;
  }

  100% {
    width: 30%;
    height: 30%;
    opacity: 1;
  }
}

@keyframes notif {
  0% {
    width: 30%;
    opacity: 1;
  }

  100% {
    width: 140%;
  }
}

@keyframes notifMsg {
  0% {
    transform: translatex(120px);
  }
  100% {
    transform: translatex(-100%);
  }
}

/* Swiper */
.swiper {
  max-width: 400px;
  overflow: hidden;
}

.swiper-wrapper {
  display: flex;
}

.swiper-slide {
  width: 100%;
  height: 100%;
}

.swiper-button-prev,
.swiper-button-next {
  content: url(../images/back.svg);
  width: 32px;
}

.swiper-button-prev {
  order: -1;
}

.swiper-button-next {
  order: 1;
  rotate: 180deg;
}

/* Form */
.form {
  display: grid;
  gap: 15px;
  background: #F3F3F3;
  border-radius: 16px;
  padding: 16px;
}

.form-fields {
  display: grid;
  gap: 15px;
}

.form-field {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.form-input {
  width: 100%;
  border-bottom: 1px solid;
  color: inherit;
  font-size: 16px;
  padding: 6px;
}

/* Loading */
.loading-screen {
  display: grid;
  text-align: center;
  justify-items: center;
  gap: 16px;
  padding: 40px 0px;
}

.loading-result {
  padding: 3px;
  border-radius: 4px;
  font-weight: bold;
  background-color: green;
  color: white;
}

.loader{
	display: flex;
	flex-direction: row;
}

.loader span{
	background: #ecf0f6;
	border: 1pz solid rgba(144,163,204,0.24);
	height: 20px;
	width: 8px;
	margin-left: 4px;
	transform-origin: center center;
	animation: .8s ease spinner1 999;
}

.loader .spinner2{
	animation-delay: .1s;
}

.loader .spinner3{
	animation-delay: .2s;
}

@keyframes spinner1{
	0%,50%{
		transform: scaleX(1) scaleY(1);
	}
	25%{
		transform: scaleX(1.2) scaleY(1.6);
		background: #90a3cc;
		border-color: #335890;
	}
}

/* Boxes */
.boxConteiner {
  display: grid;
  gap: 20px;
  text-align: center;
}

.boxGrid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 90%;
  margin: auto;
}

.animated {
  transition: all 2s;
}

.item {
  display: flex;
  justify-content: center;
  position: relative;
  width: calc(30%);
  margin-bottom: calc(25%);
}

.item img {
  cursor: pointer;
  position: absolute;
  width: 60%;

}

.item img:hover {
  top: -5px;
}

.image1 {
  top: 0px;
  z-index: 3
}

.image2 {
  top: 0px;
  z-index: 2
}

.image3 {
  top: 0px;
  z-index: 1
}

.image4 {
  top: 20px;
  z-index: 1;
  max-width: 30%;
  transform: translateY(50%);
}

@keyframes shake {
   0% { transform: translate(3px, 3px) rotate(0deg); }
  10% { transform: translate(-3px, -6px) rotate(-1deg); }
  20% { transform: translate(-9px, 0px) rotate(1deg); }
  30% { transform: translate(9px, 6px) rotate(0deg); }
  40% { transform: translate(3px, -3px) rotate(1deg); }
  50% { transform: translate(-3px, 6px) rotate(-1deg); }
  60% { transform: translate(-9px, 3px) rotate(0deg); }
  70% { transform: translate(9px, 3px) rotate(-1deg); }
  80% { transform: translate(-3px, -3px) rotate(1deg); }
  90% { transform: translate(3px, 6px) rotate(0deg); }
  100% { transform: translate(3px, -6px) rotate(-1deg); }
}

.shake {
  animation: shake 1s;
  animation-iteration-count: 2;
}

@media only screen and (max-width: 900px) {
  .item {
    width: calc(30%);
    margin-bottom: calc(40%);
  }
  .item img {
    width: 100%;
  }
  .image4 {
    max-width: 50%;
  }
}

/*Модальное окно*/
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  display: none;
  width: 100%;
  height: 100%;
  overflow: auto;
  outline: 0;
}

/* Стилизация содержимого модального окна */
.my-modal-content {
  background-color: #fefefe;
  margin: 15% auto; /* Отступы сверху и снизу */
  padding: 20px;
  border: 2px solid #888;
  border-radius: 20px;
  width: 350px; /* Ширина окна */
  text-align: center;
}

.my-modal-header {
  margin: 20px;
  padding: 2px 10px;
  border-radius: 10px;
  text-align: center;
}

.my-modal-body {
  display: grid;
  gap: 16px;
}

.my-modal-img {
  position: absolute;
  width: 200px;
  transform: translate(-50%);
}

#modal-bg {
  z-index: 1000;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5); /* Полупрозрачный черный фон */
  display: none;
}

.modalWithForm {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 40px 10px;
  z-index: 1000;
}

.modalWithForm .content {
  display: flex;
  flex-flow: column;
  background-color: #FFFFFF;
  padding: 20px 10px;
  max-width: 440px;
  height: 100%;
  margin: 0 auto;
  border-radius: 20px;
}

.modalWithForm .form-main {
  flex: 1;
  overflow: auto;
}

.modalWithForm .form-product {
  display: flex;
  grid-column-gap: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 10px;
}

.modalWithForm .form-product .product-image {
  height: 100px;
  width: auto;
}

.modalWithForm .form-product p {
  margin-top: 5px;
  margin-bottom: 0;
}

.modalWithForm .form-product .price {
  display: flex;
  align-items: center;
  grid-column-gap: 10px;
}

.modalWithForm .form-product .price .old {
  text-decoration: line-through;
}

.modalWithForm .form-product .price .new {
  color: red;
}

.modalWithForm .buttonWrapper {
  margin-top: auto;
}

.modalWithForm h4 {
  font-size: 18px;
  font-weight: 700;
}
