/* style.css */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding-top: 40px;
    padding-bottom: 40px;
}

main {
    width: 100%;
    max-width: 500px;
    background-color: #1e1e1e;
    padding: 25px 35px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    text-align: center;
}

h1 {
    color: #ffffff;
    margin-bottom: 10px;
}

p {
    color: #a0a0a0;
    margin-top: 0;
    margin-bottom: 30px;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #c0c0c0;
}

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: #2a2a2a;
    color: #e0e0e0;
    font-size: 16px;
    box-sizing: border-box;
}

#calculateBtn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background-color: #007bff;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

#calculateBtn:hover {
    background-color: #0056b3;
}

#results {
    margin-top: 30px;
    padding: 20px;
    border-radius: 8px;
    min-height: 50px;
    line-height: 1.6;
}

.success {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.5);
    color: #28a745;
}

.error {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.5);
    color: #dc3545;
}

.table-container {
    width: 100%;
    max-width: 800px;
    margin-top: 40px;
    background-color: #1e1e1e;
    padding: 25px 35px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    text-align: center;
}

#searchInput {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: #2a2a2a;
    color: #e0e0e0;
    font-size: 16px;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.table-wrapper {
    max-height: 500px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

thead th {
    background-color: #2a2a2a;
    color: #ffffff;
    position: sticky;
    top: 0;
}

tbody tr:hover {
    background-color: #2c2c2c;
}

td:first-child, th:first-child {
    text-align: center;
}

#pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap; /* Memastikan tombol pindah baris jika tidak muat */
    gap: 5px; /* Memberi sedikit jarak antar tombol */
}

.page-btn {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #444;
    padding: 8px 14px;
    margin: 3px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

.page-btn:hover {
    background-color: #007bff;
    color: white;
}

.page-btn.active {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    border-color: #007bff;
}

.page-btn:disabled {
    background-color: #222;
    color: #555;
    cursor: not-allowed;
    border-color: #333;
}