/* General Reset */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
}

/* Top Section with Particles Background */
header {
    position: relative;
    height: 300px;
    background: linear-gradient(145deg, #1e1e2f, #2c2c4a);
    color: white;
    text-align: center;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

header img {
    z-index: 1;
    position: relative;
    border-radius: 50%;
    max-width: 150px;
}

header h1, header p {
    z-index: 1;
    position: relative;
    margin: 10px;
}

/* Content Section */
.container {
    padding: 20px;
}

.send-tokens-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #007bff;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
}

.send-tokens-btn:hover {
    background: #0056b3;
}

h2, h3 {
    color: #1f1f1f;
}

.btn {
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 10px 20px;
    margin: 20px 0;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn:hover {
    background: #0056b3;
}

.wallet-info {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.wallet-info p {
    margin: 10px 0;
}

.wallet-info code {
    background-color: #f4f4f4;
    padding: 5px;
    border-radius: 3px;
    display: inline-block;
}

.footer {
    background: #1f1f1f;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    margin-top: 20px;
}

.social {
    margin-top: 10px;
}

.social a {
    color: #1da1f2;
    text-decoration: none;
}

.social a:hover {
    text-decoration: underline;
}

.token-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
}

.token-table th,
.token-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.token-table th {
    background-color: #f5f5f5;
}

.token-table td.text-right {
    text-align: right;
}

.token-table tr:hover {
    background-color: #f9f9f9;
}

.token-table small {
    color: #666;
    font-family: monospace;
}

.wallet-balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.balance-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.token-table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 1rem;
}

.token-table {
    width: 100%;
    min-width: 600px; /* Ensures table doesn't get too squeezed */
    border-collapse: collapse;
}

.token-table th,
.token-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap; /* Prevents text wrapping */
}

.token-table td:nth-child(2) {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.token-table th {
    background-color: #f5f5f5;
    position: sticky;
    top: 0;
}

.token-table td.text-right {
    text-align: right;
}

.token-table tr:hover {
    background-color: #f9f9f9;
}

.token-table small {
    color: #666;
    font-family: monospace;
}

@media (max-width: 768px) {
    .wallet-balance-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .wallet-balance-grid {
        grid-template-columns: 1fr;
    }
}

.token-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
}

.token-table th, .token-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

.token-table th {
    background-color: #f5f5f5;
}

.token-table tr:hover {
    background-color: #f9f9f9;
}

.wallet-selection {
    position: absolute; /* Position it as needed */
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000; /* Ensure it appears above other elements */
    padding: 10px;
    border-radius: 5px;
}

.wallet-item {
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
}

.wallet-item:hover {
    background-color: #f0f0f0; /* Highlight on hover */
}

.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.wallet-item {
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
}

.wallet-item:hover {
    background-color: #f0f0f0; /* Highlight on hover */
}

.popup {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5); /* Black w/ opacity */
}

.popup-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    text-align: center; /* Center the text */
}

.close-popup {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-popup:hover,
.close-popup:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
