@font-face {
    font-family: 'BeauFort';
    src: url('../fonts/beaufort_medium.ttf') format('truetype');
}

@font-face {
    font-family: 'D2Coding';
    src: url('../fonts/d2coding.ttf') format('truetype');
}

body {
    font-family: 'BeauFort', Arial, sans-serif;
    margin: 20px;
}

h1,
h2 {
    color: #333;
}

.header-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.header-container strong {
    margin-right: 10px;
}

#walletTable {
    margin-top: 20px;
    width: 100%;
    border-collapse: collapse;
}

#walletTable th,
#walletTable td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
    font-family: 'D2Coding', monospace;
}

#walletTable th {
    font-family: 'CustomFont', Arial, sans-serif;
    background-color: #f2f2f2;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
}

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

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

/* Connection Status Styles */
.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.connection-status.connected {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.connection-status.disconnected {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.connection-status.connected .status-indicator {
    background-color: #4caf50;
    box-shadow: 0 0 6px #4caf50;
    animation: pulse 2s infinite;
}

.connection-status.disconnected .status-indicator {
    background-color: #f44336;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

header h1 {
    margin: 0;
}

/* Stats Container */
.stats-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-item {
    background-color: #f5f5f5;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
    flex: 1;
    min-width: 200px;
}

.stat-item strong {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 14px;
}

.stat-item span {
    font-size: 24px;
    font-weight: bold;
    color: #2196F3;
}

/* Login Container */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-container button:hover {
    background-color: #1976D2;
}

/* Table Container */
.table-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-container {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-container label {
    font-weight: 500;
}

.filter-container select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.bulk-delete-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.bulk-delete-btn:hover {
    background-color: #d32f2f;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        margin: 10px;
    }

    /* Header adjustments */
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    header div {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    /* Stack stats functionality */
    .stats-container {
        flex-direction: column;
        gap: 10px;
    }

    .stat-item {
        min-width: 100%;
    }

    /* Login form adjustments */
    .login-container {
        margin: 40px auto;
        width: 90%;
        padding: 20px;
    }

    /* Table adjustments */
    .table-container {
        padding: 10px;
        overflow-x: auto;
    }

    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-container button {
        width: 100%;
        margin-left: 0 !important;
        /* Override inline style */
    }

    /* Bulk add area responsiveness */
    #bulkAddContainer {
        padding: 10px;
    }

    #bulkAddContainer div[style*="flex"] {
        flex-direction: column;
    }

    #bulkAddContainer button {
        width: 100%;
        margin-bottom: 5px;
    }


    /* Modal adjustments */
    .modal-content {
        width: 90%;
        margin: 30% auto;
    }
}

/* Grid List Navigation */
.grid-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.grid-list-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.grid-list-item:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #2196F3;
    color: #2196F3;
}