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

:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary-color: #3b82f6;
    --text-color: #f1f5f9;
    --border-color: rgba(255, 255, 255, 0.1);
    --hover-color: #60a5fa;
    --danger-color: #ef4444;
}

body {
    font-family: 'Outfit', sans-serif;
    background: radial-gradient(circle at top left, #1e293b, #0f172a);
    color: var(--text-color);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

h1,
h2,
h3 {
    font-weight: 600;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.container {
    width: 100%;
    max-width: 1200px;
    z-index: 10;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* Form Elements */
input[type="file"],
input[type="text"],
textarea,
select {
    width: 100%;
    padding: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    margin-bottom: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus,
select:focus {
    border-color: var(--primary-color);
}

button {
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.1s, opacity 0.2s;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

button:active {
    transform: translateY(0);
}

button.danger {
    background: linear-gradient(135deg, var(--danger-color), #b91c1c);
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.3);
}

/* Table Styling */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th,
td {
    text-align: left;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: rgba(15, 23, 42, 0.8);
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    position: sticky;
    top: 0;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

/* Edit Modal/Form */
.editor-area {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.query-box {
    font-family: 'Consolas', 'Monaco', monospace;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    box-shadow: none;
    padding: 0;
}

.close-modal:hover {
    color: white;
    transform: none;
}

.action-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin-right: 5px;
}

.edit-btn {
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
}

.delete-btn {
    background: linear-gradient(135deg, var(--danger-color), #b91c1c);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
}