@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
body{
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Poppins', sans-serif;
    text-align: center;
    min-height: 100vh;
    padding: 20px;
}
#input_box{
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
}
h1{
    margin: 20px 0;
    color: #333;
    font-weight: 600;
}
#input_box:hover{
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}
#input_box input, #input_box select{
    width: 100%;
    max-width: 300px;
    padding: 12px;
    margin: 8px 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    font-size: 16px;
}
#input_box input:focus, #input_box select:focus{
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
    outline: none;
}
#input_box button{
    width: 120px;
    padding: 12px;
    margin: 8px 0;
    border: none;
    border-radius: 8px;
    background-color: #4CAF50;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}
#input_box button:disabled{
   display: none;
}
#input_box button:hover:not(:disabled){
    background-color: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}
#delete_all{
    align-self: flex-end;
    margin: 20px 0 0 auto;
    padding: 10px 20px;
    border-radius: 8px;
    background-color: #dc3545;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}
#delete_all:hover{
    background-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}
#display{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    overflow-x: auto;
}
#display h1 {
    margin: 0 0 20px 0;
    color: #333;
    font-weight: 600;
    font-size: 24px;
}
table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 10px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
thead {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}
thead th {
    padding: 15px;
    text-align: center;
    font-weight: 600;
    border: none;
    font-size: 16px;
}
tbody td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}
tbody tr{
    transition: background-color 0.3s;
}
tbody tr:hover{
    background-color: #f8f9fa;
}
.action_btn{
    padding: 6px 12px;
    margin: 2px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}
.action_btn:hover{
    background-color: #0056b3;
    transform: translateY(-1px);
}
.red td{
    background-color: #ffebee;
    color: #c62828;
}
.green td{
    background-color: #e8f5e8;
    color: #2e7d32;
}


@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    #input_box {
        max-width: 100%;
        margin: 10px auto;
        padding: 15px;
    }
    #input_box input, #input_box select {
        max-width: 100%;
    }
    #input_box button {
        width: 100px;
        font-size: 14px;
    }
    #display {
        margin: 10px auto;
        padding: 15px;
    }
    #display h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    table, thead, tbody, th, td, tr {
        display: block;
    }
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    tr {
        border: 1px solid #e0e0e0;
        margin-bottom: 20px;
        border-radius: 8px;
        overflow: hidden;
    }
    td {
        border: none;
        border-bottom: 1px solid #f0f0f0;
        position: relative;
        padding: 12px 15px !important;
        padding-left: 50% !important; 
        text-align: left;
    }
    td:last-child {
        border-bottom: none;
    }
    td:before {
        position: absolute;
        top: 12px;
        left: 15px;
        width: 30%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: #666;
    }
    td:nth-of-type(1):before { content: "ID"; }
    td:nth-of-type(2):before { content: "Name"; }
    td:nth-of-type(3):before { content: "Age"; }
    td:nth-of-type(4):before { content: "City"; }
    td:nth-of-type(5):before { content: "Actions"; }
    td:nth-of-type(6):before { content: "Created At"; }
    td:nth-of-type(7):before { content: "Status"; }
    .action_btn {
        display: inline-block;
        margin: 2px 4px;
        padding: 4px 8px;
        font-size: 11px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #input_box {
        max-width: 600px;
    }
    #display {
        max-width: 1000px;
    }
    thead th, tbody td {
        padding: 10px;
        font-size: 14px;
    }
    .action_btn {
        padding: 5px 10px;
        font-size: 12px;
    }
}


