body {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #333;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    letter-spacing: 0.02em;
}

main,
footer {
    max-width: 768px;
    margin: 0 auto;
    padding: 1rem;
    background-color: rgb(255, 255, 255);
}

.write-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.icon-unique-write {
    width: 30px;
    height: 30px;
    vertical-align: middle;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    padding: 1rem 2rem;
    border-bottom: 0.1px solid rgba(228, 228, 228, 0.521);
    background-color: #fff;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.medium-logo {
    width: auto;
    height: 30px;
}

.search-bar {
    display: inline-flex;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    gap: 0.5rem;
}

.search-icon {
    width: 25px;
    height: 25px;
    color: #555;
}

.input-search {
    background-color: #44444400;
    border: none;
}

.search-bar span {
    color: #333;
    font-size: 1rem;
}

.search-bar input {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    font-size: 1rem;
    width: 200px;
    transition: border-color 0.2s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #999;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-right a {
    text-decoration: none;
    color: #6b6b6b;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.nav-right a:hover {
    color: #292929;
}

.sign-up-btn {
    background-color: rgb(26, 137, 24);
    color: #fff !important;
    padding: 0.5rem 0.9rem;
    border-radius: 20px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.sign-up-btn:hover {
    background-color: rgb(20, 104, 18);
}

.header-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.post-title {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 2.4rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #000;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom:3px;
}

.meta-text {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
  
}

.author {
    font-weight: bold;
    color: #333;
}

.separator {
    color: #ccc;
}

.read-time,
.post-date {
    color: #555;
}

.follow-btn {
    margin-left: 0.5rem;
    color: #757575;
    font-size: 1rem;
    text-decoration: none;
    font-weight: 500;
}

.follow-btn:hover {
    text-decoration: underline;
}

.divider {
    border: none;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.actions-left,
.actions-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.action-item,
.action-icon {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    color: #666;
    gap: 0.3rem;
}

.action-item:hover svg,
.action-icon:hover svg {
    color: #000000;
}

/*.post-image {*/
/*    margin: 2rem 0;*/
/*    border-radius: 4px;*/
/*    overflow: hidden;*/
/*    max-width: 100%;*/
/*    width: 100%;*/
/*      height: 400px;*/
/*      background-position: center;*/
/*    background-size: cover;*/
/*}*/

.post-image {
    margin: 2rem 0;
  border-radius: 4px;
  overflow: hidden;
  max-width: 100%;
}

.post-image img {
    width: 100%;
    display: block;
}

main p {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.reading-stats {
    display: flex;
    gap: 1rem;
    color: #999;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.comments-section {
    margin-top: 2rem;
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

/* Заголовок комментариев */
.comments-title {
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
  }
  
  /* Поле ввода "What are your thoughts?" */
 /* Стилизуем обертку для нового комментария */
.new-comment-box {
    margin-bottom: 2rem;
    padding: 1rem 1rem;
    border-top: 1px solid #eee;
    /* Можно чуть увеличить отступы, чтобы "новый комментарий" выглядел объемнее */
  }
  
  /* Верхняя полоска: аватар + текст "Write a response" */
  .write-response-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.8rem; /* Отступ перед textarea */
  }
  
  /* Аватарка */
  .write-response-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
  }
  
  /* Текст "Write a response" */
  .write-response-text {
    font-size: 1rem;
    color: #666; /* немного посветлее, как на скрине */
  }
  
  /* Контейнер под само поле ввода */
  .write-response-textarea {
    background-color: #f5f5f5;  /* Светло-серый фон, как на скриншоте */
    border: 1px solid #ddd;     /* Легкая граница */
    border-radius: 6px;         /* Небольшое скругление углов */
    padding: 0.6rem 1rem;       /* Отступ внутри */
  }
  
  /* Само поле <textarea> */
  .write-response-input {
    width: 100%;
    min-height: 10px;
    border: none;
    outline: none;
    background-color: transparent; /* пусть фон берётся от родителя */
    resize: none; /* чтобы не было ручки изменения размера */
    font-size: 1rem;
    color: #333;
    font-family: inherit; /* унаследовать общий шрифт */
  }
  
  /* Placeholder в textarea */
  .write-response-input::placeholder {
    color: #999;
  }
  
  
  /* Каждый комментарий */
  .comment {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
  }
  
  .comment-author-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
  }
  
  .comment-author {
    font-weight: 600;
    color: #333;
  }
  
  .comment-date {
    color: #999;
    font-size: 0.95rem;
  }
  
  /* Текст комментария */
  .comment-body {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 0.5rem;
  }
  
  /* Блок для clap/ответа и т.д. */
  .comment-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    color: #555;
  }
  
  .comment-action-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
  }
  
  /* Делаем иконки именно 25×25 */
  .comment-action-item svg {
    fill: #757575;
    width: 25px;
    height: 25px;
    transition: fill 0.2s;
  }
  
  .comment-action-item:hover svg {
    fill: #000;
  }
  
  /* Кнопка "Reply" */
  .comment-reply-btn {
    background: none;
    border: none;
    color: #757575;
    padding: 0;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s;
  }
  
  .comment-reply-btn:hover {
    color: #000;
  }
  

a {
    color: #0077;
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.5rem 1rem;
  }
  .nav-left {
    gap: 0.5rem;
  }

  .search-bar input {
    display: none;
  }

     .search-bar { display: none; } */
  .nav-right {
    gap: 1rem;
  }
  .sign-up-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
    border-radius: 16px;
  }

     .write-link { display:none; }
  
}
/* Полностью стилизуем оверлей модалки */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.3);
    display: none; /* изначально скрыто */
    align-items: center; /* для flex-центровки */
    justify-content: center;
    z-index: 9999;
  }
  
  /* Контейнер модалки */
  .modal-content {
    position: relative;
    background-color: #fff;
    width: 90%;
    max-width: 400px;
    padding: 2rem;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    font-family: sohne, "Helvetica Neue", Helvetica, Arial, sans-serif;
  }
  
  /* Крестик */
  .modal-close-btn {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
  }
  .modal-close-btn:hover {
    color: #333;
  }
  
  /* Заголовок */
  .modal-title {
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 400;
    color: #000;
  }
  
  /* Кнопки "Sign up with..." */
  .signup-btn {
    position: relative; /* чтобы иконку позиционировать */
    display: block;
    width: 100%;
    max-width: 340px;
    margin: 0 auto 1rem auto; /* авто по бокам + отступ снизу */
    padding: 0.6rem 2.5rem;    /* доп. отступы справа-слева */
    border: 1px solid #000;
    border-radius: 9999px;
    background: #fff;
    color: #000;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    text-align: center; /* центрируем текст */
    box-sizing: border-box;
    transition: background-color 0.2s ease;
  }
  .signup-btn:hover {
    background-color: #f2f2f2;
  }
  
  /* Иконка слева */
  .signup-icon,
  .signup-icon-email {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    object-fit: contain;
  }
  
  /* Сам текст кнопки в <span> */
  .signup-text {
    /* чтобы текст шел по центру */
    display: inline-block;
  }
  
  /* "Already have an account?" */
  .already-have {
    margin: 1rem 0;
    font-size: 1rem;
  }
  .already-have a {
    color: #0f730c; /* зелёный, как на Medium */
    text-decoration: none;
  }
  .already-have a:hover {
    text-decoration: underline;
  }
  
  /* Terms/Privacy */
  .terms {
    font-size: 0.9rem;
    color: #757575; 
    line-height: 1.4;
    margin-top: 2rem;
  }
  .terms a {
    color: #757575;
    text-decoration: underline;
  }
  .terms a:hover {
    color: #333;
  }
  /* Обёртка самой модалки, у вас уже есть .modal-content { position: relative; } */

.modal-content {
    position: relative; /* чтобы оверлей мог позиционироваться абсолютно */
    /* ... ваши прочие стили ... */
  }
  
  /* Оверлей, который покрывает контент полупрозрачно */
  .modal-loading-overlay {
    display: none;                /* По умолчанию скрыто */
    position: absolute;           /* Абсолютно внутри .modal-content */
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8); /* Белый фон с прозрачностью */
    z-index: 999;                  /* Поверх всего внутри modal-content */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  /* Спиннер (анимация вращения) */
  .spinner {
    width: 40px;
    height: 40px;
    margin-bottom: 0.8rem;
    border: 4px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    100% { transform: rotate(360deg); }
  }
  
  /* Текст под спиннером */
  .modal-loading-overlay p {
    font-size: 1rem;
    color: #333;
    margin: 0;
  }
  