body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Roboto Mono', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 0;
}

.wallet-container {
    background-color: #1e1e1e;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #2a2a2a;
}

header {
    text-align: center;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

header h1 {
    margin: 0;
    color: #ffffff;
    font-size: 1.5em;
}

.balance-label {
    font-size: 0.9em;
    color: #aaa;
    margin-top: 20px;
    display: block;
}

.balance-amount {
    font-size: 2.5em;
    font-weight: 700;
    color: #4caf50;
    display: block;
    margin-top: 5px;
    letter-spacing: 1px;
}

.actions {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.action-btn {
    background-color: #333;
    color: #e0e0e0;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-family: 'Roboto Mono', monospace;
    transition: background-color 0.3s, transform 0.2s;
    flex-grow: 1;
    margin: 0 10px;
}

.action-btn:hover {
    background-color: #555;
    transform: translateY(-2px);
}

main h2, footer h2 {
    color: #fff;
    font-size: 1.2em;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-top: 0;
}

.asset-list, .transaction-list {
    list-style: none;
    padding: 0;
    max-height: 250px;
    overflow-y: auto;
}

/* Custom Scrollbar */
.asset-list::-webkit-scrollbar, .transaction-list::-webkit-scrollbar {
  width: 6px;
}

.asset-list::-webkit-scrollbar-track, .transaction-list::-webkit-scrollbar-track {
  background: #2a2a2a;
  border-radius: 3px;
}

.asset-list::-webkit-scrollbar-thumb, .transaction-list::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 3px;
}

.asset-list::-webkit-scrollbar-thumb:hover, .transaction-list::-webkit-scrollbar-thumb:hover {
  background: #777;
}


.asset-item, .transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5px;
    border-bottom: 1px solid #2a2a2a;
    gap: 10px;
}

.asset-item:last-child, .transaction-item:last-child {
    border-bottom: none;
}

.asset-info {
    display: flex;
    align-items: center;
    flex: 1.2; /* Give more space to name/icon */
}

.asset-icon {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.asset-name {
    font-weight: 700;
}

.asset-symbol {
    color: #aaa;
    font-size: 0.9em;
}

.asset-price-info {
    text-align: right;
    flex: 1;
}

.asset-price {
    font-weight: 700;
}

.asset-balance {
    text-align: right;
    flex: 1;
}

.asset-amount {
    font-weight: 700;
}

.asset-value {
    color: #aaa;
    font-size: 0.9em;
}

.price-change {
    font-size: 0.8em;
    margin-left: 5px;
}

.price-up {
    color: #4caf50;
}

.price-down {
    color: #f44336;
}

footer {
    margin-top: 30px;
}

.transaction-info {
    font-size: 0.9em;
}

.transaction-type {
    font-weight: bold;
}

.transaction-type.sent {
    color: #f44336;
}
.transaction-type.received {
    color: #4caf50;
}

.transaction-details {
    color: #aaa;
    font-size: 0.8em;
}

.transaction-amount {
    text-align: right;
    font-size: 0.9em;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 100; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #242424;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #333;
    width: 90%;
    max-width: 420px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #fff;
    text-decoration: none;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    color: #fff;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #bbb;
    font-size: 0.9em;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    color: #e0e0e0;
    font-family: 'Roboto Mono', monospace;
    font-size: 1em;
    box-sizing: border-box; /* Important for padding and width */
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

.address-wrapper, .amount-wrapper {
    display: flex;
    gap: 10px;
}

.address-wrapper input, .amount-wrapper input {
    flex-grow: 1;
}

#generate-address-btn, #max-btn {
    padding: 0 15px;
    background-color: #333;
    color: #e0e0e0;
    border: 1px solid #333;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Roboto Mono', monospace;
    transition: all 0.2s;
}

#generate-address-btn:hover, #max-btn:hover {
    background-color: #444;
    border-color: #555;
}

.send-submit-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    margin: 10px 0 0;
    background-color: #4caf50;
}

.send-submit-btn:hover {
    background-color: #45a049;
}

.send-submit-btn:disabled {
    background-color: #5a6268;
    opacity: 0.7;
    cursor: not-allowed;
}

.send-submit-btn:disabled:hover {
    background-color: #5a6268;
    transform: none;
}

.error-message {
    color: #f44336;
    font-size: 0.9em;
    text-align: center;
    min-height: 1.2em; /* Reserve space to prevent layout shift */
    margin: -10px 0 10px;
}

/* New Styles */
.seed-instructions {
    color: #bbb;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.5;
}

.seed-phrase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.seed-word-input-wrapper {
    position: relative;
}

.seed-word-input-wrapper::before {
    content: attr(data-index);
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    font-size: 0.8em;
}

input.seed-word-input {
    width: 100%;
    padding: 12px 12px 12px 30px; /* Make space for index number */
    box-sizing: border-box;
    text-align: center;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    color: #e0e0e0;
    font-family: 'Roboto Mono', monospace;
}

input.seed-word-input:focus {
     outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

.connect-wallet-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    margin: 10px 0 0;
    background-color: #4caf50;
}

.connect-wallet-btn:hover {
     background-color: #45a049;
}

.seed-phrase-display {
    background-color: #1e1e1e;
    border: 1px dashed #555;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 40vh;
    overflow-y: auto;
}

.seed-phrase-display::-webkit-scrollbar {
  width: 6px;
}
.seed-phrase-display::-webkit-scrollbar-track {
  background: #1e1e1e;
  border-radius: 3px;
}
.seed-phrase-display::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 3px;
}
.seed-phrase-display::-webkit-scrollbar-thumb:hover {
  background: #777;
}

.history-item {
    background-color: #2a2a2a;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid #4caf50;
}

.history-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.history-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #444;
    object-fit: cover;
}

.history-username {
    font-weight: bold;
    color: #c0c0c0;
}

.history-phrase {
    font-family: 'Roboto Mono', monospace;
    font-size: 1em;
    color: #e0e0e0;
    word-break: break-word;
    line-height: 1.4;
    font-weight: normal;
    background: #1a1a1a;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.history-time {
    font-size: 0.8em;
    color: #aaa;
    margin-top: 8px;
    display: block;
    text-align: right;
}