body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f0f2f5;
    color: #1c1e21;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
}

.header h1 {
    margin: 0;
    color: #000;
    font-size: 24px;
}

#close-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s;
}

#close-btn:hover {
    background-color: #5a6268;
}

.summary-section {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.credit-info {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.credit-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.credit-item .label {
    font-weight: bold;
    color: #495057;
}

.credit-item .value {
    font-size: 20px;
    font-weight: bold;
    color: #007bff;
}

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

.filter-section label {
    font-weight: bold;
    color: #495057;
}

.filter-section select {
    padding: 8px 12px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-size: 16px;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin-bottom: 20px;
}

.history-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

#history-table {
    width: 100%;
    border-collapse: collapse;
}

#history-table thead {
    background-color: #007bff;
    color: white;
}

#history-table th,
#history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dddfe2;
}

#history-table th {
    font-weight: bold;
    font-size: 14px;
}

#history-table td {
    font-size: 14px;
    color: #495057;
}

#history-table tbody tr:hover {
    background-color: #f8f9fa;
}

.transaction-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.transaction-type.purchase {
    background-color: #28a745;
    color: white;
}

.transaction-type.usage {
    background-color: #dc3545;
    color: white;
}

.transaction-type.failure {
    background-color: #ffc107;
    color: #212529;
}

.transaction-type.refund {
    background-color: #6c757d;
    color: white;
}

.credit-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.credit-type.image {
    background-color: #17a2b8;
    color: white;
}

.credit-type.video {
    background-color: #6f42c1;
    color: white;
}

.amount-positive {
    color: #28a745;
    font-weight: bold;
}

.amount-negative {
    color: #dc3545;
    font-weight: bold;
}

.image-credit {
    color: #17a2b8;
    font-weight: bold;
}

.video-credit {
    color: #6f42c1;
    font-weight: bold;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.pagination button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.pagination button:hover:not(:disabled) {
    background-color: #0056b3;
}

.pagination button:disabled {
    background-color: #dddfe2;
    color: #6c757d;
    cursor: not-allowed;
}

#page-info {
    font-weight: bold;
    color: #495057;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 20px;
    }

    .credit-info {
        flex-direction: column;
        gap: 15px;
    }

    #history-table th,
    #history-table td {
        padding: 8px;
        font-size: 12px;
    }

    .pagination button {
        padding: 8px 16px;
        font-size: 12px;
    }
}
