/* Оптимизированные глобальные стили */
:root {
    --primary-color: #6259c3;
    --primary-hover: #7068d4;
    --primary-shadow: rgba(98, 89, 195, 0.3);
    --text-color: #333;
    --text-light: #555;
    --background-color: #f9f9f9;
    --card-bg: #fff;
    --border-color: #eee;
    --animation-speed: 0.25s;
    --transition-standard: all var(--animation-speed) ease;
    --border-radius: 4px;
}
 
/* Базовые стили для всей страницы */
body {
    font-family: 'Montserrat', 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    text-rendering: optimizeSpeed; /* Оптимизация для быстрого рендеринга текста */
    display: flex;
    flex-direction: column;
}
.main {
    max-width: 1200px;
    margin: 0 auto;
    flex: 1 0 auto; /* растягивается на доступную высоту */
    padding: 80px 20px 20px; /* Увеличиваем верхний отступ для хедера */
}

main.main {
    min-height: calc(100vh - 168px); /* 100px = высота футера */
}
/* Скрытие элементов для скринридеров */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    flex: 1 0 auto;
    } 

/* Стили для футера с юридической информацией */
.footer {
    background-color: #f9f9f9;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0; /* футер не сжимается */
}

.footer__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer__legal {
    text-align: center;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.footer__legal p {
    margin: 5px 0;
}

.footer__legal p:first-child {
    font-weight: 500;
    color: #555;
}

/* Адаптация стилей футера для десктопной версии */
@media (min-width: 769px) {
    .footer__container {
        padding: 0 200px;
    }
}

/* Медиа-запросы для футера на мобильных устройствах */
@media (max-width: 768px) {
    .footer {
        padding: 15px 0;
        margin-top: 30px;
    }
    
    .footer__legal {
        font-size: 12px;
    }
    
    .footer__container {
        padding: 0 10px;
    }
}
/* Карточка предложения */
.offer__card {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    cursor: pointer;
  }
  
  .offer__avatar {
    position: relative;
  }
  
  .avatar-img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
  }
  
  .online-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: green; /* Зелёный, если онлайн */
  }
  
  .offer__details {
    flex-grow: 1;
    padding-left: 15px;
  }
  
  .offer__name {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    text-decoration: none;
  }
  
  .offer__rating {
    font-size: 12px;
    color: #999;
  }
  
  .offer__description {
    font-size: 13px;
    color: #666;
    margin: 5px 0;
  }
  
  .offer__price {
    font-weight: bold;
    font-size: 16px;
    color: #008000;
  }
  
  .offer__time {
    font-size: 12px;
    color: #999;
  }
  
  .offer__arrow {
    font-size: 18px;
    color: #555;
    cursor: pointer;
    transition: transform 0.2s;
  }
  
  .offer__arrow:hover {
    transform: scale(1.1);
  }
  
  /* Модальное окно */
  .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
  }
  
  .modal__content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 400px;
    max-width: 100%;
  }
  
  .modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
  }
  
  .modal__table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
  }
  
  .modal__table th, .modal__table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
  }
  
  .modal__table th {
    background-color: #f7f7f7;
  }
  #transaction-list {
    width: 100%;
    padding: 16px;
    box-sizing: border-box;
}

.transaction-header {
    display: grid;
    grid-template-columns: 2fr 6fr 2fr;
    gap: 16px;
    padding: 16px 32px;
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

.transaction-row {
    display: flex;
    flex-direction: column;
    background: #fff;
    margin-bottom: 12px;
    padding: 20px 32px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.transaction-row:hover {
    box-shadow: 0 4px 12px rgba(0, 128, 255, 0.15);
    border-color: #6e8efb;
}

.transaction-row.expanded {
    background-color: #f9fcff;
}

.row-main {
    display: grid;
    grid-template-columns: 2fr 6fr 2fr;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}

.transaction-date .ago {
    font-size: 0.85em;
    color: #999;
    margin-left: 6px;
}

.transaction-desc {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 15px;
}

.transaction-type-status {
    font-size: 13px;
    color: #777;
}

.transaction-amount {
    text-align: right;
    font-weight: 600;
    font-size: 15px;
}

.transaction-details {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #444;
}

.transaction-details div {
    margin-bottom: 6px;
}
.transaction-header > div:last-child {
    text-align: right;
}
@media (max-width: 768px) {
    .transaction-header {
        display: none;
    }

    .row-main {
        grid-template-columns: 1fr;
    }

    .transaction-amount {
        text-align: left;
    }
}
.balance-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f9f9f9;
    font-size: 16px;
    font-weight: 500;
}

.balance-text {
    color: #333;
}

.withdraw-btn {
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.withdraw-btn:hover {
    background-color: #218838;
}
