body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #c5e8ff, #eef2f7);
    margin: 0;
    padding: 20px;
    color: #333;
}

/* Title */
.title {
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #007bff, #00b894);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Container Layout*/
#container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* Grid Layout */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* User Card */
.user-card {
    flex: 1 1 calc(25% - 20px);
    max-width: 260px;
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    transition: all 0.4s ease;
    border-top: 4px solid transparent;
    min-height: 300px;
    perspective: 1000px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.user-card:hover {
    transform: translateY(-8px) scale(1.03) rotateX(2deg);
    border-top: 4px solid #258fff;
    box-shadow: 0 12px 28px rgba(0, 123, 255, 0.2);
}

/* Avatar */
.user-card img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #007bff;
    object-fit: cover;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.user-card:hover img {
    transform: scale(1.08) rotate(2deg);
}

/* Name */
.user-card h3 {
    margin: 10px 0 5px;
    font-size: 18px;
    color: #2c3e50;
    font-weight: 600;
    min-height: 40px;
    font-family: 'Inter', sans-serif;
}

/* Email */
.user-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    min-height: 20px;
}

/* Card Actions */
.card-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.edit-btn, .delete-btn {
    padding: 7px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.edit-btn {
    background: linear-gradient(90deg, #51a7e1, #006ab1);
    box-shadow: 0 4px 8px rgba(0, 78, 162, 0.2);
}

.edit-btn:hover {
    background: linear-gradient(90deg, #52baff, #1f618d);
    transform: translateY(-2px);
}

.delete-btn {
    background: linear-gradient(90deg, #ff6857, #c0392b);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.2);
}

.delete-btn:hover {
    background: linear-gradient(90deg, #f94d3a, #922b21);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .user-card { flex: 1 1 calc(50% - 20px); }
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 25px;
}

.pagination button {
    padding: 10px 18px;
    margin: 0 6px;
    border: none;
    background: linear-gradient(90deg, #0f83ff, #01d6ac);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.15);
}

.pagination button:hover {
    background: linear-gradient(90deg, #004187, #0a8d72);
    transform: translateY(-2px);
}

#pageInfo {
    font-weight: 500;
    margin: 0 10px;
    color: #444;
}

/* Modal (Edit & Add) – 3D Glass Look*/
.modal, #user-form {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in-out;
    z-index: 1000;
}

#user-form.active,
.modal.active {
    display: flex;
}

.modal-content,
.form-content {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    width: 380px;
    animation: popIn 0.3s ease;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    transform: translateY(-10px) scale(0.97);
    transition: transform 0.3s ease;
}

.modal-content h3,
#user-form h3 {
    margin-top: 0;
    color: #2c3e50;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
}

.modal-content:hover,
.form-content:hover {
    transform: scale(1.02);
}

#user-form input,
#edit-form input {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    width: 90%;
}

#user-form input:focus,
#edit-form input:focus {
    border-color: #007bff;
    box-shadow: 0 0 6px rgba(0, 123, 255, 0.2);
}

#user-form button,
#edit-form button {
    background: linear-gradient(90deg, #28a745, #20c997);
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

#user-form button:hover,
#edit-form button:hover {
    background: linear-gradient(90deg, #218838, #17a589);
    transform: translateY(-2px);
}

/* Close Button Styling */
.modal .close,
#user-form .close-add {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    z-index: 10;
    transition: color 0.2s ease;
}

.modal .close:hover,
#user-form .close-add:hover {
    color: #000;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Stylish Search Bar*/
.search-bar {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.search-bar input {
    width: 320px;
    max-width: 90%;
    padding: 12px 40px 12px 45px;
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 30px;
    font-size: 15px;
    outline: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    transition: all 0.3s ease;
    color: #333;
}

/* Placeholder Styling */
.search-bar input::placeholder {
    color: #888;
    font-style: italic;
}

/* Focused State */
.search-bar input:focus {
    border-color: #007bff;
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.3);
    transform: scale(1.03);
}

/* Search Icon */
.search-bar::before {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #007bff;
    opacity: 0.7;
    pointer-events: none;
    transition: color 0.3s ease;
}

/* Hover Effect */
.search-bar input:hover {
    box-shadow: 0 6px 18px rgba(0, 123, 255, 0.25);
}

/* Spinner Overlay */
.spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

/* Spinner Animation */
.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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