/* =========================
   PROFILE
========================= */

.profile {
    width: 100%;
    padding: 40px 0;
    border-bottom: 1px solid #79797C;

    display: flex;
    align-items: center;
    gap: 40px;
}

/* ---------- BLOCKS ---------- */

.profile .firstBlock {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile .secondBlock {
    flex: 1 1 auto;
    min-width: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.profile .thirdBlock {
    flex: 0 0 260px;
    min-width: 220px;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;

    text-align: right;
}

/* ---------- AVATAR ---------- */

.profile .avatar {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* ---------- TOP PROFILE INFO ---------- */

.profile .profileTop {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.profile .name {
    margin: 0 0 8px;
    font-weight: 500;
    font-size: 42px;
    line-height: 1.1;
    opacity: 0.9;
}

.profile .cityDate {
    margin: 0;
    font-weight: 300;
    font-size: 15px;
    opacity: 0.8;
}

/* ---------- VERIFICATIONS ---------- */

.profile .profileBottom {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    align-items: center;
}

.profile .profileBottom .verification {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile .profileBottom h5 {
    margin: 0;
    font-weight: 300;
    opacity: 0.8;
    font-size: 17px;
    line-height: 1.2;
}

/* ---------- EXTRA ---------- */

.profile .verify {
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile .agree,
.profile .disagree {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* ---------- RIGHT BLOCK ---------- */

.profile .thirdBlock .share,
.profile .thirdBlock .exit {
    margin: 0;
    font-weight: 300;
    font-size: 18px;
    opacity: 0.85;
    cursor: pointer;
}

.profile .thirdBlock .exit {
    color: #FD2127;
    margin-top: 4px;
}

.profile .thirdBlock .write {
    width: 100%;
    max-width: 220px;
    min-height: 44px;
    background: #202B6C;
    border-radius: 25px;
    color: white;
    font-size: 18px;

    display: flex;
    justify-content: center;
    align-items: center;

    text-align: center;
    margin-top: 12px;
}

/* ---------- RESET MARGINS ---------- */

.profile .profileTop h5,
.profile .profileTop h3,
.profile .secondBlock h3,
.profile .thirdBlock h4 {
    margin: 0;
}

/* =========================
   FAVORITES PAGE
========================= */

.fav-page {
    max-width: 100%;
    margin: 0 auto 100px;
}

.fav-title {
    margin: 10px 0;
    text-align: left;
    font-size: 26px;
    font-weight: 900;
    color: #181D3B;
}

.fav-count {
    font-size: 18px;
    font-weight: 400;
    opacity: 0.6;
    margin-left: 6px;
}

/* =========================
   SECTION
========================= */

.fav-section {
    border-radius: 14px;
    padding: 15px 0;
}

.fav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.fav-h2 {
    margin-left: 50px;
    font-size: 20px;
    font-weight: 400;
    color: #181D3B;
}

/* =========================
   SLIDER WRAPPER
========================= */

.fav-slider {
    position: relative;
    padding: 0 50px;
}

/* =========================
   ARROWS
========================= */

.fav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    cursor: pointer;
    transition: all .15s ease;
    z-index: 5;
    user-select: none;
}

.fav-arrow--left {
    left: 15px;
}

.fav-arrow--right {
    right: 15px;
}

.fav-arrow:hover {
    font-size: 50px;
    opacity: 1;
}

.fav-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

/* =========================
   TRACK
========================= */

.catalogFavorite {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 220px;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 0 12px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.catalogFavorite::-webkit-scrollbar {
    display: none;
}

.catalogFavorite--center {
    overflow-x: hidden;
}

/* =========================
   CARD
========================= */

.pages {
    width: 220px;
    height: auto;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.18s ease;
    cursor: pointer;
}

.pages:hover {
    transform: translateY(-4px);
}

/* =========================
   IMAGE
========================= */

.image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.03);
}

/* =========================
   TEXT
========================= */

.price {
    margin: 15px 0 0;
    font-size: 18px;
    font-weight: 700;
    min-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title {
    margin: 0 0 3px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info {
    margin: 0 0 5px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.55);
    min-height: 25px;
}

/* =========================
   ACTIONS
========================= */

.post-actions {
    position: relative;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding-bottom: 8px;
}

.post-action-btn {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    color: #181D3B;
    background: rgba(24, 29, 59, 0.08);
    border-radius: 8px;
    transition: all 0.15s ease;
    border: none;
    cursor: pointer;
}

.post-action-btn:hover {
    background: rgba(24, 29, 59, 0.14);
}

.post-action-btn--delete {
    color: #b42318;
    background: rgba(180, 35, 24, 0.08);
}

.post-action-btn--delete:hover {
    background: rgba(180, 35, 24, 0.14);
}

/* =========================
   OVERLAY
========================= */

.card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
}

.post-actions,
.post-actions * {
    position: relative;
    z-index: 2;
}

.price,
.title,
.info {
    position: relative;
    z-index: 3;
}

/* =========================
   EMPTY
========================= */

.fav-empty {
    padding: 3px 50px;
    color: rgba(0, 0, 0, 0.55);
    font-weight: 300;
}

/* =========================
   UNDER LINKS
========================= */

.underLink {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    margin-bottom: 80px;
}

.underLink > * {
    flex: 1;
    text-align: center;
    color: black;
    font-size: 20px;
    cursor: pointer;
}

.underLink form {
    margin: 0;
}

.underLink button {
    width: 100%;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* =========================
   TELEGRAM LABEL
========================= */

.pages .takeTelegram {
    position: absolute;
    top: 10px;
    left: 10px;

    width: 120px;
    min-height: 18px;
    line-height: 18px;

    text-align: center;
    border-radius: 20px;
    background: white;
    opacity: 0.7;
    font-size: 12px;
    font-weight: 300;

    z-index: 4;
}

.pages .topBadge {
    position: absolute;
    top: 10px;
    left: 160px;

    width: 50px;
    min-height: 18px;
    line-height: 18px;

    text-align: center;
    border-radius: 20px;
    background: white;
    opacity: 0.7;
    font-size: 12px;
    font-weight: 300;

    z-index: 4;
}

/* =========================
   MODAL BASE
========================= */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.modal-content {
    background: white;
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    border-radius: 12px;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 28px;
    cursor: pointer;
}

/* =========================
   ADS MODAL
========================= */

.ads-options {
    display: flex;
    gap: 16px;
    margin-top: 15px;
}

.ads-card {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 10px;
    width: 100%;
    text-align: center;
    transition: 0.2s;
}

.ads-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.ads-card a {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px;
    background: #202B6C;
    color: white;
    text-decoration: none;
    border-radius: 6px;
}

.ads-card p {
    font-weight: 300;
    opacity: 0.85;
    font-size: 15px;
    min-height: 50px;
}

/* =========================
   VERIFY MODAL
========================= */

.verify-modal {
    width: 600px;
    max-width: 95%;
}

.subtitle {
    color: #666;
    margin-bottom: 20px;
}

.verify-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.verify-card {
    flex: 1 1 150px;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: 0.2s;
    background: #fafafa;
}

.verify-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    background: white;
}

.verify-card h3 {
    margin-bottom: 8px;
    font-size: 17px;
}

.verify-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    min-height: 50px;
}

/* =========================
   BUTTONS
========================= */

.btn {
    display: inline-block;
    padding: 10px 14px;
    background: #202B6C;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

/* =========================
   PROFILE MODAL
========================= */

.profile-modal {
    width: 560px;
    max-width: 95%;
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 28px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    position: relative;
}

.profile-modal-header {
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.profile-modal-header h2 {
    margin: 0 0 6px;
    font-size: 30px;
    line-height: 1.1;
    font-weight: 700;
    color: #111;
}

.profile-modal-header p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Django form.as_p */

.profile-form p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-form label {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.profile-form input,
.profile-form textarea,
.profile-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dcdfe4;
    border-radius: 12px;
    background: #fafafa;
    font-size: 15px;
    color: #111;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.profile-form textarea {
    min-height: 110px;
    resize: vertical;
}

.profile-form input:focus,
.profile-form textarea:focus,
.profile-form select:focus {
    border-color: #111;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.06);
}

.profile-form input[type="file"] {
    padding: 10px;
    background: #fff;
    border: 1px dashed #cfd4dc;
    cursor: pointer;
}

.profile-form input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.profile-form .helptext {
    font-size: 12px;
    color: #6b7280;
}

.profile-form .errorlist {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #b42318;
    font-size: 13px;
}

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 18px;
    border-top: 1px solid #f0f0f0;
}

.save-btn {
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    background: #202B6C;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 20px rgba(17, 17, 17, 0.18);
    margin: 0 auto;
}

.save-btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.save-btn:active {
    transform: translateY(0);
}

.profile-modal .close {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 28px;
    line-height: 1;
    color: #111;
    cursor: pointer;
    transition: opacity 0.2s;
}

.profile-modal .close:hover {
    opacity: 0.6;
}



.tg-link-box .other {
    font-size: 15px;
    font-weight: 300;
}

.tg-link-box .main {
    font-weight: 400;
    font-size: 18px;
}

.tg-link-box #regenerateBtn {
    background: #222D6D;
    border: none;
    border-radius: 18px;
    color: white;
    width: 150px;
    text-weight: 300;
    text-align: center;
    cursor: pointer;
}
/* =========================
   ADAPTIVE
========================= */

@media (max-width: 1200px) {
    .profile {
        gap: 28px;
        padding: 32px 0;
    }

    .profile .avatar {
        width: 190px;
        height: 190px;
    }

    .profile .name {
        font-size: 34px;
    }

    .profile .thirdBlock {
        flex: 0 0 220px;
        min-width: 200px;
    }

    .profile .thirdBlock .write {
        max-width: 190px;
        font-size: 17px;
    }
}

@media (max-width: 992px) {
    .profile {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 24px;
    }

    .profile .firstBlock {
        flex: 0 0 auto;
    }

    .profile .secondBlock {
        flex: 1 1 0;
        min-width: 260px;
    }

    .profile .thirdBlock {
        flex: 1 1 100%;
        min-width: 100%;
        align-items: flex-start;
        text-align: left;
        margin-top: 6px;
    }

    .profile .thirdBlock .write {
        max-width: 220px;
    }

    .underLink {
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 24px;
        margin-bottom: 56px;
    }

    .underLink > *,
    .underLink form {
        flex: 1 1 calc(50% - 6px);
    }

    .fav-h2 {
        margin-left: 20px;
    }

    .fav-slider {
        padding: 0 36px;
    }

    .fav-arrow--left {
        left: 4px;
    }

    .fav-arrow--right {
        right: 4px;
    }
}

@media (max-width: 768px) {
    .profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        padding: 28px 0;
    }

    .profile .firstBlock,
    .profile .secondBlock,
    .profile .thirdBlock {
        width: 100%;
        flex: 1 1 100%;
    }

    .profile .firstBlock {
        justify-content: center;
    }

    .profile .secondBlock {
        align-items: center;
    }

    .profile .thirdBlock {
        align-items: center;
        text-align: center;
        min-width: 100%;
        gap: 10px;
    }

    .profile .avatar {
        width: 150px;
        height: 150px;
    }

    .profile .profileTop {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 12px;
    }

    .profile .name {
        font-size: 28px;
    }

    .profile .cityDate {
        font-size: 14px;
    }

    .profile .profileBottom {
        justify-content: center;
        gap: 10px 16px;
    }

    .profile .profileBottom .verification {
        justify-content: center;
    }

    .profile .profileBottom h5 {
        font-size: 15px;
    }

    .profile .thirdBlock .write {
        width: 100%;
        max-width: 260px;
        min-height: 44px;
        font-size: 17px;
    }

    .underLink {
        gap: 10px;
        margin-bottom: 42px;
    }

    .underLink > *,
    .underLink form {
        flex: 1 1 100%;
    }

    .underLink > *,
    .underLink button {
        font-size: 18px;
    }

    .fav-title {
        font-size: 22px;
    }

    .fav-count {
        font-size: 16px;
    }

    .fav-h2 {
        margin-left: 0;
        font-size: 18px;
    }

    .fav-header {
        margin-bottom: 12px;
    }

    .fav-slider {
        padding: 0 24px;
    }

    .fav-arrow {
        font-size: 28px;
        width: 28px;
        height: 28px;
    }

    .fav-arrow:hover {
        font-size: 34px;
    }

    .catalogFavorite {
        grid-auto-columns: 200px;
        gap: 12px;
    }

    .pages {
        width: 200px;
    }

    .image {
        height: 160px;
    }

    .price {
        font-size: 16px;
    }

    .title {
        font-size: 13px;
    }

    .info {
        font-size: 11px;
        min-height: auto;
    }

    .post-actions {
        gap: 5px;
    }

    .post-action-btn {
        font-size: 11px;
        padding: 6px 8px;
    }

    .modal-content,
    .profile-modal,
    .verify-modal {
        width: calc(100% - 24px);
        padding: 18px;
        border-radius: 16px;
    }

    .profile-modal-header h2 {
        font-size: 24px;
    }

    .profile-modal-header p,
    .subtitle {
        font-size: 13px;
    }

    .ads-options,
    .verify-options {
        flex-direction: column;
    }

    .verify-card,
    .ads-card {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .profile {
        padding: 22px 0;
        gap: 16px;
    }

    .profile .avatar {
        width: 130px;
        height: 130px;
    }

    .profile .name {
        font-size: 24px;
    }

    .profile .cityDate {
        font-size: 13px;
    }

    .profile .profileBottom {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .profile .profileBottom .verification {
        width: 100%;
        justify-content: center;
    }

    .profile .thirdBlock .share,
    .profile .thirdBlock .exit {
        font-size: 16px;
    }

    .profile .thirdBlock .write {
        max-width: 100%;
        font-size: 16px;
        min-height: 42px;
    }

    .fav-page {
        margin-bottom: 60px;
    }

    .fav-title {
        font-size: 20px;
    }

    .fav-slider {
        padding: 0 18px;
    }

    .catalogFavorite {
        grid-auto-columns: 170px;
        gap: 10px;
    }

    .pages {
        width: 170px;
    }

    .image {
        height: 135px;
    }

    .pages .takeTelegram {
        width: 105px;
        font-size: 11px;
        min-height: 18px;
        line-height: 18px;
    }

    .price {
        margin-top: 10px;
        font-size: 15px;
    }

    .title {
        font-size: 12px;
    }

    .info {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .post-action-btn {
        width: 100%;
        justify-content: center;
    }

    .profile-form input,
    .profile-form textarea,
    .profile-form select {
        font-size: 14px;
        padding: 11px 12px;
    }

    .save-btn,
    .btn {
        width: 100%;
        text-align: center;
    }

    .profile-modal-header h2 {
        font-size: 22px;
    }
}

.topup-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.topup-modal.is-active {
  display: block;
}

.topup-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);

}

.topup-modal__content {
  position: relative;
  z-index: 2;
  width: min(960px, calc(100% - 32px));
  margin: 130px auto;
  background: #fff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.topup-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: none;
  background: #f1f5f9;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}

.topup-modal__close:hover {
  background: #e2e8f0;
}

.topup-modal__title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
}

.topup-modal__subtitle {
  margin: 0 0 24px;
  color: #475569;
  font-size: 15px;
  line-height: 1.5;
}

.topup-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.topup-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
}

.topup-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.topup-card--featured {
  border: 1px solid #202B6C;
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.12);
}

.topup-card__badge {
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.topup-card__badge--accent {
  background: #dbeafe;
  color: #1d4ed8;
}

.topup-card__days {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.topup-card__price {
  font-size: 22px;
  font-weight: 500;
  color: #202B6C;
  margin-bottom: 14px;
}

.topup-card__info {
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 22px;
  flex-grow: 1;
}

.topup-card__btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  background: #202B6C;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.topup-card__btn:hover {
  opacity: 0.92;
}

.topup-card__btn--accent {
  background: #202B6C;
}

@media (max-width: 900px) {
  .topup-plans {
    grid-template-columns: 1fr;
  }

  .topup-modal__content {
    margin: 20px auto;
    padding: 20px;
  }

  .topup-modal__title {
    font-size: 24px;
  }
}