html, body {
    margin: 0;
    padding: 0;
    background-color: #202020;
}

@font-face {
    font-family: 'Prompt';
    src: url('/fonts/Prompt.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap; 
}

.panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 1000;

    background: linear-gradient(to bottom, #202020 0%, rgba(32,32,32,0) 100%);


    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.back-main {
    width: 100px;
    height: 37px;

    margin-left: 17px;

    border-radius: 15px;
    background-color: #d0d0d0;
    color: #101010;
    text-decoration: none;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: bold;

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    transform: scale(1) rotate(0);

    transition: all 0.4s ease;
}

.back-main.element-show {
    opacity: 1;
    animation: bounceTransform 0.8s ease-out forwards;
}

@keyframes bounceTransform {
    0% {
        transform: scale(1) rotate(0deg);
    }
    20% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}


.back-main:hover {
    background-color: #535353;
    color: #ababab;

    transform: rotate(-3deg) scale(1.01);
}


.right-items-panel {
    display: flex;
    flex-direction: row;
    gap: 10px;

    margin-right: 12px;
}

@media (min-width:768px) {
    .back-main {
        margin-left: 50px;
    }

    .right-items-panel {
        margin-right: 50px;
    }
}

.profile {
    width: 50px;
    height: 50px;
    border-radius: 100px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.profile img {
    width: 40px;
    height: 40px;
    border-radius: 100px;
}

.grid {
    width: 50px;
    height: 50px;
    border-radius: 100px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.grid img {
    width: 40px;
    height: 40px;
    border-radius: 100px;
    filter: invert();
}

.grid:hover {
    background-color: #2a2a2a;
}

.profile:hover {
    background-color: #2a2a2a;
}


.title-container {
    margin-top: 85px;
    margin-left: 17px;
    margin-right: 17px;
    margin-bottom: 30px;
}

@media (min-width:768px) {
    .title-container {
        margin-left: 50px;
        margin-right: 50px;
        margin-bottom: 50px;
    }
}

.title {
    margin: 0 0 5px 0;

    font-size: 40px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: #d0d0d0;

    opacity: 0;
    transform: translateX(-100px) rotate(-1deg);
}

.title.element-show {
    opacity: 1;
    transform: translateX(0);
    transition: all 1s ease;
}

.title-p {
    margin: 0;

    font-size: 17px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
    color: #ababab;

    opacity: 0;
    transform: translateX(-120px);
}

.title-p.element-show {
    opacity: 1;
    transform: translateX(0);
    transition: all 1.5s ease;
}

@media (min-width:768px) {
    .title {
        font-size: 70px;
    }

    .title-p {
        font-size: 24px;
    }
}

.content-container {
    width: auto;
    height: auto;

    margin-top: 20px;
    margin-left: 17px;
    margin-right: 17px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width:768px) {
    .content-container {
        display:grid;
        grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
        gap: 35px;

        margin-left: 50px;
        margin-right: 50px;
    }
}

.cards-top {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    flex-direction: row;

    padding-left: 17px;
    padding-right: 17px;
}

.done-jobs {
    width: 150px;
    height: 40px;
    background-color: #1a1a1a;
    border-radius: 12px;
    border: 0.7px solid #31313182;

    display: flex;
    justify-content: center;
    align-items: center;

    color: #ababab;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;

    opacity: 0;
    transform: translateY(70px);
}

.done-jobs.element-show {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.34, 1.6, 0.64, 1);
}

.rating {
    width: 150px;
    height: 40px;
    margin-left: auto;
    background-color: #1a1a1a;
    border-radius: 12px;
    border: 0.7px solid #31313182;

    display: flex;
    justify-content: center;
    align-items: center;

    color: #ababab;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;

    opacity: 0;
    transform: translateY(70px);
}

.rating.element-show {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.7s cubic-bezier(0.34, 1.5, 0.64, 1);
}

.rating h3::after{
    content: " " attr(data-rating) " ★";
    margin-left: 6px;
}

.done-jobs h3::after {
    content: attr(data-count);
    margin-left: 6px;
}

@media (min-width:768px) {
    .cards-top {
        width: 300px;
        display: flex;
        gap: 20px;
        flex-direction: row;
    
        padding-left: 50px;
        padding-right: 0;
    }
}

/* CARDS (slight upgrade, not too much) */
.card {
    width: 100%;
    height: auto;
    margin-bottom: 30px;

    background-color: #141414;
    border-radius: 25px;
    border: 1px solid #333;
    overflow: hidden;

    /* Hide */
    opacity: 0.2;

    /* Один transition на всё */
    transition:
        opacity 0.8s ease,
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.card.element-show {
    opacity: 1;
}

/* Hover ТОЛЬКО когда уже показалась */
.card.element-show:hover {
    transform: translateY(-2px);
    border-color: #3d3d3d;
    box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}


/* 16:9 */
.card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    /* плавный micro-zoom */
    transform: scale(1);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.25s ease;
}

.card:hover .card-img img {
    transform: scale(1.03);
    filter: brightness(1.03);
}

/* content */
.card-content-top {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 12px 8px;
}

.card-content-bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px 12px;
}

/* typography (чуть ровнее) */
.title-card {
    color: #d0d0d0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 20px;          /* чуть компактнее */
    font-weight: 700;
    letter-spacing: 0.2px;
    margin: 0;
}

.title-card-p {
    color: #ababab;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 14.5px;
    line-height: 1.35;
    margin: 0;
}

/* buttons */
.view-btn,
.reviews-btn {
    height: 40px;
    width: 50%;              /* чтобы 2 кнопки реально помещались */
    border-radius: 15px;

    display: flex;
    justify-content: center;
    align-items: center;

    text-decoration: none;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 700;

    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.view-btn {
    background-color: #d0d0d0;
    color: #141414;
}

.view-btn:hover {
    background-color: #e2e2e2;
    transform: translateY(-2px) scale(1.02);

}

.reviews-btn {
    border: 1px solid #3a3a3a;
    background-color: #232323;
    color: #d0d0d0;
}

.reviews-btn:hover {
    background-color: #2b2b2b;
    border-color: #4a4a4a;
    transform: translateY(-2px) scale(1.02);
}



/*Modal оценки*/
.modal-backdrop {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1500;

    width: 100%;
    height: 100vh;

    background: #0000005b;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.modal {
    position: fixed;
    inset: 0;
    margin: auto;
    z-index: 2000;

    width: 300px;
    height: 227px;
    background-color: #101010;
    border: 0.7px solid #202020;
    border-radius: 20px;
}

.modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 14px 10px 14px;
  border-bottom:1px solid #1b1b1b;
}

.modal-title{
  font: 700 14px/1 Arial, Helvetica, sans-serif;
  color:#eaeaea;
}

.modal-close{
  width:32px;
  height:32px;
  border-radius:10px;
  border:1px solid #222;
  background:#121212;
  color:#cfcfcf;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.modal-close:hover{
  background:#181818;
  border-color:#2a2a2a;
  transform: scale(1.03);
}

.modal-body {
  height: calc(200px - 52px - 56px); /* header + footer */
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:8px 14px;
}

.modal-rating {
  display:flex;
  gap:8px;
}

.star {
  font-size:28px;
  line-height:1;
  border:none;
  background:transparent;
  cursor:pointer;
  padding:4px;
  color:#2e2e2e;               /* пустая */
  transition: transform .12s ease, color .12s ease;
}
.star:hover{
  transform: translateY(-1px) scale(1.04);
}

/* подсвеченные */
.star.is-active{
  color:#f5c451;
}

.rating-value{
  font: 600 12px/1 Arial, Helvetica, sans-serif;
  color:#9e9e9e;
}

.modal-footer{
  padding:12px 14px 14px 14px;
  border-top:1px solid #1b1b1b;
  display:flex;
  justify-content:center;
}

.modal-submit{
  width:100%;
  height:34px;
  border-radius:12px;
  border:1px solid #222;
  background:#e6e6e6;
  color:#101010;
  font:700 13px/1 Arial, Helvetica, sans-serif;
  cursor:pointer;

  transition: transform .18s cubic-bezier(.2,1,.2,1),
              background-color .18s ease,
              border-color .18s ease,
              box-shadow .18s ease;
}

.modal-submit:hover{
  transform: translateY(-2px);
  background:#dcdcdc;
  border-color:#343434;
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}

.modal-submit:active{
  transform: translateY(0px);
  background:#d4d4d4;
  box-shadow: 0 4px 12px rgba(0,0,0,.28);
}

.modal-submit:focus-visible{
  outline: none;
  border-color:#505050;
  box-shadow: 0 0 0 3px #b9000062;
}

/*Анимация при появление*/
/* Анимации — НЕ трогаю твои .modal-backdrop и .modal, только добавляю классы */
.modal-backdrop.is-hidden{ display:none; }

.modal-backdrop{
  opacity: 0;
  transition: opacity .25s ease;
}
.modal-backdrop.is-open{
  opacity: 1;
}

/* Модалка: “Apple-ish” pop + slight rotate */
.modal{
  opacity: 0;
  transform: translateY(14px) scale(.96);
  transition: transform .45s cubic-bezier(.2,1,.2,1), opacity .25s ease;
  will-change: transform, opacity;
}
.modal-backdrop.is-open .modal{
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* закрытие чуть быстрее */
.modal-backdrop.is-closing .modal{
  transform: translateY(10px) scale(.97);
  opacity: 0;
}
.modal-backdrop.is-closing{
  opacity: 0;
}





.toast{
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  z-index: 3000;

  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid #222;
  background: rgba(16,16,16,.92);
  color: #eaeaea;
  font: 700 13px/1 Arial, Helvetica, sans-serif;

  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .35s cubic-bezier(.2,1,.2,1);
}

.toast.is-show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
