:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --success: #16a34a;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-700: #374151;
    --gray-900: #111827;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    padding: 2rem;
}

h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2rem;
    text-align: center;
}

.message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.error-message {
    background-color: #fef2f2;
    color: var(--danger);
    border: 1px solid #fee2e2;
}

.success-message {
    background-color: #f0fdf4;
    color: var(--success);
    border: 1px solid #dcfce7;
}

.upload-section {
    background: var(--gray-50);
    padding: 2rem;
    border-radius: 0.5rem;
    border: 2px dashed var(--gray-200);
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    justify-content: center;
}

.upload-section form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

input[type="file"] {
    background-color: white;
    border: 2px solid var(--primary);
    border-radius: 0.5rem;
    padding: 0.5rem;
    width: 100%;
    color: var(--gray-700);
    cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.3rem;
    margin-right: 1rem;
    cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background-color: var(--primary-dark);
}

button {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    max-width: 400px;
}

button:hover {
    background: var(--primary-dark);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
}

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

th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.button {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}

.button:hover {
    opacity: 0.9;
}

.download-file {
    background: var(--primary);
    color: white;
}

.edit-file {
    background: var(--success);
    color: white;
}

.delete-file {
    background: var(--danger);
    color: white;
}

@media screen and (max-width: 768px) {
    .container {
        margin: 1rem auto;
    }

    .card {
        padding: 1rem;
    }

    table {
        display: block;
        overflow-x: auto;
    }

    .action-buttons {
        flex-direction: column;
    }

    .button {
        width: 100%;
        text-align: center;
    }
}

@media screen and (max-width: 640px) {
    table thead {
        display: none;
    }

    table tbody tr {
        display: block;
        border: 1px solid var(--gray-200);
        border-radius: 0.5rem;
        margin-bottom: 1rem;
        padding: 1rem;
    }

    table td {
        display: flex;
        padding: 0.5rem 0;
        border: none;
    }

    table td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 1rem;
        min-width: 120px;
    }
}