.filters {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
}

.search-box input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.filter-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    min-width: 120px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.work-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.work-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.work-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.work-content {
    padding: 1rem;
}

.work-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.work-id {
    font-size: 0.8rem;
    color: #999;
    font-weight: 500;
}

.work-topic {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.work-description {
    color: #666;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.work-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #666;
}

.work-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.task-id {
    color: #666;
}

.study-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    margin: 0 0.5rem;
    font-size: 1rem;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 50px;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

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

.modal-header {
    margin-bottom: 20px;
}

.subject-selector {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.subject-selector label {
    font-weight: bold;
    font-size: 16px;
}

.select-container {
    position: relative;
    width: 100%;
    display: flex;
    gap: 10px;
}

.select-container input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
}

.subject-selector button {
    padding: 8px 15px;
    white-space: nowrap;
}

.modal-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-top: 1rem;
}

/* Subject selector styles */
.subject-selector {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.subject-selector label {
    font-weight: bold;
}

.select-container {
    position: relative;
    width: 100%;
}

.select-container input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.subject-selector button {
    margin-top: 10px;
    align-self: flex-start;
}

.btn-primary {
    background-color: #4a6da7;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #3a5d97;
}

.btn-primary:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

.btn-primary.success {
    background-color: #4CAF50;
}

.save-status {
    margin-left: 10px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.save-status.success {
    color: #4CAF50;
    font-weight: bold;
    font-style: normal;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filters {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-options {
        flex-direction: column;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }
}
