@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

:root {
    --primary-color: #4A90E2;
    --secondary-color: #50E3C2;
    --background-color: #F0F2F5;
    --card-background: #FFFFFF;
    --text-color: #333333;
    --light-text-color: #666666;
    --border-color: #E0E0E0;
    --danger-color: #FF6B6B;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    color: var(--text-color);
}

.container {
    width: 100%;
    max-width: 1000px;
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--shadow-medium);
    padding: 30px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 600;
    font-size: 2.2em;
}

.history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 15px;
    /* Spasi antar baris */
}

.history-table th,
.history-table td {
    padding: 18px 20px;
    text-align: left;
}

.history-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
}

.history-table thead tr:first-child th:first-child {
    border-top-left-radius: 8px;
}

.history-table thead tr:first-child th:last-child {
    border-top-right-radius: 8px;
}

.history-table tbody tr {
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.history-table tbody tr:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-medium);
}

.history-table td {
    color: var(--light-text-color);
    font-size: 0.95em;
}

.history-table td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.history-table td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.score-column span {
    display: inline-block;
    margin-right: 15px;
    font-weight: 500;
}

.actions button {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.actions button i {
    margin-right: 5px;
}

.remove-btn {
    background-color: var(--danger-color);
    color: white;
    margin-right: 10px;
}

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

.print-btn {
    background-color: var(--secondary-color);
    color: white;
}

.print-btn:hover {
    background-color: #3CC7A7;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .history-table thead {
        display: none;
        /* Sembunyikan header tabel pada layar kecil */
    }

    .history-table,
    .history-table tbody,
    .history-table tr,
    .history-table td {
        display: block;
        width: 100%;
    }

    .history-table tr {
        margin-bottom: 20px;
        box-shadow: 0 4px 15px var(--shadow-light);
        border-radius: 10px;
    }

    .history-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border: none;
        border-bottom: 1px solid var(--border-color);
    }

    .history-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 20px;
        width: calc(50% - 30px);
        text-align: left;
        font-weight: 600;
        color: var(--text-color);
    }

    .history-table td:last-child {
        border-bottom: none;
    }

    .score-column {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .score-column span {
        margin-right: 0;
        margin-bottom: 5px;
    }

    .actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: flex-end;
    }

    .remove-btn,
    .print-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }

    .container {
        padding: 15px;
    }
}