@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900&display=swap');

* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    margin: 0;
    padding: 2rem;
    background: linear-gradient(135deg, #74ebd5, #9face6);
}

::selection {
    text-shadow: 0 0 1rem #6A82FB;
}

.container {
    max-width: 37.5rem; /* 600px */
    margin: auto;
    padding: 2rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

h1, h2 {
    text-align: center;
    color: #4A4A4A;
    margin-bottom: 1.25rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

label {
    font-size: 1.1rem;
    color: #333;
}

input {
    padding: 0.75rem;
    border: 0.0625rem solid #ddd;
    border-radius: 0.3125rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #6A82FB;
    box-shadow: 0 0 0.3125rem rgba(106, 130, 251, 0.5);
}

button {
    padding: 1rem;
    background: linear-gradient(135deg, #6A82FB, #FC5C7D);
    color: white;
    border: none;
    border-radius: 1.5625rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

button:hover {
    transform: scale(1.05);
}

#download-btn {
    width: 100%;
}

#download-btn:hover {
    transform: scale(1.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.25rem;
}

table th, table td {
    padding: 0.75rem;
    text-align: left;
    border: 0.0625rem solid #ddd;
}

table th {
    background-color: #6A82FB;
    color: white;
}

table td button {
    background-color: #FC5C7D;
    color: white;
    border: none;
    padding: 0.3125rem 0.75rem;
    cursor: pointer;
    border-radius: 0.3125rem;
}

table td button.edit {
    background-color: #f39c12;
    margin-right: 0.625rem;
}

/* Footer styling */
footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
    border-radius: 0 0 1rem 1rem;
}

footer p {
    margin: 0;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Preview container styling */
#preview-container {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f0f8ff;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

#preview-table {
    width: 100%;
    border-collapse: collapse;
}

#preview-table th, #preview-table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #ddd;
}

#preview-table th {
    background-color: #6A82FB;
    color: white;
}

/* Responsive Styling for Devices */
@media only screen and (max-width: 600px) {
    body {
        padding: 1.5rem;
    }

    .container {
        padding: 1.5rem;
    }

    h1, h2 {
        font-size: 1.5rem;
    }

    form {
        gap: 0.5rem;
    }

    input {
        font-size: 0.875rem;
        padding: 0.5rem;
    }

    button {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    table th, table td, #preview-table th, #preview-table td {
        padding: 0.5rem;
    }
}

/* Responsive Adjustments for Very Small Devices (max-width 480px) */
@media only screen and (max-width: 480px) {
    body {
        padding: 1rem;
    }

    h1, h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    input, button {
        font-size: 0.75rem;
        padding: 0.5rem;
    }

    form {
        gap: 0.4rem;
    }

    table th, table td, #preview-table th, #preview-table td {
        font-size: 0.75rem;
        padding: 0.375rem;
    }

    table, #preview-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Responsive for Extra Small Devices (320px and below) */
@media only screen and (max-width: 320px) {
    body {
        padding: 0.5rem;
    }

    .container {
        padding: 1rem;
    }

    h1, h2 {
        font-size: 1rem;
    }

    form, input, button {
        font-size: 0.5rem;
    }

    table th, table td, #preview-table th, #preview-table td,button {
        font-size: 0.625rem;
        padding: 0.20rem;
    }
}
