/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0b0d0e;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    color: #e3f0e6;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    image-rendering: pixelated;
}

.pixel-wrapper {
    max-width: 1280px;
    width: 100%;
    background: #111415;
    border: 4px solid #2d4a3b;
    box-shadow: 0 0 0 2px #1f2e27, 0 0 0 6px #0a0f0c;
    padding: 2rem;
    border-radius: 8px;
    position: relative;
}

/* ===== HEADER ===== */
.hood-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 4px dashed #2d4a3b;
    padding-bottom: 1.2rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-area a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.robinhood-icon {
    display: flex;
    align-items: center;
    background: #1e2d25;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    border: 2px solid #6fcf97;
    gap: 0.5rem;
}

.robinhood-icon svg {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 0 4px #8effb5);
}

.robinhood-icon span {
    font-size: 0.6rem;
    color: #b5ffb5;
    font-family: 'Press Start 2P', monospace;
}

.brand-name {
    font-size: 1.5rem;
    color: #b5ffb5;
    text-shadow: 3px 3px 0px #0a1a12;
    font-family: 'Press Start 2P', monospace;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-back,
.btn-create {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #1c2d24;
    border: 2px solid #6fcf97;
    color: #b5ffb5;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.6rem;
    font-family: 'Press Start 2P', monospace;
    box-shadow: 4px 4px 0px #0a1a12;
    transition: 0.2s;
}

.btn-back:hover,
.btn-create:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #0a1a12;
}

.btn-create {
    background: #1e3a2b;
    border-color: #6fcf97;
}

/* ===== SEARCH & FILTER ===== */
.search-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #0a0f0c;
    border: 2px solid #2d4a3b;
    border-radius: 4px;
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    background: #111415;
    border: 2px solid #2d4a3b;
    border-radius: 4px;
    padding: 0 0.5rem;
    min-width: 200px;
}

.search-box i {
    color: #4a6b5a;
    font-size: 0.8rem;
    padding: 0 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.6rem 0.5rem;
    background: transparent;
    border: none;
    color: #e3f0e6;
    font-size: 0.55rem;
    font-family: 'Press Start 2P', monospace;
    outline: none;
}

.search-box input::placeholder {
    color: #4a6b5a;
}

.btn-search {
    background: #1e3a2b;
    border: none;
    border-left: 2px solid #2d4a3b;
    color: #b5ffb5;
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.7rem;
    transition: 0.2s;
    border-radius: 0 2px 2px 0;
}

.btn-search:hover {
    background: #2a503b;
    color: #d6ffe6;
}

.filter-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-box label {
    font-size: 0.5rem;
    color: #8fb3a0;
    font-family: 'Press Start 2P', monospace;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.filter-box label i {
    color: #6fcf97;
}

.filter-box select {
    padding: 0.5rem 1rem;
    background: #111415;
    border: 2px solid #2d4a3b;
    border-radius: 4px;
    color: #e3f0e6;
    font-size: 0.5rem;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    outline: none;
    min-width: 140px;
}

.filter-box select:focus {
    border-color: #6fcf97;
}

.filter-box select option {
    background: #111415;
    color: #e3f0e6;
}

/* ===== AGENT GRID ===== */
.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
    min-height: 300px;
}

.agent-card {
    background: #0a0f0c;
    border: 2px solid #2d4a3b;
    border-radius: 4px;
    padding: 1.2rem;
    box-shadow: 4px 4px 0px #0a1a12;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.agent-card:hover {
    border-color: #6fcf97;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #0a1a12;
}

.agent-card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.agent-card-avatar {
    width: 50px;
    height: 50px;
    background: #1e2d25;
    border: 2px solid #6fcf97;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #6fcf97;
    flex-shrink: 0;
    overflow: hidden;
}

.agent-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.agent-card-info {
    flex: 1;
    min-width: 0;
}

.agent-card-name {
    font-size: 0.7rem;
    color: #b5ffb5;
    font-family: 'Press Start 2P', monospace;
    margin-bottom: 0.1rem;
    text-shadow: 2px 2px 0px #0a1a12;
}

.agent-card-username {
    font-size: 0.45rem;
    color: #8fb3a0;
    font-family: 'Press Start 2P', monospace;
}

.agent-card-id {
    font-size: 0.4rem;
    color: #4a6b5a;
    font-family: 'Press Start 2P', monospace;
}

.agent-card-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #2d4a3b;
}

.agent-card-badge {
    font-size: 0.35rem;
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
    font-family: 'Press Start 2P', monospace;
}

.agent-card-badge.active {
    background: #1e3a2b;
    color: #b5ffb5;
    border: 1px solid #6fcf97;
}

.agent-card-badge.inactive {
    background: #3a2a1a;
    color: #ffb57a;
    border: 1px solid #cf8f6f;
}

.agent-card-badge.suspended {
    background: #3a1a1a;
    color: #ff7a7a;
    border: 1px solid #cf6f6f;
}

.agent-card-badge.default {
    background: #2d1a2d;
    color: #e6b5ff;
    border: 1px solid #b56fcf;
}

.agent-card-reputation {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.4rem;
    color: #8fb3a0;
    font-family: 'Press Start 2P', monospace;
    margin-left: auto;
}

.agent-card-reputation i {
    color: #ffd700;
    font-size: 0.6rem;
}

.agent-card-address {
    font-size: 0.35rem;
    color: #4a6b5a;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.agent-card-footer {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.3rem;
}

.btn-view-agent-card {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #1c2d24;
    border: 2px solid #6fcf97;
    color: #b5ffb5;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.4rem;
    font-family: 'Press Start 2P', monospace;
    transition: 0.2s;
    box-shadow: 3px 3px 0px #0a1a12;
}

.btn-view-agent-card:hover {
    background: #2a503b;
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #0a1a12;
}

/* ===== LOADING ===== */
.list-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1.5rem;
}

.pixel-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #2d4a3b;
    border-top: 4px solid #6fcf97;
    border-radius: 4px;
    animation: spin 1s linear infinite;
    image-rendering: pixelated;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.list-loading p {
    font-size: 0.6rem;
    color: #8fb3a0;
    font-family: 'Press Start 2P', monospace;
}

/* ===== ERROR ===== */
.list-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1rem;
    text-align: center;
}

.list-error i {
    font-size: 4rem;
    color: #cf6f6f;
}

.list-error h3 {
    font-size: 1rem;
    color: #ffb5b5;
    text-shadow: 3px 3px 0px #0a1a12;
}

.list-error p {
    font-size: 0.6rem;
    color: #8fb3a0;
}

/* ===== EMPTY ===== */
.list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1rem;
    text-align: center;
}

.list-empty i {
    font-size: 4rem;
    color: #6fcf97;
    opacity: 0.5;
}

.list-empty h3 {
    font-size: 1rem;
    color: #b5ffb5;
    text-shadow: 3px 3px 0px #0a1a12;
}

.list-empty p {
    font-size: 0.6rem;
    color: #8fb3a0;
}

.btn-clear-search {
    background: #1c2d24;
    border: 2px solid #6fcf97;
    color: #b5ffb5;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-size: 0.5rem;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    box-shadow: 4px 4px 0px #0a1a12;
    transition: 0.2s;
}

.btn-clear-search:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #0a1a12;
    background: #2a503b;
}

/* ===== PAGINATION ===== */
.pagination-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed #2d4a3b;
}

.pagination-info {
    font-size: 0.45rem;
    color: #8fb3a0;
    font-family: 'Press Start 2P', monospace;
}

.pagination-buttons {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    padding: 0.3rem 0.6rem;
    background: #0a0f0c;
    border: 2px solid #2d4a3b;
    border-radius: 4px;
    color: #8fb3a0;
    font-size: 0.4rem;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 3px 3px 0px #0a1a12;
}

.pagination-btn:hover:not(.active):not(:disabled) {
    border-color: #6fcf97;
    color: #b5ffb5;
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #0a1a12;
}

.pagination-btn.active {
    background: #1e3a2b;
    border-color: #6fcf97;
    color: #b5ffb5;
    box-shadow: 3px 3px 0px #0a1a12;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== FOOTER ===== */
.footer-note {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 4px dashed #2d4a3b;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.45rem;
    color: #7a9e89;
    font-family: 'Press Start 2P', monospace;
}

.footer-note a {
    color: #b5ffb5;
    text-decoration: none;
    border-bottom: 2px dotted #3b5e4b;
}

.footer-note .blockscout-link {
    margin-left: 1rem;
    font-size: 0.4rem;
    color: #4a6b5a;
}

.footer-note .blockscout-link a {
    color: #4a6b5a;
    border-bottom: 1px dotted #3b5e4b;
}

.footer-note .blockscout-link a:hover {
    color: #6fcf97;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #0a0f0c;
    border: 2px solid #6fcf97;
    color: #b5ffb5;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-size: 0.5rem;
    font-family: 'Press Start 2P', monospace;
    box-shadow: 6px 6px 0px #0a1a12;
    z-index: 9999;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 580px) {
    .pixel-wrapper {
        padding: 1rem;
    }
    
    .search-filter-container {
        flex-direction: column;
    }
    
    .filter-box {
        width: 100%;
    }
    
    .filter-box select {
        flex: 1;
        min-width: 100px;
    }
    
    .agent-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination-container {
        flex-direction: column;
        text-align: center;
    }
    
    .header-actions .btn-back span,
    .header-actions .btn-create span {
        display: none;
    }
}