* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #fff;
    color: #000;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2 {
    text-align: center;
    margin-bottom: 20px;
}

#input-section {
    text-align: center;
    margin-bottom: 40px;
}

#code-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.code-input {
    width: 50px;
    padding: 8px;
    font-size: 16px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #555;
}

.error {
    color: red;
    margin-top: 10px;
}

.hidden {
    display: none;
}

#loading.hidden {
    display: none !important;
}

/* Loading Animation */
#loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #333;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f9f9f9;
}

img {
    max-width: 50px;
    height: auto;
    display: block;
}

/* Pagination */
#pagination {
    text-align: center;
    margin-bottom: 20px;
}

#pagination button {
    margin: 0 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #code-form {
        flex-direction: column;
        align-items: center;
    }

    .code-input {
        width: 100px;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 15px;
        border-bottom: 2px solid #ddd;
    }

    td {
        display: flex;
        justify-content: space-between;
        padding: 5px;
    }

    td:before {
        content: attr(data-label);
        font-weight: bold;
        width: 100px;
    }
    
    td[data-label="Description"]:before {
        content: none; /* Suppress "Description" label on mobile */
    }

    img {
        max-width: 100px;
    }
}