/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    color: #ffffff;
    position: relative;
    overflow-x: hidden;
}

/* Технологичный фон */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(220, 38, 38, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(239, 68, 68, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(185, 28, 28, 0.08) 0%, transparent 70%);
    z-index: -2;
}

/* Сетка в фоне */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(220, 38, 38, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Анимированные круги */
.tech-circles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
}

.tech-circle {
    position: absolute;
    border: 2px solid rgba(220, 38, 38, 0.2);
    border-radius: 50%;
    animation: rotate 30s linear infinite;
}

.tech-circle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #dc2626;
    border-radius: 50%;
    transform: translateX(-50%);
}

.tech-circle:nth-child(1) {
    top: 10%;
    left: 15%;
    width: 200px;
    height: 200px;
    animation-duration: 25s;
}

.tech-circle:nth-child(2) {
    top: 60%;
    right: 20%;
    width: 150px;
    height: 150px;
    animation-duration: 35s;
    animation-direction: reverse;
}

.tech-circle:nth-child(3) {
    bottom: 20%;
    left: 10%;
    width: 100px;
    height: 100px;
    animation-duration: 20s;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container {
    max-width: 1220px; /* Уменьшено с 1240px для лучшего выравнивания */
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.main-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 
        0 0 20px rgba(220, 38, 38, 0.5),
        0 0 40px rgba(220, 38, 38, 0.3);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #dc2626 50%, #ffffff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.5)); }
    100% { filter: drop-shadow(0 0 20px rgba(220, 38, 38, 0.8)); }
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* About Section */
.about-section {
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 20px;
    padding: 0;
    margin-bottom: 30px;
    height: 550px;
    display: flex;
    overflow: hidden;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.about-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.about-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #dc2626 50%, #ffffff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
    line-height: 1.2;
}

.about-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    text-align: justify;
}

.about-image {
    width: 550px;
    height: 550px;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(220, 38, 38, 0.4);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(220, 38, 38, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    position: relative;
}

.about-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 0%, 
        rgba(220, 38, 38, 0.1) 30%, 
        transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 0;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Responsive for About Section */
@media (max-width: 900px) {
    .about-section {
        flex-direction: column;
        height: auto;
        min-height: 400px;
    }
    
    .about-content {
        padding: 30px;
    }
    
    .about-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .about-text p {
        font-size: 1rem;
    }
    
    .about-image {
        width: 300px;
        height: 300px;
        margin: 30px auto;
        align-self: center;
    }
}

@media (max-width: 768px) {
    .about-section {
        padding: 0;
        margin-bottom: 20px;
    }
    
    .about-content {
        padding: 25px;
    }
    
    .about-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .about-text {
        gap: 15px;
    }
    
    .about-text p {
        font-size: 0.95rem;
        text-align: left;
    }
    
    .about-image {
        width: 250px;
        height: 250px;
        margin: 20px auto;
    }
}

@media (max-width: 480px) {
    .about-content {
        padding: 20px;
    }
    
    .about-title {
        font-size: 1.5rem;
    }
    
    .about-text p {
        font-size: 0.9rem;
    }
    
    .about-image {
        width: 200px;
        height: 200px;
        margin: 15px auto;
    }
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #ffffff;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(220, 38, 38, 0.3);
    border-top: 4px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Agents Grid */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(6, auto);
    gap: 20px;
    padding: 20px 0;
    max-width: 1220px; /* Точное соответствие с контейнером */
    margin: 0 auto;
    justify-items: center; /* Центрирование карточек в ячейках */
}

/* Agent Card */
.agent-card {
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 15px;
    overflow: visible;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 220px;
    height: 280px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s ease-out;
    backdrop-filter: blur(10px);
}

.agent-card:hover {
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(220, 38, 38, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(220, 38, 38, 0.6);
}

.agent-card.expanded {
    z-index: 10;
}

.agent-image {
    width: 100%; /* Изменено с 220px на 100% для точного соответствия */
    height: 220px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
}

.agent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.agent-card:hover .agent-image img {
    transform: scale(1.05);
}

.agent-image.no-image {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    font-size: 3rem;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.agent-symbol {
    width: 100%; /* Добавлено для точного соответствия ширине карточки */
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.1);
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
    font-weight: bold;
    font-size: 0.9rem;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 10px;
    flex-shrink: 0;
    box-sizing: border-box; /* Добавлено для правильного расчета размеров */
}

.more-info-btn {
    width: 100%; /* Добавлено для точного соответствия ширине карточки */
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 0 0 15px 15px;
    flex-shrink: 0;
    margin-top: auto;
    border-top: 1px solid rgba(220, 38, 38, 0.3);
    box-sizing: border-box; /* Добавлено для правильного расчета размеров */
}

.agent-card.expanded .more-info-btn {
    border-radius: 0;
}

.more-info-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
}

/* Agent Card Details (for expanded cards) */
.agent-card .agent-details {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%; /* Добавлено для точного соответствия ширине карточки */
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid rgba(220, 38, 38, 0.4);
    border-top: none;
    border-radius: 0 0 15px 15px;
    padding: 15px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 5;
    min-height: 150px;
    backdrop-filter: blur(15px);
    display: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.agent-card.expanded .agent-details {
    display: block;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(220, 38, 38, 0.1);
    font-size: 0.85rem;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.detail-value {
    color: #ffffff;
    text-align: right;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-value.link {
    color: #dc2626;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.detail-value.link:hover {
    text-decoration: underline;
    color: #ef4444;
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px auto 0; /* Добавлено auto для центрирования */
    padding: 20px;
    max-width: 1220px; /* Соответствие с контейнером */
}

.pagination-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(15, 15, 15, 0.8);
    border: 2px solid rgba(220, 38, 38, 0.4);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.pagination-info {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    height: 50px;
    background: rgba(15, 15, 15, 0.8);
    border: 2px solid rgba(220, 38, 38, 0.4);
    border-radius: 25px;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

/* Details Section */
.details-section {
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    height: 500px;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.details-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.details-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #dc2626 50%, #ffffff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
    line-height: 1.2;
}

.details-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 25px;
}

.details-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    text-align: justify;
}

/* Finances Section */
.finances-section {
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    height: 500px;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.finances-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.finances-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #dc2626 50%, #ffffff 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
    line-height: 1.2;
}

.finances-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 25px;
}

.finances-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    text-align: justify;
}

/* Responsive for Details and Finances Sections */
@media (max-width: 768px) {
    .details-section,
    .finances-section {
        height: auto;
        min-height: 400px;
        padding: 30px;
        margin-bottom: 20px;
    }
    
    .details-title,
    .finances-title {
        font-size: 2rem;
        margin-bottom: 25px;
    }
    
    .details-text,
    .finances-text {
        gap: 20px;
    }
    
    .details-text p,
    .finances-text p {
        font-size: 1rem;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .details-section,
    .finances-section {
        padding: 25px;
    }
    
    .details-title,
    .finances-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .details-text p,
    .finances-text p {
        font-size: 0.95rem;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #ffffff;
    max-width: 1220px; /* Соответствие с контейнером */
    margin: 0 auto;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
    filter: drop-shadow(0 0 20px rgba(220, 38, 38, 0.3));
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
    color: #ffffff;
}

.empty-state p {
    font-size: 1rem;
    opacity: 0.8;
    max-width: 500px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.7);
}

/* MODAL - RED-BLACK THEME */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.modal {
    width: 900px;
    height: 900px;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid rgba(220, 38, 38, 0.4);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease-out;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 100px rgba(220, 38, 38, 0.2);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Agent Info Section */
.agent-info-section {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 30px;
    background: rgba(20, 20, 20, 0.8);
    border-bottom: 1px solid rgba(220, 38, 38, 0.3);
    position: relative;
    min-height: 200px;
    flex-shrink: 0;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #ffffff;
    transform: scale(1.1);
}

.agent-avatar {
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border: 2px solid rgba(220, 38, 38, 0.4);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    flex-shrink: 0;
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.3);
}

.agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 13px;
}

.modal-agent-details {
    flex: 1;
    padding-right: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-agent-details h3 {
    margin: 0 0 15px 0;
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.modal-agent-details p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    line-height: 1.5;
    max-height: 100px;
    overflow-y: auto;
}

/* Transactions Section */
.transactions-section {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.8);
}

/* Transactions Table */
.transactions-table {
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
    border: none;
    display: flex;
    flex-direction: column;
}

.table-header {
    display: grid;
    grid-template-columns: 100px 70px 100px 120px 120px 120px 135px 135px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.th {
    padding: 15px 8px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.th:last-child {
    border-right: none;
}

.table-body {
    flex: 1;
    overflow-y: auto;
    background: rgba(15, 15, 15, 0.9);
}

.table-row {
    display: grid;
    grid-template-columns: 100px 70px 100px 120px 120px 120px 135px 135px;
    border-bottom: 1px solid rgba(220, 38, 38, 0.1);
    transition: background-color 0.2s ease;
    overflow: hidden;
}

.table-row:hover {
    background-color: rgba(220, 38, 38, 0.05);
}

.table-row:last-child {
    border-bottom: none;
}

.td {
    padding: 12px 6px;
    text-align: center;
    font-size: 0.85rem;
    border-right: 1px solid rgba(220, 38, 38, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    overflow: hidden;
    word-wrap: break-word;
    color: #ffffff;
}

.td:last-child {
    border-right: none;
}

.td-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.td-type {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.td-type.buy {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 4px;
    margin: 2px;
    padding: 2px 4px;
}

.td-type.sell {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 4px;
    margin: 2px;
    padding: 2px 4px;
}

.td-usd {
    font-weight: 600;
    color: #ffffff;
}

.td-tokens {
    color: #dc2626;
    font-weight: 500;
}

.td-eth {
    color: rgba(255, 255, 255, 0.8);
}

.td-price {
    color: #ffffff;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
}

.maker-address, .txn-hash {
    color: #dc2626;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
    transition: color 0.2s ease;
    padding: 4px 6px;
    border-radius: 4px;
    background: rgba(220, 38, 38, 0.1);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.maker-address:hover, .txn-hash:hover {
    color: #ef4444;
    background: rgba(220, 38, 38, 0.2);
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

/* Loading in transactions */
.loading-transactions {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: rgba(255, 255, 255, 0.7);
    flex: 1;
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-top: 2px solid #dc2626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 980px;
    }
    
    .agents-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(9, auto);
        max-width: 980px;
    }
    
    .pagination,
    .empty-state {
        max-width: 980px;
    }
}

@media (max-width: 900px) {
    .container {
        max-width: 740px;
    }
    
    .agents-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(12, auto);
        max-width: 740px;
    }
    
    .pagination,
    .empty-state {
        max-width: 740px;
    }
    
    .modal {
        width: 95vw;
        height: 95vh;
        max-width: 900px;
        max-height: 900px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
        max-width: 100%;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .agents-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 100%;
    }
    
    .agent-card {
        width: 100%;
        height: auto;
    }
    
    .agent-image {
        width: 100%;
        height: 200px;
    }
    
    .pagination,
    .empty-state {
        max-width: 100%;
    }
    
    .modal {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .agent-info-section {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        min-height: 250px;
    }
    
    .agent-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .modal-agent-details {
        padding-right: 0;
    }
    
    .modal-agent-details h3 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }
    
    .modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .agents-grid {
        grid-template-columns: 1fr;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .pagination {
        gap: 10px;
    }
    
    .pagination-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .pagination-info {
        min-width: 80px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar styling */
.table-body::-webkit-scrollbar,
.modal-agent-details p::-webkit-scrollbar {
    width: 6px;
}

.table-body::-webkit-scrollbar-track,
.modal-agent-details p::-webkit-scrollbar-track {
    background: rgba(220, 38, 38, 0.1);
    border-radius: 3px;
}

.table-body::-webkit-scrollbar-thumb,
.modal-agent-details p::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.4);
    border-radius: 3px;
}

.table-body::-webkit-scrollbar-thumb:hover,
.modal-agent-details p::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.6);
}

/* Добавляем технологичные элементы в DOM через CSS */
.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(220,38,38,0.3)"/><circle cx="80" cy="30" r="1" fill="rgba(220,38,38,0.2)"/><circle cx="60" cy="70" r="1.5" fill="rgba(220,38,38,0.4)"/></svg>') repeat;
    z-index: -1;
    animation: float 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* === МИНИМАЛЬНЫЕ ТЕХНОЛОГИЧНЫЕ ЭЛЕМЕНТЫ ФОНА === */

/* Анимированные частицы */
.tech-particles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -3;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #dc2626;
    border-radius: 50%;
    animation: particleFloat 25s linear infinite;
    box-shadow: 0 0 6px rgba(220, 38, 38, 0.4);
}

.particle:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 28s;
}

.particle:nth-child(2) {
    top: 20%;
    left: 80%;
    animation-delay: 3s;
    animation-duration: 32s;
}

.particle:nth-child(3) {
    top: 60%;
    left: 20%;
    animation-delay: 6s;
    animation-duration: 26s;
}

.particle:nth-child(4) {
    top: 80%;
    left: 70%;
    animation-delay: 9s;
    animation-duration: 30s;
}

.particle:nth-child(5) {
    top: 30%;
    left: 50%;
    animation-delay: 12s;
    animation-duration: 29s;
}

.particle:nth-child(6) {
    top: 70%;
    left: 30%;
    animation-delay: 15s;
    animation-duration: 27s;
}

.particle:nth-child(7) {
    top: 40%;
    left: 90%;
    animation-delay: 18s;
    animation-duration: 31s;
}

.particle:nth-child(8) {
    top: 90%;
    left: 40%;
    animation-delay: 21s;
    animation-duration: 25s;
}

.particle:nth-child(9) {
    top: 50%;
    left: 60%;
    animation-delay: 24s;
    animation-duration: 33s;
}

@keyframes particleFloat {
    0% {
        transform: translate(0, 0) scale(0.8);
        opacity: 0;
    }
    15% {
        opacity: 0.6;
    }
    50% {
        transform: translate(80px, -60px) scale(1.2);
        opacity: 0.8;
    }
    85% {
        opacity: 0.4;
    }
    100% {
        transform: translate(-40px, 40px) scale(0.6);
        opacity: 0;
    }
}

/* Сканирующие линии */
.tech-lines {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

.tech-line {
    position: absolute;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(220, 38, 38, 0.1) 20%, 
        rgba(220, 38, 38, 0.3) 50%, 
        rgba(220, 38, 38, 0.1) 80%, 
        transparent 100%);
    height: 1px;
    width: 100%;
    animation: lineScan 20s linear infinite;
}

.tech-line:nth-child(1) {
    top: 25%;
    animation-delay: 0s;
    animation-duration: 22s;
}

.tech-line:nth-child(2) {
    top: 60%;
    animation-delay: 8s;
    animation-duration: 25s;
}

.tech-line:nth-child(3) {
    top: 85%;
    animation-delay: 16s;
    animation-duration: 20s;
}

@keyframes lineScan {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Тонкий фоновый градиент */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(220, 38, 38, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(239, 68, 68, 0.06) 0%, transparent 50%);
    z-index: -4;
    animation: bgPulse 15s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Тонкая сетка */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(220, 38, 38, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -5;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}



.maker-address {
    color: #dc2626;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    padding: 4px 6px;
    border-radius: 4px;
    background: rgba(220, 38, 38, 0.1);
    max-width: 98px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.maker-address:hover {
    color: #ef4444;
    background: rgba(220, 38, 38, 0.2);
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

/* DEV мейкер - красная тема, растянутый на всю ячейку */
.maker-address.dev-maker {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #ffffff;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
    border: 1px solid rgba(220, 38, 38, 0.4);
    
    /* НОВОЕ: растягиваем на всю ячейку и центрируем */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: -8px -12px; /* компенсируем padding ячейки */
    padding: 8px 12px;
    border-radius: 6px;
}

.maker-address.dev-maker:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 2px 15px rgba(220, 38, 38, 0.4);
}

/* Анимация свечения для DEV */
.maker-address.dev-maker {
    animation: devGlow 2s ease-in-out infinite alternate;
}

@keyframes devGlow {
    0% { 
        box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
    }
    100% { 
        box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
    }
}

/* Подсветка всей строки с DEV */
.table-row:has(.dev-maker) {
    background: rgba(220, 38, 38, 0.05);
    box-shadow: inset 3px 0 0 #dc2626; /* внутренняя полоска */
}

.table-row:has(.dev-maker):hover {
    background: rgba(220, 38, 38, 0.1);
}



/* Футер транзакций */
.transactions-footer {
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    
    /* Ключевые свойства чтобы НЕ влиять на ширину: */
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0; /* Не сжимается */
    overflow: hidden; /* Не создает переполнение */
    margin: 0; /* Без отступов */
}

/* Кнопка "Load More" - изолированная */
.load-more-btn {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* Важно: НЕ влияем на layout родителя */
    display: inline-block;
    width: auto;
    max-width: none;
    min-width: 100px;
    box-sizing: border-box;
    margin: 0;
    
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.load-more-btn.loading {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Завершение загрузки */
.transactions-complete {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-style: italic;
    padding: 10px;
    margin: 0; /* Без отступов */
}

/* === ДОБАВИТЬ В styles.css === */

/* Секция поиска */
.search-section {
    padding: 20px 0;
    margin-bottom: 20px;
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Wrapper для input с иконками */
.search-input-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

/* Поле поиска */
#agent-search {
    width: 100%;
    padding: 12px 45px 12px 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#agent-search:focus {
    outline: none;
    border-color: #dc2626;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

#agent-search::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Иконка поиска */
.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

/* Кнопка очистки */
.search-clear {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.search-clear:hover {
    color: #dc2626;
}

/* Результаты поиска */
.search-results {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 500px;
    margin: 15px auto 0;
    padding: 8px 15px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
}

.search-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Кнопка "Show All" */
.search-reset {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-reset:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-1px);
}

/* Анимация при поиске */
.search-input-wrapper.searching #agent-search {
    border-color: #dc2626;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}

/* Responsive для мобильных */
@media (max-width: 768px) {
    .search-container {
        padding: 0 15px;
    }
    
    .search-input-wrapper {
        max-width: 100%;
    }
    
    #agent-search {
        padding: 10px 40px 10px 40px;
        font-size: 0.9rem;
    }
    
    .search-results {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}